Create Hetzner Server
API server
https://app.coolify.io/api/v1Create a new server on Hetzner and register it in Coolify. A cloud-init script or extra SSH key IDs need a token with the deploy permission.
Authorization
bearerAuth Go to Keys & Tokens / API tokens and create a new token. Use the token as the bearer token.
In: header
Request Body
application/json
Hetzner server creation parameters
TypeScript Definitions
Use the request body type in TypeScript.
Cloud provider token UUID. Required if cloud_provider_token_id is not provided.
Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.
Hetzner location name
Hetzner server type name
Hetzner image ID
Server name (auto-generated if not provided)
Private key UUID
Enable IPv4 (default: true)
Enable IPv6 (default: true)
Enable Hetzner server backups after creation (adds 20% to the monthly server fee)
Additional Hetzner SSH key IDs. Needs a token with the deploy permission.
Existing Hetzner firewall IDs to apply during server creation
Existing Hetzner network IDs to attach during server creation
Cloud-init YAML script (optional). Needs a token with the deploy permission.
Validate the server and install Docker when it is running. Defaults to true for tokens with the deploy permission, and needs that permission.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.coolify.io/api/v1/servers/hetzner" \ -H "Content-Type: application/json" \ -d '{ "location": "nbg1", "server_type": "cx11", "image": 15512617, "private_key_uuid": "xyz789" }'{ "uuid": "og888os", "hetzner_server_id": 0, "ip": "string"}{ "message": "Invalid token."}{ "message": "Unauthenticated."}{ "message": "Resource not found."}{ "message": "Validation error.", "errors": { "name": [ "The name field is required." ], "api_url": [ "The api url field is required.", "The api url format is invalid." ] }}{ "message": "Rate limit exceeded. Please try again later."}{ "message": "Failed to create Hetzner server. The Hetzner API token does not have permission for this request. Use a token with read and write access.", "provider_status": 403, "provider_error_code": "forbidden"}