The Home Server Security Checklist
A practical, prioritized checklist to secure your home server: SSH keys, firewall (and its Docker gotcha), updates, safe remote access, containers, secrets, backups and monitoring.
Security doesn't have to be complicated. Most home servers that get compromised were exposed to the internet with a weak password, outdated software or an unprotected admin panel. Work through this checklist in order — the early items give the biggest protection for the least effort.
Know what you are protecting
A home server often holds family photos, documents, passwords and credentials for other systems. If an attacker gets in, they can also use your server to reach other devices on your network. Think in layers: reduce what is exposed, harden what is exposed, and make sure you can recover.
1. Don't expose services unless you must
Exposing services directly to the internet is the most common way home servers get hacked. Prefer a VPN like WireGuard or Tailscale, so only the VPN endpoint can be reached. If you must expose something, put it behind a reverse proxy with HTTPS and authentication, and expose only port 443. See secure remote access.
Never expose admin interfaces (Proxmox, Portainer, router, NAS), databases, SSH on a default port or the Docker API to the internet.
2. Lock down SSH
- Disable password login and use SSH keys only.
- Disable root login.
- Optionally change the default port to reduce automated noise (this is not real security by itself).
- Use Fail2ban to block brute-force attempts.
# /etc/ssh/sshd_config
PasswordAuthentication no
PermitRootLogin no
PubkeyAuthentication yesTest a second SSH session before closing your current one, so you don't lock yourself out. Reload with sudo systemctl reload ssh.
3. Keep everything updated
Unpatched software is the number-one risk. Enable automatic security updates for the operating system and update your Docker images regularly:
sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgradesSubscribe to the release feeds of the apps you expose, and remove software you no longer use. See Docker basics for a safe update workflow.
4. Use a firewall — and understand Docker
Allow only the ports you actually need. On Ubuntu, ufw makes this simple:
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw enableImportant Docker gotcha: Docker publishes container ports by editing the firewall itself, bypassing ufw rules. A container started with -p 8080:80 may be reachable from your network even if ufw appears to block it. Bind sensitive ports to localhost (127.0.0.1:8080:80), keep services on internal Docker networks, and also use your router's firewall.
5. Strong authentication everywhere
- Use a password manager and unique passwords.
- Enable two-factor authentication on every service that supports it.
- Change default credentials immediately.
- Give each person their own account instead of sharing one admin login.
6. Principle of least privilege
- Run containers as non-root where possible and avoid
privileged: true. - Don't mount the Docker socket into containers unless you absolutely trust them.
- Give each service only the folders it needs; mount media read-only when you can.
- Keep secrets in
.envfiles with tight permissions or a secrets manager, never in a public repository.
7. Segment your network
Put IoT devices, guests and cameras on separate VLANs so a compromised smart plug can't reach your server. See the networking guide.
8. Back up — and test restores
Security includes recovering from ransomware, mistakes and hardware failure. Follow the 3-2-1 rule: three copies, two media, one offsite, and keep at least one copy offline or immutable so ransomware can't encrypt it. An untested backup is not a backup. See the backup strategy guide.
9. Monitor and log
You can't respond to what you don't see.
- Use Uptime Kuma to be alerted when services go down.
- Check authentication logs (
journalctl -u ssh) occasionally. - Set up alerts for disk health and failed backups.
- Consider Grafana and Prometheus for deeper visibility.
10. Physical and power safety
Keep the server somewhere safe, use full-disk encryption if it could be stolen, and add a UPS to avoid data corruption during outages.
Quick audit
- No unnecessary ports forwarded; remote access through a VPN
- SSH keys only, root login disabled
- Automatic security updates enabled
- Firewall configured, Docker published ports reviewed
- Unique passwords and 2FA enabled
- Containers run with least privilege
- IoT devices isolated
- Backups running, one offline, restore tested
- Monitoring and alerts in place
- Reverse proxy with TLS for anything exposed
Tick these boxes and your home server will be safer than the vast majority out there. Revisit the list every few months, and whenever you add a new service.
Related articles
How to Install Fail2ban on Ubuntu
Install and configure Fail2ban on Ubuntu to ban brute-force SSH and web logins: jails, escalating bans, the Docker firewall caveat, whitelists, testing and troubleshooting.
How to Choose the Right Home Server OS
Ubuntu Server, Debian, Proxmox, TrueNAS, Unraid or CasaOS? Compare the options by skill level, hardware and goals, with a decision guide and migration tips.
Secure Remote Access to Your Home Server
Reach your homelab from anywhere without exposing risky ports: compare VPNs, Tailscale, reverse proxies and tunnels, handle CGNAT, and follow a safe blueprint.