certbot-dns-duckdns

raw JSON →
1.8.0 verified Fri May 01 auth: no python

A Certbot plugin that automates DNS-01 ACME challenge validation for DuckDNS domains via a TXT record. Version 1.8.0 requires Python >=3.10 and supports certbot 5+. Released sporadically, with maintenance updates and dependency bumps.

pip install certbot-dns-duckdns
error ImportError: cannot import name 'DuckDNSAuthenticator' from 'certbot_dns_duckdns'
cause The public API is not exposed at the top level; it's in the _internal subpackage.
fix
Use: from certbot_dns_duckdns._internal.dns_duckdns import DuckDNSAuthenticator
error certbot: error: unrecognized arguments: --certbot-dns-duckdns:duckdns-credentials
cause Missing the colon between plugin name and argument; or plugin not installed correctly.
fix
Ensure plugin is installed and use: --authenticator certbot-dns-duckdns:duckdns --certbot-dns-duckdns:duckdns-credentials /path/to/credentials.ini
error PluginError: An error occurred (NotAuthorized) when calling the UpdateTxtRecord operation
cause Invalid DuckDNS token or domain not configured for DuckDNS.
fix
Verify token and domain at https://duckdns.org. The token must have permission to update TXT records for your domain.
breaking certbot-dns-duckdns v1.7.0 dropped support for Python 3.9 and switched from python-certbot to the internal certbot API. Older versions (<=1.6) are incompatible with certbot 5+.
fix Upgrade to latest certbot-dns-duckdns and ensure Python >=3.10.
gotcha The plugin's entry point name is 'duckdns', not 'certbot-dns-duckdns'. Use --authenticator certbot-dns-duckdns:duckdns.
fix Refer to the CLI as certbot-dns-duckdns:duckdns.
gotcha DuckDNS token must be set in the credentials file or as environment variable DUCKDNS_TOKEN. If using the file, ensure permissions are strict (600).
fix Use --certbot-dns-duckdns:duckdns-credentials /path/to/credentials with line 'dns_duckdns_token = YOUR_TOKEN'.

Initialize the authenticator with a DuckDNS token. Credentials file format: dns_duckdns_token = <your-token>

import os
from certbot_dns_duckdns._internal.dns_duckdns import DuckDNSAuthenticator

token = os.environ.get('DUCKDNS_TOKEN', '')
auth = DuckDNSAuthenticator(token)
# Use with certbot: certbot certonly --authenticator certbot-dns-duckdns:duckdns --certbot-dns-duckdns:duckdns-credentials /path/to/credentials.ini