Cloudmin installation on Hetzner Root Server
This is an article and documentation at the same time on how to install the virtualization software “virtualmin/cloudmin” onto a Hetzner Root Server.
This can be challenging at some points which is related to Hertzners way of networking.
The following article/procedure is assuming of you having one ethernet eth0 with several additional ip addresses ordered via the robot login.
OS image
First, you have to go to the rescue console of the root server and install an operating system (OS) of your choice. Experience has shown that Ubuntu or Debian will work fine. CentOS can be installed but the configuration is even more tricky.
Update
Update your OS using the following commands:
apt-get update
apt-get upgrade
Reboot
When the updating and upgrading process is done, reboot your system.
Get Cloudmin Script
Now, download the cloudmin script under the /tmp folder: https://www.webmin.com/cinstall-kvm.html
Type following commands in the following order:
- wget https://cloudmin.virtualmin.com/gpl/scripts/cloudmin-kvm-debian-install.sh
- cd /tmp
- chmod +x cloudmin-gpl-debian-install.sh
Install the Script
Install cloudmin via the script:
./cloudmin-gpl-debian-install.sh
Reboot again
Post successful install, reboot OS to be sure all is ok. You should be able to login to the cloudmin gui via https://server-ip-adress:10000
FQDN
It is always good to setup a FQDN or hostname on the server, but you can do this now.
Network Config – Hertzner Specific
This specific config needs to be done on the hetzner servers for it to work, nano into this file(/etc/sysctl.conf) and add appropriate flags. Save the file.
- sysctl -w net.ipv4.ip_forward=1
- Forwarding for IPv6 needs to be activated as well. This setting is also already in the Hetzner default installation and needs to be changed.
- sysctl -w net.ipv6.conf.all.forwarding=1
- Reboot the OS.
Bridge Network
We have to configure the bridge networking as per the config settings described here (https://www.virtualmin.com/documentation/cloudmin/virtualization/kvm)
Network Config
For KVM instances to access the host system’s network, you must setup a network bridge. These instructions assume that your host system has only one network interface, and it is eth0 .
This changes your system from using eth0 for it’s primary network interface, to br0, a bridge device, You will want to make a backup of your current network configuration before making these changes. It is also highly recommended to have console access to your server when the changes are being made. If something goes wrong network access can be lost.
- Go to Webmin -> Networking -> Network Configuration -> Network Interfaces, and select the ** Activated at Boot** tab.
- Click on eth0 and change the IPv4 address to No address configured. Remember the current IP address and netmask, as they will be needed in the next step. Click the Save
- Click Add a new bridge, and fill in the IP address and netmask that used to be assigned to eth0.
- In the Connect bridge to interface field select eth0, then click Create.
- Return to the main page of the Network Configuration module, and click on Routing and Gateways . Find the current default IPv4 gateway from the Active configuration tab, and enter it on the Boot time configuration tab with br0 selected as the interface.
- Go back to the main page of the Network Configuration module, and click the Apply Configuration
Screenshots
Note that after the above steps. the eth0 device will no longer have an IP address; the br0 device has the IP after bridging is operational.
- If you have an IPv6 address, you will want to perform the above steps for the IPv6 address as well.
- Screenshots below to show my settings..