Deploy a pinned forge to Hetzner Cloud (#16200)
A pinned forge can run in your own Hetzner Cloud project the way it runs on DigitalOcean: one server, one volume as FORGE_DATA, and a version that moves only when you press Update.
- Make a token. In the Hetzner Cloud console open the project, Security → API tokens, and make a token with Read & Write. Hetzner scopes a token to one project and offers nothing narrower, and a read-only token can only check a forge, never make one.
- Attach it. Settings → Cloud accounts (
/settings/cloud), provider Hetzner Cloud, then allow writes on the account. The token is sealed; it is opened for one call at a time. - Deploy. Any door takes the account as
hetzner/<name>and the name the forge is served on: the/deploy-tolist ("Hetzner Cloud / main") and its Hostname field, the terminal's Pinned forges screen (src/tui/screens/pinned.ts:d, thenacme forge.acme.com hetzner/main alice/shop https://… v1.0.0), the HTTP and MCPtargethetznerwithhost. - Keep the claim link. The answer shows it once: it is the only way to become the new forge's first admin, it works once and for 7 days, and this forge keeps only its hash. Hand it to the person the forge is for.
- DNS. With a Cloudflare account that allows writes and a domain for deployed forges (
pinned-forge.md, "Pay and go"), the forge writes the record itself and there is nothing to create; otherwise create the record the answer names,<host> A <address>, DNS only. The server then gets its own certificate and the forge answers athttps://<host>/; Check says what it is still waiting for.
What it makes
- The place is the deploy's:
hetzner:<location>:<type>from the Places catalog (pinned-forge.md, "Where it is made"), named by theplacefield or, left out, the catalog's default for the small plan, which is the cheapest orderable place in the United States. A Nuremberg place, such ashetzner:nbg1:cx23, costs about a third of a US one for ten times the traffic, and is named on purpose. The server and its volume are made in that location; no location or type is named in the code. ARM types are never offered: the boot is x86. - A 10 GiB volume, attached and automounted at
/mnt/HC_Volume_<id>. Update deletes the server and makes a new one on the same volume; the data is not touched. - The server is made with a throwaway SSH key (made and deleted per create), so Hetzner never emails a root password; the machine accepts no password, no root login and nothing on port 22, and opens only 80 and 443. See "What the booted machine is" in
pinned-forge.md. - The address is read back from the server, for the DNS record; the forge itself is served only on its name over HTTPS, by Caddy from Ubuntu's own packages, as on DigitalOcean.
- A replaced server (Update, Roll back, a new claim link) has a new address: change the record to the one Check names.
When the place is not orderable
A place the catalog says is sold out, unknown, or another provider's stops the deploy before it makes anything and says so ("hetzner:nbg1:cx23 cannot be ordered now: sold out at this datacenter right now"). A replace of a running forge whose recorded place has since sold out is refused the same way, with the running server untouched. Nothing is billed; pick another place or try again later.
The audit
Cloud accounts → Audit lists a Hetzner volume attached to no server, and a powered-off server (still billed), priced at the server type's price in the server's own location.
Not checked here
The /server_types price shape and /datacenters server_types.available that the Places catalog reads were written from the Hetzner API reference as recalled; this sandbox cannot reach docs.hetzner.cloud, so a first real deploy is the check. A shape that differs leaves the place unlisted, and a deploy to it is refused rather than ordering a guess.