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

  1. Update the system

    Run sudo apt update && sudo apt full-upgrade -y.

  2. Reserve a static local IP

    Set a DHCP reservation in your router for the server's MAC address.

  3. Set up SSH key authentication

    Generate an ed25519 key with ssh-keygen and copy it to the server with ssh-copy-id.

  4. Enable the UFW firewall

    Deny incoming by default, allow OpenSSH, then enable UFW.

  5. 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

Terminal window
sudo apt update && sudo apt full-upgrade -y

2. 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

Terminal window
sudo ufw default deny incoming
sudo ufw allow OpenSSH
sudo ufw enable

5. 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!

Portrait of Guillermo

Written by Guillermo

IT Student & Home Server Enthusiast

Building private clouds to break free from Big Tech. I document everything I learn about home servers and self-hosting on MyHomeServerGuide.

More about the author