Home Server
Build a low-maintenance Debian home server with SSH, automatic updates, firewall rules, file sharing, backups, and a practical service path.
The Home Server scenario is for turning an old PC, mini PC, or low-power device into a long-running node on your home network. It can host file sharing, photo management, downloaders, dashboards, lightweight databases, or containerized services.
Who It Is For
- Users running home services on spare hardware
- Homes or small teams centralizing photos, documents, and backups
- People learning Linux operations without exposing services to the public internet first
Recommended Hardware
| Component | Recommendation |
|---|---|
| CPU | Low-power 2+ cores; 4 cores if you run many containers |
| Memory | 4 GB minimum, 8 GB for several services |
| Disk | Separate system and data disks if possible; do not keep important data on only one disk |
| Network | Prefer wired networking; reserve an address in your router's DHCP settings |
| Power | For always-on use, prefer low power draw and stable cooling |
Installation Path
- Install Debian stable without a desktop if you do not need one; select SSH server and standard system utilities.
- Update the system, create a normal user, and verify SSH access from your LAN.
- Set a basic firewall that exposes only SSH and the services you actually use.
- Enable automatic security updates and basic login protection.
- Plan data directories, backup targets, and recovery before installing applications.
Base Packages
sudo apt update
sudo apt install openssh-server ufw unattended-upgrades fail2ban rsync smartmontoolsIf you want to run services in containers, continue with Docker Host or Podman.
Network and Access
Start with LAN-only access:
- Reserve a DHCP address for the server in your router
- Use hostname or local DNS for service access
- Do not rush into public port forwarding
- For internet access, prefer VPN, reverse proxy, or a controlled tunnel
For diagnostics, see Network Configuration.
Security Baseline
Start with a minimal firewall:
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw enableAfter confirming SSH key login works, you can consider disabling password login. Keep an existing SSH session open while changing the configuration:
sudoedit /etc/ssh/sshd_config.d/99-home-server.confUse:
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yesValidate and restart SSH:
sudo sshd -t
sudo systemctl restart sshFor more on SSH, firewalling, Fail2Ban, and automatic updates, see Security Management.
Data and Backups
Keep service data under /srv:
/srv/
share/
photos/
backups/
containers/Prioritize:
- Home and service data under
/srv/ - Service configuration under
/etc/ - Irreplaceable files in user home directories
- Database dumps, not only live database directories
Preview rsync with -n:
sudo rsync -avhn /srv/ /backup/home-server/For the full model, see Backup & Restore.
Common Issues
| Issue | Check first |
|---|---|
| LAN access fails | Server IP, router DHCP, ufw status, service bind address |
| SSH login fails | Username, key permissions, journalctl -u ssh |
| Disk space fills up | Downloads, container images, old backups, logs |
| Services do not start after power loss | systemctl is-enabled, service dependencies, disk mounts |
| Backup cannot be restored | Recovery test, backup coverage of all data paths |
Next Guides
Development Workstation
Set up Debian as a daily development workstation with base toolchains, language runtimes, containers, editors, SSH, backups, and maintenance.
NAS / File Sharing
Build a Debian NAS for homes or small teams with disk layout, Samba, NFS, permissions, snapshots, backups, and LAN security boundaries.