Skip to content

Minimal Debian server setup guide

By Onehost Team1 min read

Debian's strength is its minimalism. Here's how to set up a lean, secure Debian server without unnecessary bloat.

1. Update

sudo apt update && sudo apt upgrade -y

2. Install only what you need

sudo apt install sudo curl ufw fail2ban unattended-upgrades -y

A minimal Debian install doesn't even include sudo by default, so add it and put your user in the sudo group.

3. Secure SSH

Add your SSH key, then set PermitRootLogin no and PasswordAuthentication no in /etc/ssh/sshd_config and reload SSH.

4. Firewall and auto-updates

sudo ufw allow OpenSSH && sudo ufw enable
sudo dpkg-reconfigure -plow unattended-upgrades

5. Add your stack

Install your web server, database or runtime. Because you started minimal, the server runs few services, uses less RAM, and has a smaller attack surface — exactly why admins love Debian.

Onehost offers Debian 12 on KVM with full root access, so you can build exactly this lean setup.

Put it into practice

A lean Debian 12 server with full root access.

Debian VPS plans