Skip to main content

Hetzner DNS provider for octoDNS

An octoDNS provider that targets Hetzner DNS.

Installation

Command line

pip install octodns-hetzner

requirements.txt/setup.py

Pin specific versions or SHAs in your project to control upgrades. Refer to PyPI for current releases. Minimum requirements align with setup.py, e.g.:

octodns>=1.5.0
octodns-hetzner>=1.0.0

Configuration

providers:
  hetzner:
    class: octodns_hetzner.HetznerProvider
    # Your Hetzner Cloud API token (required)
    token: env/HETZNER_TOKEN

The provider uses the Hetzner Cloud API through the official hcloud client, which is installed as a dependency of this package. Create the token in the Hetzner Console. When zone or RRSet TTLs are unavailable from the API, the provider uses a fallback of 3600 seconds.

Migrating from 2.x

Hetzner shut down the legacy DNS Console API (dns.hetzner.com) in May 2026, and version 3.0 removes the dnsapi backend that used it. To upgrade:

  1. Replace the DNS Console token with a Hetzner Cloud API token. The two token types aren't interchangeable, so an old DNS Console token fails with an authentication error.
  2. Remove backend: dnsapi from your provider configuration. The provider raises an error at startup if it's still set. backend: hcloud is still accepted, so configurations that already set it keep working.
  3. Run octodns-sync without --doit and confirm the plan shows no unexpected changes.

Support Information

Records

HetznerProvider supports A, AAAA, CAA, CNAME, DS, MX, NS, PTR, SRV, TLSA, and TXT

TXT Records and DKIM

Long TXT records (such as DKIM keys exceeding 255 characters) are automatically chunked into RFC-compliant format. For DKIM keys, configure them as a single TXT value in your zone file:

dkim._domainkey:
  type: TXT
  value: "v=DKIM1\\;k=rsa\\;p=MIIBIjANBgkqh...very-long-key..."

The provider will automatically split values exceeding 255 characters into properly quoted chunks (e.g., "chunk1" "chunk2"). Do not manually split long values into multiple values: entries unless you specifically need multiple distinct TXT records (such as for site verification).

Root NS Records

HetznerProvider supports full root NS record management.

Dynamic

HetznerProvider does not support dynamic records.

Development

See the /script/ directory for some tools to help with the development process. They generally follow the Script to rule them all pattern. Most useful is ./script/bootstrap which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.

Metadata

Release files for octodns-hetzner 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for octodns-hetzner 3.0.0
File Size Uploaded Provenance Actions
octodns_hetzner-3.0.0.tar.gz 26.9 kB Without provenance Details for octodns_hetzner-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for octodns-hetzner 3.0.0
File Interpreter ABI Platform Actions
octodns_hetzner-3.0.0-py3-none-any.whl Python 3 none any Details for octodns_hetzner-3.0.0-py3-none-any.whl

Total release size: 40.6 kB

Release files / octodns_hetzner-3.0.0.tar.gz

Download URL octodns_hetzner-3.0.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cc982479d3a6555aa39384e43e6095c25a582e2cb71db6ecf0be11770a02d550
BLAKE2b-256 checksum
How to use checksums
ef9b81c65c288a7134a4c4a51d1cdd64f1ffded23ce8e0fea1d568729900ae6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / octodns_hetzner-3.0.0-py3-none-any.whl

Download URL octodns_hetzner-3.0.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1928ccada0e2ba0b575400e3872660bc075a9aaeff4d45800f2382e4a857fb9e
BLAKE2b-256 checksum
How to use checksums
897815a8f9d8f451551090a67e4d3356cb6c6247bed102f44364df65550f7120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for octodns-hetzner 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page