Dedicated Root Server

I have a Dedicated Root Server on hetzner.com, and I am using it for several applications, installed in Docker and LXC (Incus) containers.

I will try to describe all the steps for installing and managing it.

1. Install

We can boot the server in the rescue mode, and use installimage to install Debian on it. This video shows how to do it.

The server has two disk drives: /dev/nvme0n1 and /dev/nvme1n1. By default the software RAID is enabled, with the option "SWRAID 1" and "SWRAIDLEVEL 1". With this configuration the disks work as a mirror of each-other. This is a robust configuration, because if one of the disks fails, the server will still continue to run. When the broken disk is replaced, it will be mirrored automatically.

However we are going to disable the RAID by setting "SWRAID 0". As a result, the operating system will be installed only on the first disk, and the second one will be free. We will use it later as a storage for the Incus containers.

This choice allows us to have more available disk space, but it also makes our system more vulnerable to disk failures. If one of the disks fails, the whole system is corrupted and everything needs to be reinstalled from scratch. For this reason, we will make sure to have proper backups of everything, so that we can restore easily in case of a disaster. We will also use scripts for installing different apps, so that the installation is repeatable and reinstallation does not take a long time.

I prefer to disable IPv6, by setting the option "IPV4_ONLY yes". It is also possible to set the HOSTNAME in the configuration file. After these modifications, the configuration settings should look like this (without the comment lines):

DRIVE1 /dev/nvme0n1
#DRIVE2 /dev/nvme1n1
SWRAID 0

HOSTNAME server1
IPV4_ONLY yes
USE_KERNEL_MODE_SETTING yes

PART /boot/efi esp 256M
PART swap swap 32G
PART /boot ext3 1024M
PART / ext4 all

IMAGE /root/.oldroot/nfs/install/../images/Debian-1201-bookworm-amd64-base.tar.gz

Once we save and close the configuration file (by pressing ESC), installimage will start the installation. After reboot, we can access the server with the same password that we accessed the rescue system.

On the new system we can find the files /installimage.conf and /installimage.debug.