Troubleshooting
Run certbot with -v (or --debug) to see the plugin’s log output, including
the zone it picked and the Azure API errors in full.
AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Extension'
Certbot itself fails to start, typically right after installing an Azure DNS plugin
in Nginx Proxy Manager 2.15 or later. The upstream package certbot-dns-azure
pins certbot<4.0, so pip downgraded certbot and acme to 3.3.0, and that acme
release does not import against pyOpenSSL 26.
Fix: replace the upstream package with this fork and restore certbot. In a plain virtual environment:
pip uninstall certbot-dns-azure
pip install -U certbot certbot-dns-azure-modern
In Nginx Proxy Manager, patch dns-plugins.json and recreate the container as
described in Installation; a fresh container comes with an intact certbot.
Plugin not listed by certbot plugins
The plugin was installed into a different Python environment than certbot. Compare the locations:
pip show certbot certbot-dns-azure-modern
which certbot
Install the plugin with the pip that belongs to the certbot you run, for example
/opt/certbot/bin/pip in Nginx Proxy Manager or /usr/bin/pip3 for a distro
certbot. Snap-installed certbot only accepts plugins from snaps; this fork ships
none, so use a pip installation of certbot instead.
No authentication methods have been configured for Azure DNS
The config file names no complete credential method. Check the spelling of the keys
and that a service principal has all three of dns_azure_sp_client_id,
dns_azure_tenant_id and either dns_azure_sp_client_secret or
dns_azure_sp_certificate_path. See Authentication.
Zone mapping errors on startup
At least one zone mapping needs to be provided or DNS Zone mapping is not in
the format of DOMAIN:DNS_ZONE_RESOURCE_GROUP_ID: every dns_azure_zone<N> line
must look like example.com:/subscriptions/... with a colon between domain and
resource id, and at least one such line must exist.
Domain <name> does not have a valid domain to resource group id mapping
None of the configured domains is a suffix of the requested name. Add a mapping for the zone that serves the name. See “How domains are matched” in Configuration.
Authentication errors (AADSTS codes, ClientAuthenticationError)
AADSTS7000215invalid client secret: the secret is wrong or expired. Create a new one in the app registration.AADSTS700016application not found: client id and tenant id do not belong together.Managed identity errors on a host that is not an Azure resource: managed identities only work on Azure VMs, containers and services with an identity attached. Use a service principal elsewhere.
Azure CLI credentials: the user running certbot must be the one that ran
az login; cron jobs and services usually run as a different user.Sovereign clouds: make sure
dns_azure_environmentmatches the cloud the identity lives in.
Validation fails although the record was created
Check what the public DNS returns while certbot is waiting:
dig +short TXT _acme-challenge.example.com
Nothing at all: the zone in Azure is not the one the domain delegates to. Compare the NS records of the domain with the name servers of the Azure zone.
A CNAME: you are using delegation; make sure the target matches the mapping, see DNS delegation.
An old value or intermittent failures: raise
--dns-azure-propagation-seconds.
Unsafe permissions on configuration file
The config file is readable by other users. Restrict it:
chmod 600 /etc/letsencrypt/azure.ini
The warning is emitted on every run, including renewals, until the permissions are fixed.
Reporting a bug
Open an issue at
https://github.com/cloudchristoph/certbot-dns-azure-modern/issues with the certbot
and plugin versions (pip show certbot certbot-dns-azure-modern), the
command you ran and the relevant part of /var/log/letsencrypt/letsencrypt.log.
Remove secrets, subscription ids and tenant ids before posting.