Skip to main content
Hetzner API credentials store your Hetzner Cloud API token, used when provisioning and managing Hetzner clusters. The token is validated against the Hetzner API on creation.
Don’t have a Hetzner account? Sign up for Hetzner Cloud to get started.

Creating a Hetzner API Credential

1

Get a Hetzner API Token

  1. Log in to the Hetzner Console
  2. Select your project
  3. Go to SecurityAPI Tokens
  4. Click Generate API Token with Read & Write permissions
  5. Copy the token (it’s only shown once)
2

Add to Ankra (UI)

Go to CredentialsAddHetzner, enter a name and paste your API token.
3

Or via CLI

ankra credentials hetzner create --name my-hetzner-token
# You will be securely prompted for the API token
For self-managed Hetzner clusters you also need an SSH key credential.

Listing Hetzner Credentials

ankra credentials hetzner list
curl https://platform.ankra.app/api/v1/credentials/hetzner \
  -H "Authorization: Bearer $ANKRA_API_TOKEN"