The following guide will result in a fully setup Proxmox environment on a Hetzner dedicated server with additional IPs and subnets imported from the Hetzner Robot API via script
What does this script do?
- Install Proxmox on your server
- Let’s Encrypt Certificate for the Proxmox-Interface
- Option to use Thin-Pool Storage
- Read the Server-IPs (Single-IP and Subnet) from the Hetzner-Robot
- Write the Network-Config
- Option to create private IPs if you use a vSwitch
Please note:
If you would like to use a Thin-Pool for Proxmox, run the below (make your customizations):
PART lvm pve all
LV pve root / ext4 10G
Preperation
Begin by installing the minimal Debian-Stretch or Debian-Buster using the Rescue option via the Robot interface in Hetzner.
Once installed, set a hostname or FQDN on your host machine – this can be done by editing two files:
nano /etc/hostname
nano /etc/hosts
After changing the hostname, restart your host.
Once rebooted, proceed to download the script as follows:
apt -y update
apt -y install php-cli php-curl wget
cd /root
wget https://download.schaal-it.net/hetzner-proxmox.tgz
tar xfz hetzner-proxmox.tgz
cd proxmox
Now to prepare the Proxmox Enviroment:
php install-proxmox.php
Upon running the script, it will check and verify your OS and also show the Proxmox version:
Detected OS: Debian Buster
Install Proxmox-Version: 6.x
The script will proceed to ask the following questions:
Full qualified hostname (FQDN) of the server [server]:
Make sure to use the full FQDN you set earlier (i.e host.example.com) otherwise Let’s Encrypt will not work!
IP of the server [100.150.0.100]:
The IP should be already populated by default, if not, then add your host IP.
Network Card [enp0s31f6]:
Your network card may be of a different name for example, eth0, eth1, etc.
Do you want to autoconfigure the network? (y,n) [y]:
To automatically import additional IPs and/or subnets, chose “Y” and continue to input your Hetzner Robot API credentials:
Enter your credentials for the Hetzner-API
robot_url [https://robot-ws.your-server.de]:
robot_user []:
robot_password []:
Next, you will be asked if you would like to enable Thin-Pool:
Enabled Thin-Pool for Proxmox? (y,n) [n]:
If you have chosen to install a Thin-Pool, it will say the following:
Only one LV found - using pve
Use LV Name for Proxmox Thin-Pool - 'none' to skip [data]:
You will be asked to permit SSH and on what port, it is advised to keep this as default:
SSH Port [22]:
SSH PremitRootLogin [yes]:
Let’s Encrypt
Now an SSL certificate can be installed. Input your email for the script to continue and challenge ACME:
Email to use with Let's Encrypt and in scripts [[email protected]]:
Use Let's Encrypt for the Interface (y,n) [y]:
Installation
This step will initiate the Proxmox Install:
Start Proxmox Install? (y,n) [y]:
Once this finalizes, you will be able to access your Proxmox environment using https://yourdomain.com or using your host IP with port 8006
vSwitch
If you use a vSwitch, proceed with the script:
This server is connected to the vswitch with the ID 4868 [4001]
Add the vswitch to the network-config? (y,n) [y]:
Use Private IP []:
Use Private IP []:
Netmask [24]:
After setting your vSwitch, reboot your host, once restarted you can access your Proxmox environment again via https://yourdomain or using your host IP with port 8006.
If you have any questions, leave a comment and I’ll be sure to get back to you!
Credits: schaal-it.com