Skip to content

Certbot plugin enabling dns-01 challenge on the Hetzner DNS API

License

Notifications You must be signed in to change notification settings

panta/certbot-dns-hetzner

 
 

Repository files navigation

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.

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 certbot-dns-hetzner:dns-hetzner select the authenticator plugin (Required)
--certbot-dns-hetzner:dns-hetzner-credentials Hetzner DNS API credentials INI file. (Required)
--certbot-dns-hetzner: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.

An example credentials.ini file:

certbot_dns_hetzner:dns_hetzner_api_token = nohnah4zoo9Kiejee9aGh0thoopee2sa

Examples

To acquire a certificate for example.com

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

To acquire a certificate for *.example.com

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

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.

About

Certbot plugin enabling dns-01 challenge on the Hetzner DNS API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%