# Server Mangement ###### tags: `software` `electrical_system` `NTURT` ## Introduction TBD ## Architecture ### Machine The following is the server internet heirarchy. All machines except for the router has LAN address `192.168.123.x`, where `x` is listed below: ```graphviz digraph { compound=true; uplink [label="NTUME" shape=box]; router [label="D-Link" shape=box]; subgraph cluster_host { label="Proxmox" truenas [label="TrueNAS"]; ubuntu [label="Ubuntu 22.04"]; dummy [shape=point, width=0, height=0, label=""]; windows [label="Windows 10"]; container [label="Tailscale"]; } uplink -> router [label="140.112.14.126"]; router -> dummy [label=".2", lhead=cluster_host]; router -> truenas [label=".3"]; router -> ubuntu [label=".4"]; router -> windows [label=".5"]; router -> container [label=".254"]; } ``` ## Connecting to the server ### Wireguard A VPN service is used to protect the server, and wireguard is used as a faster version of openvpn. #### Installation ##### On linux systems Install wireguard client by ```bash= sudo apt update sudo apt install wireguard sudo apt install resolvconf # install depending packages ``` ##### Install on other systems Download wireguard desktop from the [official download page](https://www.wireguard.com/install/). #### Connect to server First get a key from [Google drive](https://drive.google.com/drive/folders/1HMVhVpSwn54xHNHny5fu5hGFJGUBfxhs?usp=drive_link). > Note: A key is a a directory named `peer<number>`. Please delete the keys you took since it's not sharable. ##### On desktop systems For computers, what's relevent is the file `peer<number>.conf`. It is suggested to rename it to something like `nturt.conf` since it's used to identify the host. ##### On linux systems Put the key `CONFIG_FILE_NAME.conf` to `/etc/wireguard/` under root permission such as `/etc/wireguard/nturt.conf`. Then the connection can be established by using ```bash= # connect sudo wg-quick up <CONFIG_FILE_NAME> # disconnect sudo wg-quick down <CONFIG_FILE_NAME> ``` > Note: <CONFIG_FILE_NAME> for the command is ended without `.conf` extension. ##### On other desktop systems Simply add a tunnel using the key `CONFIG_FILE_NAME.conf` and you can connect to the host. ##### On cellphones The relevant file for cellphone is the QR code `peer<number>.png`. Just simply scan it using the cellphone app and you can connect to the host. ### VM IP address Once the VPN connection is established, you can access to vaious virtual machines on the server by either their webpage or ssh. The respective accouts and password is at [Google doc](https://docs.google.com/document/d/1gDZSpbP-A0DcMdpqKjZ5JhPLum8GLTtg8j9Gkragjms/edit?usp=sharing). - Router web page: http://192.168.123.1 - Proxmox web page: http://192.168.123.2:8006 - True NAS web page: http://192.168.123.3 - Ubuntu ssh: 192.168.123.4 - Windows remote desktop: 192.168.123.5 ## Setting up the server ### Proxmox username: root ### Truenas ### Ubuntu As easy as uploading a ubuntu image to proxmox. username: nturt ### Wireguard Setup via a docker container. - github: [wireguard](https://github.com/linuxserver/docker-wireguard) ### Windows - youtube tutorial: [Virtualize Windows 11 with Proxmox the Right Way!](https://www.youtube.com/watch?v=fupuTkkKPDU) - gpu passthrough: [reddit](https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/)