Debian.Club
Scenarios

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
ComponentRecommendation
CPULow-power 2+ cores; 4 cores if you run many containers
Memory4 GB minimum, 8 GB for several services
DiskSeparate system and data disks if possible; do not keep important data on only one disk
NetworkPrefer wired networking; reserve an address in your router's DHCP settings
PowerFor always-on use, prefer low power draw and stable cooling

Installation Path

  1. Install Debian stable without a desktop if you do not need one; select SSH server and standard system utilities.
  2. Update the system, create a normal user, and verify SSH access from your LAN.
  3. Set a basic firewall that exposes only SSH and the services you actually use.
  4. Enable automatic security updates and basic login protection.
  5. 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 smartmontools

If 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 enable

After 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.conf

Use:

PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes

Validate and restart SSH:

sudo sshd -t
sudo systemctl restart ssh

For 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

IssueCheck first
LAN access failsServer IP, router DHCP, ufw status, service bind address
SSH login failsUsername, key permissions, journalctl -u ssh
Disk space fills upDownloads, container images, old backups, logs
Services do not start after power losssystemctl is-enabled, service dependencies, disk mounts
Backup cannot be restoredRecovery test, backup coverage of all data paths

Next Guides

On this page