Hetzner Provider
Hetzner Cloud and Robot API integration, setup, and available resources.
Hetzner Provider
Overview
The Hetzner provider integrates with both the Hetzner Cloud API (for cloud instances) and the Hetzner Robot API (for dedicated servers). This dual integration gives you access to affordable cloud instances for development and testing alongside dedicated hardware for production workloads.
Setup
1. Generate API Token
- Log in to the Hetzner Cloud Console
- Select your project
- Navigate to Security > API Tokens
- Generate a new token with Read & Write permissions
2. Robot API Credentials (Optional)
For dedicated server management:
- Log in to Hetzner Robot
- Navigate to Settings > Webservice and app settings
- Generate API credentials
3. Configure AgentMetal
export HETZNER_API_TOKEN=hcloud_xxx
export HETZNER_ROBOT_USER=user # optional
export HETZNER_ROBOT_PASSWORD=pass # optional
Or in the configuration file:
providers:
hetzner:
enabled: true
api_token: "hcloud_xxx"
robot_user: "user"
robot_password: "pass"
Available Server Types
Cloud Instances
| Type | vCPUs | RAM | Disk | Price/mo |
|---|---|---|---|---|
| cx11 | 1 | 2 GB | 20 GB | ~3.29 EUR |
| cx21 | 2 | 4 GB | 40 GB | ~5.83 EUR |
| cx31 | 2 | 8 GB | 80 GB | ~10.49 EUR |
| cx41 | 4 | 16 GB | 160 GB | ~17.49 EUR |
| cx51 | 8 | 32 GB | 240 GB | ~29.99 EUR |
Dedicated server availability varies. Use the provider API to list current offerings.
Locations
| ID | Name | Country |
|---|---|---|
| fsn1 | Falkenstein | Germany |
| nbg1 | Nuremberg | Germany |
| hel1 | Helsinki | Finland |
Rescue Mode
Hetzner supports booting servers into rescue mode for recovery:
# The instance agent uses rescue mode during healing
agentmetal instance get inst-abc123 # Check if rescue is available
Floating IPs
Floating IPs can be assigned to any server in the same location:
# Managed automatically by the load balancer and DNS agents
Can also be managed via the provider API
curl -H "$AUTH" $API/v1/providers/hetzner/floating-ips
Volumes
Block storage volumes can be attached to cloud instances for additional storage beyond the root disk.
Limitations
- Cloud instances are virtual, not bare-metal (use Robot for dedicated hardware)
- Robot API provisioning takes longer than Cloud API (hours vs. minutes)
- Locations limited to Germany and Finland