Introduction
A while ago, I built a home lab to gain hands-on experience with Linux server administration and network engineering. Using some old hardware, a ThinkCentre M81 desktop and a Tenda router, I set up a private LAN, configured a static IP and DHCP reservations, and deployed an SSH-accessible Linux server running an Nginx web server.
This project allowed me to apply concepts I had learned in college in a real-world scenario, practice network setup and IP management, and explore server configuration beyond the classroom. It’s also an example of repurposing older hardware to create a functional learning environment.
Below, I’ve documented the full technical process, step by step, so you can see exactly how I built this setup and replicate it if you want to create your own home lab.
Tenda Router Setup
The router I used is the Tenda AC1200 router: https://www.tendacn.com/product/ac6.html.
- Turn on the router.
- Connect to the router’s LAN port (1 or 2) via ethernet from a PC you are able to use.
- Visit
192.168.0.1, the default router IP (written in the back of your router) from a web browser. - Enter the default login password (written in the back of your router).
- Go to system settings and change the login password
- Go to Wi-Fi settings and change the Wi-Fi name and password.
- Go to system settings and upgrade the firmware if needed.
The router is ready for connection. Disconnect the ethernet from the router, you can now access it via Wi-Fi.
ThinkCentre M81 Server setup
Installing Linux Mint
Connect the ethernet port of the CPU to any the Tenda router’s LAN ports, and install linuxmint normally: https://linuxmint-installation-guide.readthedocs.io/en/latest/
But during the installation process, choose to erase the whole disk and install linux mint while asked about partitions.
Do not select to set up an encrypted LVM (full disk encryption) in the Advanced features. Using an LVM is okay but encrypted LVM for full disk encryption requires someone to type the password in the keyboard connected to the server every time it boots, and we want it to automatically boot and be ready for ssh login so it is not recommended.
And the authorized ssh keys stay in the home folder of the user, so if you encrypt it, logging in to the user account will be required for key based ssh to work. Logging in remotely strictly using ssh keys will not work then. So do not encrypt the home folder.
After the installation is complete, login and set the root password.
sudo passwd
Turning the desktop into a server
After that, we need to turn this into a server from a desktop.
- Install
openssh-serverand configure it: https://wiki.debian.org/SSH#Installation_of_the_server - [Not required but highly recommended] Make the ssh server run on a port different from 22, for security (to prevent automated brute force scripts).
- [Not required but highly recommended] Turn on firewall and allow the ssh. When the firewall is turned off, every port open on the system is open to the network. So turn it on to make sure only the ports you allow are accessible from the outside.
sudo ufw allow <ssh_port_number>
sudo ufw enable
- Now we need static IP for the server instead of DHCP from the router. We will be using systemd-networkd for this.
sudo ifconfig
And remember the name of the ethernet port connecting to the router (usually eno1)
- Now stop and disable NetworkManager, it is bound to the display manager so if we use primarily Network Manager, the server will not have networking when started headless.
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
- Now enable systemd-networkd on boot
sudo systemctl enable systemd-networkd
- Create a file
/etc/systemd/network/10-eno1.networkand put in the contents
[Match]
Name=eno1
[Network]
Address=192.168.0.2/24
Gateway=192.168.0.1
DNS=192.168.0.1
Where 192.168.0.1 is the IP address of your router and 192.168.0.2 is the IP address of the server, and eno1 is the name of the network interface of the ethernet port.
- Reload systemd-networkd for the changes to take effect
sudo systemctl restart systemd-networkd
- Now run
sudo ifconfigagain and the ip address should have changed on the ethernet port. - Now that we have static IP, go to router login page -> System Settings -> DHCP Reservation
And manually bind the static IP to the MAC address of the server.
We have turned the desktop into a server. Now ssh into it from your PC to test if it works.
ssh -p <ssh_port_number> username@192.168.0.2
Making server headless
Once you have logged in to the server via ssh, you can easily turn it headless. You simply have to stop the display manager and disable it on boot so it always runs headless.
(after ssh into server)
sudo systemctl stop lightdm
sudo systemctl disable lightdm
After this, the monitor screen connected to the desktop goes blank. This is expected. If you are not sure if the system hanged or if the graphical manager has stopped, press Ctrl+Alt+F1 to enter virtual terminal 1. If you see the virtual terminal, it is working properly. Now you can safely remove the monitor and keyboard and mouse from the server’s CPU as you won’t need it anymore and will always access it by ssh.
Configuring Web Server
While you are still ssh-ed into the server, run
sudo apt install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
To install, start and enable the web server on boot. It runs on port 80, the default port for HTTP. So allow it on the firewall for the website to be accessed from the LAN.
sudo ufw allow 80
You can leave it as it is to get the default nginx server page or create a file /var/www/html/index.html with your own website on the index.html file, or even host a react app by copying the build files into the /var/www/html folder.
Accessing the website
Connect to the Wi-Fi network of the Tenda router from any device that has Wi-Fi.

And then open the IP address of the server in a web browser. You will get a no HTTPS warning but you can ignore it and continue since we are in a controlled environment.
SUCCESS
That’s it. The home LAB has been set up successfully. You have a LAN on Wi-Fi and a server that you can ssh into and use as backup storage, and a web server you can host websites on your LAN.



Top comments (0)