A headless server — no monitor, no keyboard, tucked away in a closet or under a desk — is the most practical way to run a home lab. Here’s the essential setup once the OS is installed, before you start deploying actual services on it.
SSH First, Always
# On a fresh Debian/Ubuntu server install sudo apt install openssh-server sudo systemctl enable --now ssh # Set a static IP via netplan (Ubuntu) so the server doesn't wander sudo nano /etc/netplan/00-installer-config.yaml
network:
version: 2
ethernets:
eth0:
dhcp4: no
addresses: [192.168.1.50/24]
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses: [1.1.1.1, 1.0.0.1]
Locking Down SSH
# Copy your public key so password auth can be disabled ssh-copy-id user@192.168.1.50 # Then disable password authentication entirely sudo sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config sudo systemctl restart ssh
Unattended Reboots and Monitoring
Enable unattended security upgrades so a headless box doesn’t sit vulnerable for months, and set up a simple uptime check so you actually find out when it goes down instead of discovering it three weeks later:
sudo apt install unattended-upgrades sudo dpkg-reconfigure --priority=low unattended-upgrades
What to Run on It
Once the basics are solid, common first services are Pi-hole for network-wide ad blocking, a Samba or NFS share, and a container runtime like Podman for everything else — a headless box with 8GB of RAM comfortably runs a dozen small self-hosted services.