Getting Started With Debian 12 on a VPS

Overview

This guide walks you through the first steps on a brand-new Debian 12 (Bookworm) VPS. You will end up with a hardened, production-ready server in under 30 minutes. If you need a VPS to follow along, Contabo (affiliate) offers 4 vCPUs and 8 GB RAM from $5.50/month — great value for Debian 12 deployments.

Full guideInitial Server Setup on Debian 12


Step 1 — Update the System

1
apt update && apt full-upgrade -y

Step 2 — Create a Sudo User

1
2
adduser deploy
usermod -aG sudo deploy

Step 3 — Harden SSH

Edit /etc/ssh/sshd_config:

1
2
3
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
1
systemctl restart sshd

Step 4 — Configure UFW Firewall

1
2
3
apt install ufw -y
ufw allow OpenSSH
ufw enable

Step 5 — Install Essential Packages

1
apt install -y curl wget git unzip htop fail2ban

🖥️ Check Them Out — Contabo VPS

Running these guides on a real server makes all the difference. Contabo offers some of the best VPS value around — NVMe SSDs, generous RAM, and Debian 12 available out of the box.

PlanvCPUsRAMStoragePrice
VPS S48 GB100 GB NVMe~$5.50/mo
VPS M616 GB200 GB NVMe~$9.50/mo
VPS L824 GB300 GB NVMe~$13.50/mo

→ Check Out Contabo VPS Plans (affiliate link)   → Need More Power? Dedicated Servers (affiliate link)