NodexVPS
Deploy VPS
Back to All Guides
Getting Started14 min read•Updated 2026-11-09

Debian VPS Setup Guide

Turn a fresh Debian install into a secure server while keeping the small footprint that makes Debian worth choosing.

Debian gives you very little by default, which is exactly the point. This guide adds only the essentials: sudo, a firewall and automatic patches.

  • Works on: Debian 13 and 12
  • Minimum server: 512 MB of RAM officially, 1 GB recommended
  • You will need: an SSH client and the emailed root password
1

Pick Debian 13 unless you cannot

Choose Debian at checkout. Debian 13 (Trixie) is the current stable release. Use Debian 12 only when an application has not been tested on 13.

Debian 11 long-term support ended in August 2026, so do not use it for a new server.

2

Log in as root

Connect from your own terminal, then confirm which release you have.

ssh root@YOUR_SERVER_IP
cat /etc/debian_version
3

Upgrade the system

Debian's full-upgrade can add or remove packages when dependencies change, which is what you want on a new server.

apt update && apt full-upgrade -y
systemctl reboot
4

Install sudo and a firewall

Minimal Debian systems may not include these two tools, so add them now.

apt install sudo ufw -y
5

Create your admin user

Debian's adduser asks for a password and a few optional details. You can leave the details blank.

adduser deploy
usermod -aG sudo deploy
6

Copy your SSH key

Run these two lines on your own computer.

ssh-copy-id deploy@YOUR_SERVER_IP
ssh deploy@YOUR_SERVER_IP
7

Disable root and password logins

Debian reads drop-in files from sshd_config.d. Its SSH service is called ssh, not sshd.

Test a new login in another terminal before you close your current session.

sudo tee /etc/ssh/sshd_config.d/10-hardening.conf > /dev/null <<'EOF'
PermitRootLogin no
PasswordAuthentication no
EOF

sudo sshd -t && sudo systemctl restart ssh
8

Enable UFW

Allow SSH first so you are not disconnected.

sudo ufw allow ssh
sudo ufw enable
sudo ufw status
9

Turn on automatic security updates

The apt-listchanges package adds a summary of what changed. Choose Yes when the configuration screen asks.

sudo apt install unattended-upgrades apt-listchanges -y
sudo dpkg-reconfigure -plow unattended-upgrades
10

Keep Debian stable

A few habits keep a Debian server dependable for years:

  1. Stay on official repositories, and do not mix packages from other releases
  2. Use the backports repository when you need a newer version of one tool
  3. Read the release notes before upgrading to the next stable release

Get a server for this guide

Debian GNU/Linux plans run everything in this guide, from $10.99/mo.

See Debian GNU/Linux plans

Debian VPS Setup Guide: Frequently Asked Questions

Quick answers to common questions.

How do I see what changed in Debian package updates?

Install apt-listchanges, which shows the changelog and news entries of packages before apt upgrades them, so you can see what changed in Debian package updates. This guide installs it together with unattended-upgrades, and it adds a summary of the changes to its reports. For a single package, run apt changelog followed by the package name to read its full history of fixes.

Why is the SSH service called ssh on Debian?

On Debian the OpenSSH server unit is named ssh, not sshd as on Red Hat style systems, so you restart it with systemctl restart ssh. The configuration still lives in /etc/ssh, and Debian reads drop-in files from sshd_config.d. Test the config with sshd -t before restarting.

How do I set up UFW on a Debian VPS?

Install ufw with apt, allow SSH first with ufw allow ssh so you are not disconnected, then run ufw enable and check the result with ufw status. Minimal Debian systems may not include UFW, so it is one of the two tools this guide adds, along with sudo.

What is the difference between apt upgrade and apt full-upgrade on Debian?

apt full-upgrade can add or remove packages when dependencies change, while apt upgrade never removes anything and holds such updates back. On a new Debian server, full-upgrade is what you want, so the guide runs apt update and apt full-upgrade -y, then reboots.

How do I create a sudo user on Debian?

Run adduser deploy, which asks for a password and a few optional details you can leave blank, then usermod -aG sudo deploy to give the account admin rights. Install sudo first if it is missing. Copy your SSH key to the new user with ssh-copy-id before you turn off root login on Debian.

When should I use Debian backports on a server?

Use the backports repository when you need a newer version of one tool than Debian stable provides. Otherwise stay on the official repositories and do not mix packages from other Debian releases, which keeps the server dependable for years. Read the release notes before moving to the next stable release.

How do I check which Debian version is installed?

Log in over SSH as root and run cat /etc/debian_version, which prints the release number of your Debian system. Debian 13 (Trixie) is the current stable release, and Debian 12 suits applications that have not yet been tested on 13.

Start Your NodexVPS Today

Save 50% with yearly billing.