Skip to content
VDS · Operating systems

Debian: specifics and first steps

Initial setup of Debian 12 and 13 on a machine: updates, a set of basic packages, sudo, firewall, time, and the specifics that surprise beginners.

Updated August 23, 2026

Debian is a system without surprises: minimal preinstalled software, rare changes between releases, long support. Versions 12 and 13 are available.

First commands

apt update && apt upgrade -y
apt install -y curl wget nano git ufw htop ca-certificates
timedatectl set-timezone Europe/Moscow
hostnamectl set-hostname my-vds

Check the system version:

cat /etc/os-release

What surprises you after Ubuntu

FeatureWhat to do
No sudo out of the boxapt install -y sudo, then usermod -aG sudo artem
No curl, nano may be missingInstall manually from the list above
Packages are olderFresh versions of Node, PHP, PostgreSQL — from the official project repositories
No snapUsually not needed anyway
ip a instead of ifconfignet-tools is installed separately, but it's better to get used to ip

User and sudo

You shouldn't work as root all the time:

apt install -y sudo
adduser artem
usermod -aG sudo artem

Permissions are applied on next login. Check:

su - artem
sudo whoami

The answer root means everything is set up.

Firewall

ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status verbose

Allow OpenSSH first, then enable ufw. Otherwise the connection will drop, and you'll have to log in via the text console in the panel.

Fresh versions of programs

Debian intentionally has older packages — that's the price for stability. When you need a fresh version, connect the official project repository, not random builds:

curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs

Packages from backports are installed explicitly:

apt install -y -t bookworm-backports <package>

You shouldn't mix repositories from different releases (testing, unstable) on a production machine: sooner or later the system will stop updating.

Automatic security updates

apt install -y unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades

This covers the most common hacking scenario — a vulnerability for which a patch was released six months ago.

Upgrading between releases

Upgrading from Debian 12 to 13 is done by editing package sources and the apt full-upgrade command. Before that, be sure to download your data: scp and rsync. There are no automatic machine backups or snapshots, so there will be nowhere to roll back to.

If the system is fresh and there's little data, it's easier and safer to reinstall it with the desired version.

Guest agent

The panel needs it to show used space and perform a soft reboot:

apt install -y qemu-guest-agent
systemctl enable --now qemu-guest-agent

Next — first hour checklist and website in 15 minutes.