Skip to main content

This certbot plugin for dns-01 challenge for Hetzner.

Project description

Hetzner DNS Authenticator certbot plugin

codecov Tests, Coverage PyPI version Supported Python

This certbot plugin automates the process of completing a dns-01 challenge by creating, and subsequently removing, TXT records using the Hetzner DNS API.

Requirements

For certbot < 2

Notice that this plugin is only supporting certbot>=2.0 from 2.0 onwards. For older certbot versions use 1.x releases.

Install

Install this package via pip in the same python environment where you installed your certbot.

pip install certbot-dns-hetzner

Usage

To start using DNS authentication for the Hetzner DNS API, pass the following arguments on certbot's command line:

Option Description
--authenticator dns-hetzner select the authenticator plugin (Required)
--dns-hetzner-credentials Hetzner DNS API credentials INI file. (Required)
--dns-hetzner-propagation-seconds Seconds to wait for the TXT record to propagate

Credentials

From the hetzner DNS control panel at https://dns.hetzner.com go to "API Tokens" and add a personal access token.
Please make sure to use the absolute path - some users experienced problems with relative paths.

An example credentials.ini file:

dns_hetzner_api_token = nohnah4zoo9Kiejee9aGh0thoopee2sa

Examples

To acquire a certificate for example.com

certbot certonly \\
 --authenticator dns-hetzner \\
 --dns-hetzner-credentials /path/to/my/hetzner.ini \\
 -d example.com

To acquire a certificate for *.example.com

   certbot certonly \\
     --authenticator dns-hetzner \\
     --dns-hetzner-credentials /path/to/my/hetzner.ini \\
     -d '*.example.com'

Troubleshooting

Plugin not showing up

If certbot plugins does not show the installed plugin, you might need to set CERTBOT_PLUGIN_PATH.

CERTBOT_PLUGIN_PATH=/usr/local/lib/python3.9/site-packages/ certbot renew

See letsencrypt community thread

Renewing certificate fails

Please ensure to use an absolute path for the credentials file - some users experienced problems with relative paths.

Not working with snap

We did not nor plan to support snap - it was created from this repo.
Feel free to start a new snap package yourself - we would happily link it here.

Thanks to

Of course certbot, which examples and documentation I used to implement this plugin. And to https://github.com/m42e/certbot-dns-ispconfig which served as an excellent example and README template as well.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

certbot_dns_hetzner-3.0.0a1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

certbot_dns_hetzner-3.0.0a1-py2.py3-none-any.whl (10.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file certbot_dns_hetzner-3.0.0a1.tar.gz.

File metadata

  • Download URL: certbot_dns_hetzner-3.0.0a1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for certbot_dns_hetzner-3.0.0a1.tar.gz
Algorithm Hash digest
SHA256 071aea9da6db94eedaeb9c6c806896ad79e764fb3d3ef58be40cacf58eb62514
MD5 c5308f5b4151831d85b17d91654c4aa5
BLAKE2b-256 88d1d7b2e6dd5e5eae3b6d72dc2ce7ce956b0a0192eb4e3db8b256a6b3c193e1

See more details on using hashes here.

File details

Details for the file certbot_dns_hetzner-3.0.0a1-py2.py3-none-any.whl.

File metadata

  • Download URL: certbot_dns_hetzner-3.0.0a1-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for certbot_dns_hetzner-3.0.0a1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d2755c788f55aee1ebff1b9e71414254b279a53c3995f7bbb636278a6460e496
MD5 f5e1a80dc0b100b9437d1b61b1099a9a
BLAKE2b-256 a2cf6bd5e70fdc79bb0616be19731e409bd185ededfe4479497cae143a9ff960

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page