First 5 Things to Do After Installing a Linux Home Server
A fresh Linux server isn't ready yet. Update the system, reserve a static IP, set up SSH keys, enable UFW and automount drives with fstab.
Set up a fresh Linux home server
The five essential steps that make a new Linux server safe and stable before you install any apps.
Estimated time: PT30M
Update the system
Run sudo apt update && sudo apt full-upgrade -y.
Reserve a static local IP
Set a DHCP reservation in your router for the server's MAC address.
Set up SSH key authentication
Generate an ed25519 key with ssh-keygen and copy it to the server with ssh-copy-id.
Enable the UFW firewall
Deny incoming by default, allow OpenSSH, then enable UFW.
Automount your drives
Add your drives to /etc/fstab by UUID using the nofail flag.
A Fresh Install Is Not Ready for Production
Before installing any apps — right after your fresh Ubuntu Server install — you need to secure and stabilize your base system. Skipping these steps will lead to massive headaches.
Story time: One day, my server completely vanished from the network. I couldn’t ping it, the CasaOS interface wouldn’t load even after waiting 30 minutes, and Tailscale showed the machine as offline. I finally hauled a monitor up to the studio and plugged it in. The culprit? The system had restarted and was stuck on the GRUB bootloader screen waiting for a keyboard input! Setting up your base system properly prevents these “invisible” errors.
1. Update the System
sudo apt update && sudo apt full-upgrade -y2. Lock In a Static Local IP Address
If your server’s IP changes after a power outage, all your bookmarked services and SMB shares will break. Go into your home router’s settings (usually 192.168.1.1) and set a DHCP Reservation for your server’s MAC address.
3. Set Up SSH Key Authentication
Generate an SSH key on your main PC (ssh-keygen -t ed25519) and copy it to your server (ssh-copy-id user@server_ip). This lets you log in securely without typing your password every time.
4. Enable the UFW Firewall
sudo ufw default deny incomingsudo ufw allow OpenSSHsudo ufw enable5. Automount Your Hard Drives (fstab)
Find your media drives’ UUIDs with lsblk -f, then add them to /etc/fstab so they mount automatically on boot. Always use the nofail flag so a dying hard drive doesn’t cause a boot loop!