This tutorial shows how to install a Debian 11 – Bullseye – minimal server in detail with many screenshots. The purpose of this guide is to provide a minimal setup that can be used as the basis for our other Debian 11 tutorials here at howtoforge.com.

1 Requirements

To install a Debian 11 server system you will need the following:

I will use the Debian 11.3 64Bit (amd64) installation media.

The Debian Download links change regularly. If the above links do not work anymore, then go here to fetch the latest Debian netinst image: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/.

2 Preliminary Note

In this tutorial, I will use the hostname server1.example.com with the IP address 192.168.0.100 and the gateway 192.168.0.1. These settings might differ for you, so you have to replace them where appropriate.

3 The Debian Base System

Insert your Debian 11 (Bullseye) network installation CD into your system (or a USB drive where you installed the iso file) and boot from it. When you use virtualization software like VMware or Virtualbox, then select the Debian 11 minimal iso file as the source file for the DVD drive of the VM, you don’t have to burn it to a CD or DVD for that first.

Select Install (this will start the text installer – if you prefer a graphical installer, select Graphical install):

<img alt="Debian 11 Boot Screen" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-1.png62b1db0da9458.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="480" loading="lazy" src="data:image/svg xml,” width=”640″>

Select your language:

<img alt="Choose Debian installation language" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-2.png62b1db0dc87eb.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Then choose your location and select the keyboard layout. the next screens will differ depending on your choices. Just select which country and keyboard layout are the right ones for you as they define the language that your Debian system will use on the shell and which keyboard layout is used. In my case, I’ll have a german keyboard layout but prefer English as the language on the shell.

Select Country, territory, or area:

<img alt="Select server location / country" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-3.png62b1db0e033b0.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Select your location, territory again, and locale and keyboard:

<img alt="Continent or region" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-4.png62b1db0e27c5d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Select country" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-5.png62b1db0e46e05.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Configuring the locale" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-6.png62b1db0e642c4.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Select and set the keymap" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-7.png62b1db0e9200a.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

The installer checks the installation CD and your hardware and configures the network with DHCP if there is a DHCP server in the network:

<img alt="Loading additional components" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-8.png62b1db0ebee67.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Configure network using DHCP" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-9.png62b1db0f12c9a.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Enter hostname. In this example, my system is called server1.example.com, so I enter server1:

<img alt="Hostname configuration" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-10.png62b1db0f42142.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Enter your domain name. In this example, this is example.com:

<img alt="Configure and set the domain" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-11.png62b1db0f75192.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Afterward, give the root user a password:

<img alt="Enter the root password" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-12.png62b1db0fc3590.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Confirm that password to avoid typos:

<img alt="Confirm root password" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-13.png62b1db100b9fc.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Create a Linux user account, e.g. your name or nickname. For this example installation, I will choose the name “administrator” with the user name administrator (don’t use the user name admin as it is a reserved name on Debian Linux):

<img alt="Enter real name of the user" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-14.png62b1db103c9e9.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Choose a username" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-15.png62b1db106c858.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Set the password" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-16.png62b1db10abe4d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Confirm the password" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-17.png62b1db10e2b35.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Now you have to partition your hard disk. For simplicity’s sake, I select Guided – use entire disk – this will create a large partition for the / file system and another one for swap (of course, the partitioning is totally up to you – if you know what you’re doing, you can also set up your partitions manually). For hosting systems like the ISPConfig 3 perfect server tutorials you might want to choose e.g. 60GB for / and a large /var partition as all website and email data is stored in subdirectories of /var.

<img alt="Loading additional components" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-18.png62b1db1122549.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Partition method" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-20.png62b1db1165e03.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Select the disk that you want to partition:

<img alt="Select Disk partition" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-21.png62b1db11b877f.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Then select the partitioning scheme. As mentioned before, I select All files in one partition (recommended for new users) for simplicity’s sake – it’s up to your likings what you choose here:

<img alt="Partition scheme" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-22.png62b1db120bc6b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

When you’re finished, select Finish partitioning and write changes to disk:

<img alt="Finish partitioning" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-23.png62b1db125658b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Select Yes when you’re asked: “Write changes to disk?”:

<img alt="Write partitions to disk" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-24.png62b1db12a518b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Afterward, your new partitions are created and formatted. Now the partitions are created and the base system is installed:

<img alt="Creating Partitions and installing the base system" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-25.png62b1db12e18b5.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

It might be that the following screen pop’s up, depending on your install media. I will do a network-based installation (all additional installation packages get downloaded from the internet), so I choose here to not scan any additional install disks.

<img alt="Scan installation media" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-27.png62b1db1329318.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Next, you must configure apt. Because we are using the Debian Netinstall CD, which contains only a minimal set of packages, we must use a network mirror. Select the country where the network mirror that you want to use is located (usually this is the country where your Server system is located):

<img alt="Configure apt country" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-28.png62b1db136874e.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Then select the mirror you wish to use (e.g. deb.debian.org):

<img alt="Select Debian mirror" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-29.png62b1db139eae1.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Unless you use an HTTP proxy, leave the following field empty and hit Continue:

<img alt="Configure apt proxy" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-30.png62b1db13cda59.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Apt is now updating its packages database:

<img alt="apt downloads packages" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-31.png62b1db141b5dd.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

You can skip the package usage survey by selecting No:

<img alt="skip package survey" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-33.png62b1db147e6ea.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

We just select Standard system utilities and SSH server (so that I can immediately connect to the system with an SSH client such as PuTTY after the installation has finished) and hit Continue.

Some might argue that one should not install the Standard System Utilities on a minimal server but in my opinion, you will need most of the standard utilities later anyway so I will install them on this server as part of the base setup.

<img alt="Software selection" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-34.png62b1db14b0524.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

The required packages are downloaded and installed on the system:

<img alt="Select and install software" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-35.png62b1db14e8954.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

When you’re asked to Install the GRUB boot loader to the master boot record?, select Yes:

<img alt="Install GRUB in MBR" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-36.png62b1db152485f.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

The installer might ask you which partition Grub shall be installed to. This server has just one hard disk, so I choose /dev/sda here.

<img alt="Select device for boot loader installation" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-37.png62b1db1556e77.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Press enter and the Installer will install Grub and finishes the installation.

<img alt="Installing GRUB boot loader" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-38.png62b1db15a6756.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

<img alt="Finishing the Debian 11 Installation" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-39.png62b1db15dbc3d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

The base system installation is now finished. Remove the Debian Netinstall CD from the CD drive and hit Continue to reboot the system:

<img alt="Installation complete" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-40.png62b1db162250b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

The first boot of the newly installed Debian 10 server: first you will see the boot screen of the Grub Boot Loader, press enter or wait a few seconds, the boot process will continue automatically.

<img alt="Booting Debian 11" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-booting.png62b1db165b26b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="480" loading="lazy" src="data:image/svg xml,” width=”640″>

A few seconds later the login prompt should show up.

<img alt="Debian 11 (Bullseye) server first boot" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/debian-11-server-login.png62b1db1691419.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="562" loading="lazy" src="data:image/svg xml,” width=”750″>

Log in with the username “root” and the root password that you have chosen during installation. When you log in by SSH, then use the username “administrator” as the root user is disabled for remote logins. Then run the command “su -“:

su -

To become the root user. It is important that you use the command su with ‘-‘ or use ‘su –login’ as this is required to initialize the PATH variable correctly for the root user.

On to the next step…

4 Install The SSH Server (Optional)

If you did not install the OpenSSH server during the system installation, you could do it now:

apt -y install ssh openssh-server

From now on you can use an SSH client such as PuTTY and connect from your workstation to your Debian Jessie server and follow the remaining steps from this tutorial.

5 Install a shell editor (Optional)

I’ll use nano as my favorite shell text editor, others prefer vi which is not that easy to use for beginners. With the following command I will install both editors:

apt -y install vim-nox nano

(You don’t have to do this if you use a different text editor such as joe or the built-in editor from mc).

6 Configure The Network

You can get your current IP address with the command:

ip a

By default, some network tools might not available. Install the package with:

apt install net-tools

Because the Debian 11 installer has configured our system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100) (please note that I replace allow-hotplug ens33 with auto ens33; otherwise restarting the network doesn’t work, and we’d have to reboot the whole system):

nano /etc/network/interfaces

The interfaces file with DHCP enabled as created by the apt installer:

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface

auto lo

iface lo inet loopback

# The primary network interface

allow-hotplug ens33

iface ens33 inet dhcp

# This is an autoconfigured IPv6 interface

iface ens33 inet6 auto

Or as a screenshot:

<img alt="DHCP Network Configuration" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/network-interfaces.png62b1db16c4f6b.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="326" loading="lazy" src="data:image/svg xml,” width=”750″>

And here is the edited interfaces file with the static IP 192.168.0.100 configured.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto ens33 iface ens33 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1

# This is an autoconfigured IPv6 interface

iface ens33 inet6 auto

The edited file should look like this:

<img alt="Static IP network configuration" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/06/echo/static-ip-network-config.png62b1db171a8e3.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="435" loading="lazy" src="data:image/svg xml,” width=”750″>

Then restart your network:

systemctl restart networking

Then edit /etc/hosts. Make it look like this:

nano /etc/hosts
127.0.0.1       localhost.localdomain   localhost
192.168.0.100   server1.example.com     server1

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Now edit the hostname in case you did not select the final hostname in the installer

nano /etc/hostname

The /etc/hostname file contains the hostname without the domain part, so in our case just “server1”.

Then reboot the server to apply the hostname change:

systemctl reboot

After you logged in again, run:

hostname

hostname -f

To verify that the new hostname is set correctly. The output should be:

[email protected]:/home/administrator# hostname

server1

[email protected]:/home/administrator# hostname -f

server1.example.com

[email protected]:/home/administrator#

7 Update Your Debian Installation

First, make sure that your /etc/apt/sources.list contains the buster/updates repository (this makes sure you always get the newest updates), and that the contrib and non-free repositories are enabled.

nano /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 NETINST 20210814-10:07]/ bullseye main

#deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 NETINST 20210814-10:07]/ bullseye main

deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

# bullseye-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Run

apt update

to update the apt package database and

apt upgrade

to install the latest updates (if there are any).

8 Debian 11 VMWare Server Image

This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox. The virtual machine image uses the following login details:

SSH / Shell Login

Username: administrator

Password: howtoforge

Username: root

Password: howtoforge

The IP of the VM is 192.168.0.100, it can be changed in the file /etc/network/interfaces. Please change all the above passwords to secure the virtual machine.