Using a Hetzner dedicated server
Install Ubuntu on a Hetzner dedicated server and add it to a cluster as a custom server
Updated
Hetzner's dedicated servers give you a lot of CPU, memory and disk for the price, but they're ordered by the month through Hetzner Robot rather than created on demand, so Hatchbox can't create them for you. Install the operating system, then add the server to a cluster with the Custom provider.
Hetzner Cloud servers are different: they're created on demand, and a cluster using the Hetzner provider creates them for you.
Install Ubuntu
Hatchbox supports Ubuntu 26.04, 24.04, 22.04 and 20.04, and Debian 13 and 12. We recommend the newest Ubuntu LTS your server offers.
- In Robot, open your server and go to Rescue. Activate the Linux rescue system with your SSH key selected, then reset the server from the Reset tab.
- Log in to the rescue system as
rootand runinstallimage. Choose Ubuntu. - In the configuration that opens, add a line so the installed system keeps your SSH key:
SSHKEYS_URL /root/.ssh/authorized_keys. Set the hostname, keep the default software RAID unless you have a reason to change it, then save and let the installation finish. - Run
reboot, and log in again asrootwith your SSH key.
Add the server to Hatchbox
Create a cluster with the Custom provider, or open an existing one, and add a server:
- Public IP: the server's main IPv4 address from Robot.
- Private IP:
127.0.0.1if it's the cluster's only server. With several dedicated servers, you can connect them with a Hetzner vSwitch and enter each server's vSwitch address, or enter their public IPs. Either way, Hatchbox only lets your own servers reach the database ports. - SSH Port: 22, unless you changed it.
Hatchbox logs in as root with an SSH key. On the server's page in Hatchbox, open How to connect a server to Hatchbox, copy the command that adds the Hatchbox SSH key, and run it on the server as root. Then click Test connection. Once it connects, Hatchbox sets up the server: it turns off password logins, configures the firewall and installs what the server's roles need.
Hetzner's firewall
Robot has its own firewall for each dedicated server, off by default. If you turn it on, allow SSH (22) and, on web servers and load balancers, HTTP (80) and HTTPS (443). Hatchbox connects over SSH from the addresses listed in Hatchbox IP Addresses.
What's different from a provider Hatchbox creates servers on
- Deleting the server in Hatchbox only removes it from Hatchbox. Cancel it in Robot when you're done with it.
- Hatchbox can't autoscale a custom server's role, since it can't order new ones.