Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

Install Debian 13 on a server: the step-by-step guide

20 min read
Improve this page

Installing Debian 13 "Trixie" on a server takes about fifteen minutes, and the installer asks only a handful of choices that really matter. This guide walks through all of them with screenshots, on a real installation: downloading the netinst image, language and keyboard, creating an administrator account with sudo, partitioning the disk, installing an SSH server without a desktop environment (SSH is secure remote access from the command line), then checking that the machine boots and responds. It is written for beginners setting up their first Linux server and for administrators who want a clean, reproducible baseline.

What you will learn

  • Download the right Debian 13 installation image (netinst).
  • Boot the installer and drive it screen by screen.
  • Create a user account with administration rights (sudo).
  • Partition the disk with the layout suited to a server.
  • Install an SSH server while avoiding the desktop environment.
  • Check the installation: boot, account, remote access.

Prerequisites

You need very little to follow this guide:

  • A target machine: a physical server, or a virtual machine (Hyper-V, VMware Workstation, KVM, UTM or Proxmox). To practise without risk, a VM is ideal; see Install Linux in a virtual machine.
  • 20 GB of disk at minimum and 2 GB of RAM are more than enough for a test server.
  • An Internet connection: the netinst image downloads packages during the installation.
  • Something to write the ISO to a USB stick if you install on physical hardware (with dd on Linux, or Rufus/balenaEtcher elsewhere).

Download the Debian 13 ISO image

Go to the official site, debian.org/download, and get the netinst image for the amd64 architecture. This image of about 800 MB contains just what is needed to start the installation; everything else is downloaded from the Debian mirrors during the process, which guarantees up-to-date packages from the very first install.

debian-13.x.x-amd64-netinst.iso

To check the integrity of the download, compare the checksum published on the mirror with that of your file:

Terminal window
sha256sum debian-13.x.x-amd64-netinst.iso

The value displayed must match exactly the one in the SHA256SUMS file of the download directory. A difference means a corrupted or tampered file: download it again.

Boot the installer

Insert the USB stick (or attach the ISO to the VM), boot the machine from it, and you reach the installer's boot menu.

Debian 13 installer boot menu

Two main entries are offered. Graphical install opens the graphical installer, driven with the mouse and keyboard; Install starts the text version, identical in its flow. This guide uses the graphical installer, which is easier to read when you are starting out. Select Graphical install and press Enter.

Language, country and keyboard

The first three screens set the system language, your country and the keyboard layout. These choices determine the default language, the time zone and the regional settings.

First choose the installation language, which will also be the language of the installed system.

Language selection in the Debian 13 installer

Then indicate your country. This choice is used to select the nearest download mirror and to set the time zone.

Country selection in the Debian 13 installer

Finally select the keyboard layout. Be careful, this is a point that trips up beginners: a French keyboard is AZERTY, an English keyboard is QWERTY. Pick the one that matches your hardware, otherwise you will mistype your passwords without noticing.

Keyboard selection in the Debian 13 installer

Machine name

The installer configures the network automatically with DHCP (the network assigns an address to the machine by itself), then asks for the machine name (the hostname). This is the name that identifies your server on the network and that will appear in your command prompt.

Entering the hostname in the Debian 13 installer

Choose a short, meaningful name: server, web1, srv-mail. The next screen asks for a domain name: leave it empty if you do not have one, it makes no difference for a test server.

Passwords: root and user

This is the most important step for security, and Debian 13 offers a modern choice here that you need to understand.

Leave the root password empty

The first screen asks for the superuser password (root). The installer itself explains the best option: if you leave this field empty, the root account is locked, and the first user created right afterwards receives administration rights through the sudo group.

Root password screen, left empty, in the Debian 13 installer

This is the recommended approach, the same as Ubuntu's. It avoids exposing a root account with a password, reduces the attack surface and makes you go through sudo, which logs administration commands. So leave both fields empty and continue.

Create the administrator user

Since the root password is empty, the installer has you create a user who will inherit sudo. First enter the user's full name (for information only).

Entering the user's full name in the Debian 13 installer

Then the login name, in lowercase, with no spaces. The installer suggests one derived from the full name.

Entering the login name in the Debian 13 installer

Finally, choose a strong password for this account, and confirm it. This login name + password pair is what you will use to log in and administer the machine.

Entering the user password in the Debian 13 installer

Partition the disk

Partitioning divides the disk into zones. The installer offers a guided mode that does all the work. Choose "Guided - use entire disk": it is the simplest, and it suits the vast majority of servers.

Partitioning method selection in the Debian 13 installer

After selecting the target disk, the installer asks for the partitioning scheme. Take "All files in one partition", the option recommended for beginners: a single space for the system, plus a small swap partition.

Partitioning scheme selection in the Debian 13 installer

The installer displays a summary of the partitions it is about to create. Check the / partition in ext4 and the swap partition, then choose "Finish partitioning and write changes to disk".

Partitioning summary in the Debian 13 installer

A last screen asks for confirmation before writing to the disk. This is the point of no return: from here on, the disk is formatted. The default answer is "No" to protect you from a slip. Switch to "Yes" and continue.

Confirmation of the write to disk in the Debian 13 installer

Choose the software: a server, not a desktop

After the base system is installed and the network mirror is configured (keep deb.debian.org, which routes you to the nearest mirror), you reach the decisive screen for a server: the software selection.

By default, Debian ticks the GNOME desktop environment. On a server, this is exactly what you must not install: gigabytes of useless graphical software that weigh the machine down and enlarge the attack surface (the amount of software an attacker can target).

Default software selection, with the desktop environment ticked

Reconfigure this list for a server:

  1. Untick "Debian desktop environment" and "GNOME" (Space bar on each line).

  2. Tick "SSH server": it installs OpenSSH and will let you connect remotely.

  3. Keep "standard system utilities", ticked by default.

You should end up with this configuration: desktop unticked, SSH server ticked.

Software selection configured for a server, with SSH server ticked

If you still find yourself without SSH after the installation, the fix is a single line once you are logged in:

Terminal window
sudo apt install openssh-server

Install GRUB

GRUB is the boot loader: it is what loads the Linux kernel at boot. The installer detects that Debian is the only system present and offers to install it on the main disk. Answer "Yes".

Installing the GRUB boot loader in the Debian 13 installer

Then select the disk on which to write GRUB, usually /dev/sda (the disk you have just partitioned). Do not choose "Enter device manually" unless you have a specific need.

Selecting the device for GRUB in the Debian 13 installer

A few seconds are enough, then the "Installation complete" screen appears. Remove the installation medium (eject the ISO or unplug the stick) so that you do not boot into the installer again, then validate to reboot.

Installation complete screen in the Debian 13 installer

First login and checks

The machine reboots into the installed system and shows a text-mode login prompt: no graphical interface, which is the expected behaviour of a server. Log in with the login name and password created earlier.

Three commands confirm that everything is in order:

Terminal window
# Kernel and version: you should see Debian 13, kernel 6.12 series
uname -a
# The user's groups: "sudo" must appear
id
# The SSH daemon must be present
pgrep -l sshd

First login and verification commands on Debian 13

The output of uname -a confirms a Debian 13 system with a 6.12 kernel. The output of id must contain the sudo group: this is proof that the account can administer the machine, a direct consequence of leaving the root password empty. Finally, pgrep -l sshd returns the PID of the SSH daemon, which is indeed running.

Check the SSH server

Installing the "SSH server" task enables a persistent sshd service: it listens continuously on port 22. Two checks confirm it locally:

Terminal window
# Is the daemon listening on port 22?
ss -tlpn | grep :22
# Is the service active?
systemctl is-active ssh

The first command must show a LISTEN line on 0.0.0.0:22 (and [::]:22 over IPv6), and the second must answer active. From another computer, you then connect in the usual way:

Terminal window
ssh your_user@server_ip_address

You will also see the server banner announce OpenSSH 10, the version shipped with Debian 13.

Security and points of attention

A default installation works, but an exposed server deserves a few immediate habits:

  • Switch to SSH key authentication and disable the password: automated attacks that guess passwords then have nothing left to try. See Create and manage SSH keys.
  • Update the system from the first login: sudo apt update && sudo apt upgrade.
  • Install only what is needed: every extra package is extra attack surface. The "SSH server + utilities" choice is already a good minimum.
  • Do not re-enable the root account with a password "to make life easier": sudo is there for that.

Troubleshooting

The most common problems after a first installation are simple to fix.

SymptomLikely causeSolution
The machine reboots into the installerInstallation medium not removedEject the ISO / the stick, or fix the BIOS boot order
Cannot connect over SSH"SSH server" task not ticked at install timeLog in locally, then sudo apt install openssh-server
pgrep sshd returns nothingThe SSH server is not installedCheck with dpkg -l openssh-server, otherwise install it
sudo answers "is not in the sudoers file"Root password not left empty at install timeLog in as root and add the user: usermod -aG sudo <user>
No IP addressNetwork not configured with DHCPCheck /etc/network/interfaces or the cable/network bridge
Keyboard types the wrong charactersWrong layout chosensudo dpkg-reconfigure keyboard-configuration

Key points

  1. The Debian 13 netinst image is enough: it downloads up-to-date packages and ships the firmware.
  2. Leaving the root password empty locks root and gives sudo to the first user: it is the recommended option.
  3. For a server, "All files in one partition" is the safest layout to start with; LVM and separate partitions come later.
  4. At the software selection, untick the desktop and tick "SSH server"; validate with Tab then Continue, never Enter on a line.
  5. The "SSH server" task installs a persistent sshd service: check it with pgrep -l sshd and ss -tlpn (port 22 listening).
  6. After the installation: SSH keys, updates, minimalism.

Next steps