nicmanager AnycastDNS Authenticator plugin for Certbot
Project description
certbot-dns-nicmanager
Status: stable (1.0). Running in production — wildcard issuance + automatic renewal against the live nicmanager AnycastDNS API.
A Certbot DNS authenticator plugin for
nicmanager AnycastDNS. It automates the
dns-01 ACME challenge by creating, and then removing, the
_acme-challenge TXT record through the
nicmanager API — which makes it possible
to issue wildcard certificates for domains hosted on nicmanager.
There was no Certbot plugin for the nicmanager API, and the lego-based
multi-provider plugins do not yet support nicmanager's current API. This plugin
fills that gap with a small, dependency-light, well-tested implementation.
Why DNS-01 (and not HTTP-01)?
dns-01 is the only ACME challenge type that can issue wildcard
certificates, and it does not require any inbound HTTP reachability. It also
keeps your individual service hostnames out of the public
Certificate Transparency logs that a
per-host http-01 certificate would expose.
Installation
pip install certbot-dns-nicmanager
Install the plugin into the same Python environment as Certbot. If you installed Certbot via
snap, install the plugin withsnap install certbot-dns-nicmanageronce it is published there, or run Certbot from apipenvironment that contains both packages.
Verify it is registered:
certbot plugins
# ... should list: * dns-nicmanager
Credentials
This plugin authenticates against the nicmanager API with HTTP Basic auth.
The strongly recommended setup is a dedicated API-ACME account, which
nicmanager restricts to managing only the _acme-challenge.<zone> TXT record:
| Module | Rights |
|---|---|
| Webfrontend | – |
| Account settings | – |
| Domains | – |
| Nameserver | View, Manage (create, edit, delete) |
| Domainsecurity | – |
| Other modules | – |
Because such an account can touch nothing but the challenge record, a leaked credential cannot be used to hijack other records, transfer domains, or read account data. Disable two-factor authentication on the account used for automation — the API would otherwise require a rotating TOTP code that cannot be provided unattended.
Create an INI file, e.g. ~/.secrets/certbot/nicmanager.ini:
# nicmanager API credentials used by Certbot
dns_nicmanager_username = mylogin.acmeuser
# Quote the password if it contains '#' — an unquoted '#' starts an INI comment.
dns_nicmanager_password = "0123456789abcdef0123456789abcdef"
# Optional. Defaults to https://api.nicmanager.com/v1
# dns_nicmanager_endpoint = https://api.nicmanager.com/v1
# Optional. Skip zone detection and always use this zone.
# dns_nicmanager_zone = example.com
The username is login.username (or the account email). Zone detection works
without any read access, so dns_nicmanager_zone is only needed in unusual
multi-zone-suffix setups.
The username is either login.username or the account email address, as
configured in nicmanager.
Protect this file:
chmod 600 ~/.secrets/certbot/nicmanager.ini
Usage
# A single hostname
certbot certonly \
--authenticator dns-nicmanager \
--dns-nicmanager-credentials ~/.secrets/certbot/nicmanager.ini \
-d example.com
# A wildcard (and the apex)
certbot certonly \
--authenticator dns-nicmanager \
--dns-nicmanager-credentials ~/.secrets/certbot/nicmanager.ini \
-d 'example.com' -d '*.example.com'
Command-line arguments
| Argument | Description | Default |
|---|---|---|
--dns-nicmanager-credentials |
Path to the nicmanager credentials INI file. (required) | – |
--dns-nicmanager-propagation-seconds |
Seconds to wait for DNS propagation before the ACME server checks the record. | 60 |
How it works
- Certbot asks the plugin to create
_acme-challenge.<domain>with the validation token. - The plugin determines the owning AnycastDNS zone without reading it — a
restricted API-ACME account cannot read zones. It tries
POST /v1/anycast/<candidate>/recordsagainst each candidate zone (most-specific first); a403/404skips to the next candidate, the first2xxwins. An explicitdns_nicmanager_zoneshort-circuits this. A401(genuine auth failure) is surfaced immediately. - nicmanager returns the new record's numeric
id, which the plugin remembers. - After validation, the plugin removes the record via
DELETE /v1/anycast/<zone>/records/<id>.
TTL is fixed at the API minimum of 900 seconds.
Heads-up: the API blocks the IP after too many failed logins. Make sure the password is correct (and any
#in it is quoted in the INI, see below) before running at scale.
Troubleshooting
Common failures, decoded (full details in
docs/TROUBLESHOOTING.md):
| Response | Meaning | Fix |
|---|---|---|
401 Authentication error |
Wrong username form or password | Match the username to the account's auth method: email for "E-Mail + Passwort" accounts, login.username otherwise. Disable 2FA. |
403 API usage not allowed |
Auth OK — API access not enabled | Ask nicmanager support to enable API access for the account. |
401 Too many invalid attempts / no response (000) |
IP rate-limited / firewall-blocked after failed logins | Stop and wait. Never loop over credential variants — it locks the IP. |
Key gotchas: the username form depends on the account's active authentication
method (email vs login.username); 2FA must be off; a # in the password
must be quoted in the INI; and the restricted API-ACME account cannot read
zones (this plugin resolves the zone by create-attempt instead).
Development
git clone https://github.com/jp1337/certbot-dns-nicmanager
cd certbot-dns-nicmanager
python -m venv .venv && . .venv/bin/activate
pip install -e '.[test,dev]'
pytest # run the test suite
ruff check . # lint
mypy certbot_dns_nicmanager
For the design and the reasoning behind it, see
docs/ARCHITECTURE.md and the Architecture Decision
Records in docs/decisions/ (DNS-01-only, zone resolution
without zone reads, and the basic-auth username / cleanup-by-id decisions).
License
This is an independent, community-maintained plugin and is not affiliated with or endorsed by InterNexum GmbH / nicmanager or the EFF / Certbot project.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file certbot_dns_nicmanager-1.0.0.tar.gz.
File metadata
- Download URL: certbot_dns_nicmanager-1.0.0.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d5e3b03af6a2360ced7032056d70076728985f510a386879900f5dd5e9eaad
|
|
| MD5 |
12cd104ff079855b0ef679953763609d
|
|
| BLAKE2b-256 |
e55cfd5927a6b7e5c911b1661ca69f8c94d85c8d27500fbed2a4984b127cb060
|
Provenance
The following attestation bundles were made for certbot_dns_nicmanager-1.0.0.tar.gz:
Publisher:
publish.yml on jp1337/certbot-dns-nicmanager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
certbot_dns_nicmanager-1.0.0.tar.gz -
Subject digest:
95d5e3b03af6a2360ced7032056d70076728985f510a386879900f5dd5e9eaad - Sigstore transparency entry: 1836320882
- Sigstore integration time:
-
Permalink:
jp1337/certbot-dns-nicmanager@62e50206f9a395f28794c2e0d99eae475003e153 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jp1337
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@62e50206f9a395f28794c2e0d99eae475003e153 -
Trigger Event:
push
-
Statement type:
File details
Details for the file certbot_dns_nicmanager-1.0.0-py3-none-any.whl.
File metadata
- Download URL: certbot_dns_nicmanager-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
134cefcc2070b58eec9cc2711753f129509b7b1f881471b4fb502d0942736aa1
|
|
| MD5 |
a6123a123dab4aa8337b72c608a5a144
|
|
| BLAKE2b-256 |
20701efa5255e7de9d4dc2a6bea05dad288f5f0eee59c5dfa613225bfc07c7fc
|
Provenance
The following attestation bundles were made for certbot_dns_nicmanager-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on jp1337/certbot-dns-nicmanager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
certbot_dns_nicmanager-1.0.0-py3-none-any.whl -
Subject digest:
134cefcc2070b58eec9cc2711753f129509b7b1f881471b4fb502d0942736aa1 - Sigstore transparency entry: 1836320984
- Sigstore integration time:
-
Permalink:
jp1337/certbot-dns-nicmanager@62e50206f9a395f28794c2e0d99eae475003e153 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jp1337
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@62e50206f9a395f28794c2e0d99eae475003e153 -
Trigger Event:
push
-
Statement type: