How To Install Debian 12 on Hetzner Root Server

1. Buy a Dedicated Server

Hetzner has various offers for dedicated servers. Further information can be found here.

After the purchase you will receive an e-mail from Hetzer containing your IP address, username and temporary root password.

Change the password the first time you connect to the server! This will prevent unwanted access.

2. Connect via SSH

To connect to the server, we use SSH. A protocol to connect to the command line of Remote Servers.

ssh root@11.22.33.44

If the server is accessible and SSH is active, you will be asked to enter a password. We use the password that Hetzner sent us by e-mail.

3. The ``rescue system''

With Hetzer, when you connect to a server for the first time, you are taken to the so-called ``rescure system''. This is a minimal operating system that only works via basic functionalities. From there you can, just to name a few: The network can be configured, the hard disks can be set and, most importantly, an ISO can be selected.

4. Installation of Debian

As described above, a fresh dedicated server boots from Hetzer into the rescure system. To install an operating system, simply execute the following in the command line:

installimage

This starts a wizard that makes it possible to select a range of operating systems. Among them:

  • Debian

  • Ubuntu

  • CentOS

  • Arch Linux

  • CentOS Stream

  • AlmaLinux

  • Rocky Linux

  • Other

  • Old images

  • Custom Image

Since we are using a Debian system, we select Debian here.

As version, we use Debian 12 (Bookworm)

We confirm with OK

installimage Config File

A text editor opens with a file: installimage config file.

All configurations relating to the hardware can be made here.

We do not make many changes to the standard configuration. It is generally already set very well. The only thing we set is the ``SOFTWARE RAID'' setting. We have two hard disks. To provide data security, we set RAID 1 as the system. This means that the SSDs are mirrored, and we have a plan B should one disk fail or break.

It is also possible to set the hostname of our server straight away. In this case, we choose lugbz1. To do this, simply change the preferred name of the server under HOSTNAME.

5. The Installation

Once all configurations have been set, we click ESC to save and close the file.

If the settings are correct, the operating system (in this case Debian 12) will be installed.

VoilĂ ! After the installation, the freshly installed Debian 12 is restarted and you can log in to the server with the same access data.

6. Move on to the Setup!

Now that the system has been installed, the first server setup things should be configured. Further steps on how we proceeded can be found here: https://docs.lugbz.org/server-setup.html