Where Is the hcloud CLI Config File?
hcloud CLI config.toml with API tokens and contexts on Linux.
Last updated
The Hetzner hcloud CLI stores API tokens and named contexts in config.toml under its XDG config directory. Tokens authenticate full account access, so the file deserves locked-down permissions.
Contexts switch between projects and accounts without re-authenticating. Copy the file to move every context, then verify tokens still work.
Where hcloud stores this, by platform
~/.config/hcloud/config.toml
Holds active context plus tokens per named context. Restrict to your user since tokens grant account control. Copy to migrate contexts; rotate any token that ever leaks.
Frequently asked questions
How do I use multiple Hetzner projects?
Create named contexts in the config above and switch with the context commands. Each context keeps its own token.
Where are hcloud API tokens?
Inside config.toml above per context. Prefer environment variables in scripts so tokens never land in shell history.
Notice an outdated path? Let us know.