Docs / Multi-Cloud Runners / Hetzner

Self-hosted CI runners on Hetzner

Provision Hetzner Cloud runners from the Ferro dashboard, or connect any Hetzner cloud or dedicated server yourself. Either way, the runner needs no inbound ports.

Two ways to connect Hetzner

  • From the dashboard (Solo, Team, and Scale plans): Ferro creates the server through the Hetzner Cloud API, closes its firewall, and installs the agent. Autoscaling pools build on the same integration.
  • Yourself (every plan, including Free): create any Hetzner cloud or dedicated server and install the agent with cloud-init or the generated bootstrap script. Ferro never sees your Hetzner credentials.

1. Pick a server type

Runs execute directly on the server, so size it for the jobs you run at the same time. The cost calculator assumes roughly 2 vCPU per concurrent job and models these Hetzner types:

Server typeCPUIsolationJobs at oncePrice per month
CX334 vCPU · x64Shared vCPU2€8.99 (about $10.43)
CX438 vCPU · x64Shared vCPU4€16.49 (about $19.13)
CAX214 vCPU · arm64Shared vCPU2€10.99 (about $12.75)
CAX318 vCPU · arm64Shared vCPU4€21.49 (about $24.93)
CPX428 vCPU · x64Shared vCPU4€69.99 (about $81.19)
CCX338 vCPU · x64Dedicated vCPU4€138.99 (about $161.23)
AX428 vCPU · x64Dedicated bare metal4€99.00 (about $114.84) + €49.00 setup

Hetzner list prices as of 2026-11-25, in EUR excluding VAT, with USD converted at 1.16. Sources: cloud/cost-optimized, cloud/regular-performance, dedicated-rootserver/ax42.

Check availability before you budget

Hetzner has restricted new cloud orders since June 2026 and provider prices change. Confirm live availability and pricing in your Hetzner account. If you cannot get capacity, the same agent runs on any other Linux host.

2. Provision a server from the dashboard

Available on the Solo, Team, and Scale plans.

  1. In the Hetzner Cloud Console, create an API token with Read & Write permission in the project that should hold your runners.
  2. In Ferro, open Settings → Cloud Providers Vault and save the token. It is encrypted with AES-256-GCM and only ever shown back as a masked preview.
  3. Open Fleet Nodes, choose Provision Hetzner VPS, pick a location and server type from the live Hetzner catalog, and confirm with Provision server.

Ferro then sets the server up for you:

  • It attaches a managed firewall with no inbound rules. SSH stays closed unless you allow specific address ranges.
  • Its cloud-init config exchanges a single-use, 30-minute enrollment code for the node token, so no long-lived token sits in the server's user data.
  • It blocks the cloud metadata endpoint (169.254.169.254) for non-root users, so CI jobs cannot read it.
  • It downloads and verifies ferro-agent, creates the unprivileged ferro-job user and the systemd service, and starts the agent in Relay Mode.

The node turns online in Fleet Nodes once the agent registers.

3. Add an autoscaling pool

With a Hetzner token saved, the Hetzner Autoscaling Pools panel on Fleet Nodes can add ephemeral servers when queued runs exceed the pool's capacity and remove them when they sit idle. A pool has a location, a server type, a minimum and maximum node count, an idle timeout, and a hard monthly spend cap in EUR.

  • Scale-up stops when the next server hour would exceed the cap, or when live Hetzner pricing cannot be fetched.
  • Hetzner bills in whole hours, so an idle ephemeral server is kept until about 55 minutes of its current billed hour have passed. You already paid for that time, and it stays warm for the next burst.
  • Servers you registered yourself and servers with running jobs are never removed.

Autoscaling has to be switched on for the control plane you use. If the panel shows Kill switch off, pools can be configured but do not scale yet.

4. Or connect a server you created yourself

This works on every plan and for dedicated servers too. In Fleet Nodes, choose Add Linux server and copy the one-time frn_... token. Ferro stores only its SHA-256 hash.

For a Hetzner Cloud server, save the config below as ferro-cloud-init.yaml, replace https://ferro.example.com with your control plane URL and frn_YOUR_NODE_TOKEN with the token, then create the server with it as user data:

ferro-cloud-init.yaml (Ubuntu 24.04 user data)
#cloud-config# Ferro BYO-Metal Runner — Ubuntu 24.04 cloud-init (DigitalOcean, Vultr, OVHcloud, Hetzner Cloud)package_update: truepackages:  - curl  - ca-certificates  - git  - nftables  - polkitdruncmd:  - |    set -euo pipefail    # Block cloud metadata service (169.254.169.254) for non-root UIDs    nft add table inet ferro_metadata_guard    nft 'add chain inet ferro_metadata_guard output { type filter hook output priority 0; policy accept; }'    nft flush chain inet ferro_metadata_guard output    nft add rule inet ferro_metadata_guard output ip daddr 169.254.169.254 meta skuid != 0 reject    # Run your Control Plane's hosted verified installer (SHA-256 + Cosign, LoadCredential, Polkit, OS sandbox)    export FERRO_CONTROL_PLANE="https://ferro.example.com"    export FERRO_NODE_TOKEN="frn_YOUR_NODE_TOKEN"    export FERRO_LABELS="linux,cloud-init"    export FERRO_MAX_CONCURRENCY="4"    curl -fsSL --proto '=https' --tlsv1.2 "${FERRO_CONTROL_PLANE}/install-agent.sh" | bash
Create the server with the hcloud CLI
hcloud server create \  --name ferro-runner-hel1-01 \  --type cax31 \  --image ubuntu-24.04 \  --location hel1 \  --user-data-from-file ferro-cloud-init.yaml

For a dedicated server, install Ubuntu 24.04, then run the bootstrap script that Fleet Nodes generated as root. Details are in Agent Install & systemd.

A server you create yourself has no Hetzner firewall until you add one. Ferro needs no inbound access: a Hetzner Cloud Firewall without inbound rules closes the server while leaving outbound traffic open.

5. Check that the runner is online

Within a few seconds of the service starting, the node turns online in Fleet Nodes. If it does not, connect over SSH or the Hetzner console and check the service:

Check the agent service, its logs, and the local health endpoint
sudo systemctl status ferro-agentsudo journalctl -u ferro-agent -n 50 --no-pagercurl -kfsS https://127.0.0.1:7420/health

Still offline? See Troubleshooting.

Next steps