# Hetzner

> Run the full Grovs stack on a Hetzner Cloud server, installed by cloud-init on first boot.

Source: https://docs.grovs.io/docs/self-hosting/clouds/hetzner

[Open Hetzner Console](https://console.hetzner.com)

## When to use

You want one Hetzner Cloud server running the whole stack.

## Prerequisites

The [shared VM prerequisites](https://docs.grovs.io/docs/self-hosting/clouds/cloud-vm#prerequisites): fresh Ubuntu 24.04 x86_64, 4 vCPU, 8 GB RAM, 80 GB SSD, public IPv4, SSH key, domain. Hetzner bills you for the server, storage and traffic.

## 1. Prepare DNS and firewall

Create a **Hetzner Firewall** that allows inbound TCP 80/443 from the internet and TCP 22 only from your public IP. Allow outbound traffic. Plan the [DNS records](https://docs.grovs.io/docs/self-hosting/clouds/cloud-vm#1-prepare-dns-and-firewall); you point them at the server's IPv4 once it exists.

## 2. Create the server

1. [Generate the cloud-init file](https://docs.grovs.io/docs/self-hosting/clouds/cloud-vm#with-cloud-init-at-first-boot) on your workstation.
2. In your Hetzner project, create a server with an x86 server type, the plain **Ubuntu 24.04** image and enough disk space.
3. Enable public IPv4, add your SSH public key, and paste the generated file into the **Cloud config** field.
4. Attach the firewall and create the server.

Choose the plain Ubuntu image: the startup script installs the Docker packages it needs. See Hetzner's [cloud-config guide](https://community.hetzner.com/tutorials/basic-cloud-config).

## 3. Install Grovs

Cloud-init installs Docker and the stack on first boot. Connect as `root` to the server's public IPv4 and point the DNS records at it.

## 4. Deploy and verify

Follow the [shared verify steps](https://docs.grovs.io/docs/self-hosting/clouds/cloud-vm#4-deploy-and-verify).

## Upgrades

See the [shared VM upgrade notes](https://docs.grovs.io/docs/self-hosting/clouds/cloud-vm#upgrades).

## Gotchas

If startup fails, read `/var/log/cloud-init-output.log`, fix the error, then run `sudo bash /root/grovs-bootstrap.sh` again. More in the [shared gotchas](https://docs.grovs.io/docs/self-hosting/clouds/cloud-vm#gotchas).
