Public: anyone can read this; the crew can change it.

Hetzner Cloud is a cloud account provider and a pinned-forge target #16200

shipped production is serving it opened this has it

Landed in pull #16201 · run

opened this

The owner has a Hetzner account and a read-write project token ready, and wants to test a standalone forge on Hetzner as soon as possible. Today cloud accounts accept eight providers and pinned forges deploy only to DigitalOcean; Hetzner is a declared cloud.json vendor (CLOUD_VENDORS in src/apps/manifest.ts) with no provider behind it.

What done looks like:

  1. Provider. hetzner in PROVIDERS and VENDOR_OF (src/cloud/providers.ts): attach, verify, rotate, rename, remove, allow_writes and audit all work, on the cloud accounts page and through the cloud_account tool. Verify is a read against the fixed host api.hetzner.cloud with the bearer token. A Hetzner token is scoped to one project and is read or read-write, nothing narrower; say that where the page explains what the token can do.
  2. Driver. A sibling of src/cloud/droplet.ts with the same shape (plain data in and out, caller owns token and fetch, token only in the Authorization header, no secret in the boot script, each remote id recorded the moment it exists so a retry finishes a half-made forge). Create one volume and one server with the same cloud-config boot (Bun at the pinned version, pinned source, systemd unit, FORGE_APP_DATA on the volume), read back the public IPv4, and on Update replace the server while the volume stays. Hetzner mounts an attached volume under /mnt/HC_Volume_<id> when automount is asked for; confirm the mount path and the create calls against Hetzner's current API reference rather than this note. Location and server type are constants like REGION and SIZE are today; pick a US location and the smallest type with 2 GiB that is in stock, from the API's own list.
  3. Target. A hetzner entry in TARGETS (src/cloud/targets.ts) with status first, and pinned_forge deploy, update, rollback and check accept target: "hetzner". The pinned page offers Hetzner wherever it offers DigitalOcean (src/web/pinned.ts filters to digitalocean today; src/http/pinned_routes.ts hard-codes it).
  4. Only one. Where DigitalOcean and Hetzner share logic (boot config, the provision / replace / read sequence, the half-way hooks), it lives once and each provider supplies only its calls.

Proof: tests against a recorded fetch for provision, a failure after the volume exists then a retry, replace keeping the volume, and verify refusing a bad token. Then one real deploy with the owner's token: a forge answers on its address and /first-admin claims it; an Update replaces the server and the data is still there.

Not in this change: wiring a Stripe purchase to a pinned deploy, DNS names and TLS for the new forge, backups. Those follow once a forge boots on Hetzner.

commented

Correction to the brief, from Hetzner's own pricing pages read on 2026-11-23: do not pick a US location. Since the June 2026 price change, Hetzner's US locations cost about three times its EU ones for the same size (US CPX31 4 vCPU / 8 GB is €62.99; Germany CX33 at the same size is €8.99) and include 1–4 TB of traffic instead of 20 TB. The default is an EU location (Nuremberg, Falkenstein or Helsinki) and a cost-optimized shared type (the CX line; CX23 is 2 vCPU / 4 GB at €5.99). Those types showed "currently unavailable" on the public page that day, so the driver reads the server types and their availability per location from the API and picks the cheapest available type with at least 2 GiB, and says plainly on the pinned page when none can be ordered instead of failing mid-deploy. Location stays one constant that a setting can later replace.

Keep point 4 (the shared sequence lives once) firm: a third provider is likely to follow, and it should cost only its API calls.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs