certbot-dns-opusdns
OpusDNS DNS Authenticator plugin for Certbot.
This plugin enables automatic DNS-01 challenge verification for Let's Encrypt certificates using OpusDNS as your DNS provider.
Features
- Automatic DNS-01 challenge record management
- DNS propagation polling (verifies records via 8.8.8.8 and 1.1.1.1)
- Retry logic for rate limits and transient errors
- Support for wildcard certificates
- Configurable API endpoint (production/sandbox)
- Best-effort cleanup (doesn't fail on cleanup errors)
Installation
From PyPI (recommended)
pip install certbot-dns-opusdns
From source
git clone https://github.com/OpusDNS/certbot-dns-opusdns
cd certbot-dns-opusdns
pip install .
Docker
docker build -t certbot-dns-opusdns .
Prerequisites
- Python 3.10+
- OpusDNS Account: Sign up at opusdns.com
- API Key: Create an API key via the OpusDNS dashboard
- DNS Zone: Your domain must be managed by OpusDNS
Configuration
Credentials File
Create a credentials file (e.g., ~/.secrets/certbot/opusdns.ini):
# Required: Your OpusDNS API key
dns_opusdns_api_key = opk_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx
# Optional: API endpoint (defaults to https://api.opusdns.com)
# dns_opusdns_api_endpoint = https://api.opusdns.com
# Optional: TTL for TXT records in seconds (defaults to 60)
# dns_opusdns_ttl = 60
Important: Protect your credentials file:
mkdir -p ~/.secrets/certbot
chmod 700 ~/.secrets/certbot
chmod 600 ~/.secrets/certbot/opusdns.ini
Usage
Basic Certificate (Single Domain)
certbot certonly \
--authenticator dns-opusdns \
--dns-opusdns-credentials ~/.secrets/certbot/opusdns.ini \
--dns-opusdns-propagation-seconds 60 \
-d example.com
Wildcard Certificate
certbot certonly \
--authenticator dns-opusdns \
--dns-opusdns-credentials ~/.secrets/certbot/opusdns.ini \
--dns-opusdns-propagation-seconds 60 \
-d example.com \
-d "*.example.com"
Multiple Domains
certbot certonly \
--authenticator dns-opusdns \
--dns-opusdns-credentials ~/.secrets/certbot/opusdns.ini \
-d example.com \
-d www.example.com \
-d api.example.com
Sandbox/Testing Environment
For testing with OpusDNS sandbox:
# opusdns.ini
dns_opusdns_api_key = opk_sandbox_key_here
dns_opusdns_api_endpoint = https://sandbox.opusdns.com
certbot certonly \
--authenticator dns-opusdns \
--dns-opusdns-credentials opusdns.ini \
--server https://acme-staging-v02.api.letsencrypt.org/directory \
-d example.com
Docker Usage
Using docker-compose
-
Copy example files:
cp .env.example .env cp opusdns.ini.example credentials/opusdns.ini
-
Edit
.envandcredentials/opusdns.iniwith your values -
Run certbot:
docker-compose up certbot
Manual Docker
docker run -it --rm \
-v $(pwd)/letsencrypt:/etc/letsencrypt \
-v $(pwd)/credentials:/credentials:ro \
certbot-dns-opusdns \
certonly \
--authenticator dns-opusdns \
--dns-opusdns-credentials /credentials/opusdns.ini \
-d example.com
Command-Line Options
| Option | Description | Default |
|---|---|---|
--dns-opusdns-credentials |
Path to credentials INI file | Required |
--dns-opusdns-propagation-seconds |
Time to wait for DNS propagation | 60 |
How It Works
- Zone Detection: Iterates through domain parts to find the matching OpusDNS zone via
GET /v1/dns/{candidate} - Record Creation: Creates
_acme-challengeTXT record viaPATCH /v1/dns/{zone}/records(upsert operation) - DNS Propagation Polling: Polls public DNS resolvers (8.8.8.8, 1.1.1.1) to verify record propagation
- Validation: Let's Encrypt validates the challenge
- Cleanup: Removes the challenge record (best-effort, logs errors)
API Details
Authentication
- Header:
X-Api-Key: opk_...
Endpoints Used
GET /v1/dns/{zone}— Zone lookup for zone detectionPATCH /v1/dns/{zone}/records— Create/remove TXT records
Error Handling
- 401 Unauthorized: Invalid API key
- 404 Not Found: Zone doesn't exist in your account
- 429 Rate Limit: Automatic retry with exponential backoff (max 3 attempts)
- 5xx Server Error: Automatic retry with backoff
Troubleshooting
"No OpusDNS zone found for domain"
- Ensure your domain is added to OpusDNS
- Check that the zone name matches (e.g.,
example.comforwww.example.com)
"Invalid API key"
- Verify API key format:
opk_{26 chars}_{30 chars}_{6 chars} - Check API key permissions in OpusDNS dashboard
- Ensure no extra whitespace in credentials file
"DNS propagation timeout"
- Increase
--dns-opusdns-propagation-seconds(e.g., 120) - Check OpusDNS dashboard for zone status
- Verify nameservers are correctly configured
"Rate limit exceeded"
- OpusDNS has API rate limits
- Plugin automatically retries with backoff
- Reduce concurrent certificate requests
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest -v
# Run tests with coverage
pytest --cov=certbot_dns_opusdns --cov-report=html
# Lint
ruff check certbot_dns_opusdns tests
# Type check
mypy certbot_dns_opusdns
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
MIT License — See LICENSE file.
Support
- Issues: GitHub Issues
- Documentation: OpusDNS Docs
- Email: support@opusdns.com
Metadata
Release files for certbot-dns-opusdns 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| certbot_dns_opusdns-1.0.0.tar.gz | 10.7 kB | With provenance | Details for certbot_dns_opusdns-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| certbot_dns_opusdns-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for certbot_dns_opusdns-1.0.0-py3-none-any.whl |
Total release size: 19.8 kB
Release files / certbot_dns_opusdns-1.0.0.tar.gz
| Download URL | certbot_dns_opusdns-1.0.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f55adabec42cd8e6bf3aa401eca6dbc281c380f9c53f4b2a515ba85d5f3a8e15
|
|
BLAKE2b-256 checksum How to use checksums |
c238da7788be59ca9f3da41b9d182a977c2e886c8650985f2e3434461a75456f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logRelease files / certbot_dns_opusdns-1.0.0-py3-none-any.whl
| Download URL | certbot_dns_opusdns-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0347661ce22980c1e2f3246a9bb48f289476aa1163e2fc04f2831274af02ea00
|
|
BLAKE2b-256 checksum How to use checksums |
6c227555b0c8478e435288620f56a901a37481bfb4ff1b1110c529e6cc6821d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logSecurity for certbot-dns-opusdns 1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for certbot_dns_opusdns-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logA 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.