Projects, tokens and SSH keys
Everything in Hetzner Cloud lives inside a project: Servers, volumes, networks, firewalls, IP addresses and the tokens that manage them. Nothing in one project can see another.
A token reaches one project
Section titled “A token reaches one project”An API token is created inside a project, under Security → API tokens, and reaches only that project. So the token is how you choose where Alchemy deploys. Give it Read & Write access, so Alchemy can create resources, and store it in a profile:
alchemy profile edit --add HetznerSee Setup for the details.
One project per environment
Section titled “One project per environment”Because a token reaches one project, separate projects give you hard isolation. Use one for production and another for everything else, each with its own token and profile:
alchemy profile create prodalchemy profile edit --profile prod --add Hetzneralchemy deploy --stage prod --profile prodMany stages can share the development project, each with its own Servers.
SSH keys
Section titled “SSH keys”A Server is a whole machine, and you sign in to it over SSH. An SSH key registers your public key with the project, so Servers created with it accept your key, and never a password:
const key = yield* Hetzner.SshKey("deploy", { publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI… you@laptop",});See Servers for attaching keys to a Server.
With CI=true, Alchemy skips the profile and reads HCLOUD_TOKEN from the environment. See CI.