# Create a Hetzner API token

> To connect Hetzner, InfraNest needs an API token from your Hetzner project. The same token covers your cloud resources and your DNS zones.

Source: https://infranest.io/docs/create-a-hetzner-api-key
Last updated: 2026-10-26

---

Learn how to create the API token InfraNest needs to connect to your Hetzner project — useful for anyone setting up Hetzner cloud resources or DNS in InfraNest.

## Overview

- InfraNest needs an API token from your Hetzner project to connect to your account.
- The same token covers both your cloud resources and your DNS zones, so you only need to create it once.
- You'll create this token in the Hetzner Cloud Console, then paste it into InfraNest.

## Create the token

1. Sign in to the **Hetzner Cloud Console**.
2. Open your project, then go to **Security → API Tokens**.

   <!-- manual-screenshot: create-a-hetzner-api-key-1 — taken by hand in the Hetzner Cloud console; the capture rig cannot reach it -->

   <!-- docs-screenshots:start:create-a-hetzner-api-key-1 -->

   ![Create a Hetzner API token (1)](/media/ec485293-9249-4829-b083-3951a3e7e701)

   <!-- docs-screenshots:end:create-a-hetzner-api-key-1 -->
3. Select **Generate API Token**, give it a name (like "InfraNest"), and choose **Read & Write**.

   <!-- manual-screenshot: create-a-hetzner-api-key-2 — taken by hand in the Hetzner Cloud console; the capture rig cannot reach it -->

   <!-- docs-screenshots:start:create-a-hetzner-api-key-2 -->

   ![Create a Hetzner API token (2)](/media/68554259-7062-45aa-bd92-1f0b78dc7b41)

   <!-- docs-screenshots:end:create-a-hetzner-api-key-2 -->
4. **Copy the token now** — Hetzner shows it only once.

> [!WARNING]
> Choose **Read & Write**, not Read. A read-only token can see your resources but can't manage them.

## Next step

Go back to InfraNest and follow **Connect Hetzner** to paste the token.
