Skip to content

DNS: Add Hetzner cloud#892

Merged
timkimber merged 3 commits intosrvrco:masterfrom
Ayesh:hetzner-cloud-dns
May 2, 2026
Merged

DNS: Add Hetzner cloud#892
timkimber merged 3 commits intosrvrco:masterfrom
Ayesh:hetzner-cloud-dns

Conversation

@Ayesh
Copy link
Copy Markdown
Contributor

@Ayesh Ayesh commented Apr 1, 2026

Getssl supports Hetzner DNS API, but they are phrasing out1 the DNS API.

This adds support for Hetzner's Cloud API2 to manage zones to add and remove ACME DNS records.

Similar to the Hetzner DNS API integration, this works by setting additional environment variables either within the global .getssl config file, or certificate-specific getssl.cfg file.

  • HETZNER_KEY: Required, set project-specific API key.
  • HETZNER_ZONE_ID: The numeric zone ID
  • HETZNER_ZONE_NAME: If HETZNER_ZONE_ID is not provided, the zone ID will be fetched by searching for this name. This may not work reliably, and setting HETZNER_ZONE_ID is recommended.

Either HETZNER_ZONE_ID or HETZNER_ZONE_ID must be set.

The system also must have jq installed.

Footnotes

  1. https://docs.hetzner.com/networking/dns/migration-to-hetzner-console/process/

  2. https://docs.hetzner.cloud/reference/cloud#tag/zones

Getssl supports Hetzner DNS API, but they are phrasing out[^1] the DNS
API.

This adds support for Hetzner's Cloud API[^2] to manage zones to add
and remove ACME DNS records.

[^1]: https://docs.hetzner.com/networking/dns/migration-to-hetzner-console/process/
[^2]: https://docs.hetzner.cloud/reference/cloud#tag/zones

Similar to the Hetzner DNS API integration, this works by setting
additional environment variables either within the global `.getssl`
config file, or certificate-specific `getssl.cfg` file.

 - `HETZNER_KEY`: Required, set project-specific API key.
 - `HETZNER_ZONE_ID`: The numeric zone ID
 - `HETZNER_ZONE_NAME`: If `HETZNER_ZONE_ID` is not provided, the zone
    ID will be fetched by searching for this name. This may not work
	reliably, and setting `HETZNER_ZONE_ID` is recommended.

Either `HETZNER_ZONE_ID` or `HETZNER_ZONE_ID` _must_ be set.

The system also must have `jq` installed.
@xrat
Copy link
Copy Markdown

xrat commented May 2, 2026

Your way of setting $txtname via $relative did not work for me. I used instead

txtname="_acme-challenge.$fulldomain"
txtname="${txtname%.$zone_name}"

@timkimber
Copy link
Copy Markdown
Member

timkimber commented May 2, 2026

Your way of setting $txtname via $relative did not work for me. I used instead

txtname="_acme-challenge.$fulldomain"
txtname="${txtname%.$zone_name}"

@xrat Thanks for pointing this out, I've just tested and the script only works for 2 level domains (e.g. example.com) not for 3 level domains (e.g. example.co.uk).

Buypass.no have stopped selling SSL certificates and their API now
returns 404 not found
@timkimber timkimber merged commit b9a7384 into srvrco:master May 2, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants