Keys / Hetzner Cloud
HCLOUD_TOKEN
The Hetzner Cloud API token your tools manage one project's servers, volumes and load balancers with.
- Expires
- the docs don't say
- API
- none; Hetzner Console only
Get it
Create one on console.hetzner.com. The steps aren't recorded yet.
Set it
HCLOUD_TOKEN=...
The hcloud CLI, the Terraform provider, the Kubernetes cloud controller manager and the CSI driver read it. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- In the Hetzner Console, open the project, then Security > API tokens > Generate API token. Give it the same permission as the old one: Read or Read & Write. It's shown only once.
- Deploy it everywhere that reads
HCLOUD_TOKEN. WhenHCLOUD_TOKENis set,hclouduses it instead of the active context's token. - Check that nothing still uses the old token, then delete it.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.