Certbot-dns-namecheap is a plugin for Certbot that automates the DNS-01 challenge for Let's Encrypt certificates using the Namecheap API. This allows for obtaining and renewing wildcard certificates by programmatically creating and deleting TXT records on Namecheap DNS. The current version is 1.0.0 and it is part of the Certbot ecosystem.
pip install certbotVerified import paths — ran on the pinned version, not inferred.
To quickly get started, first, create a credentials file (e.g., `namecheap.ini`) with your Namecheap API username and API key. Ensure this file has restrictive permissions (e.g., `chmod 600 namecheap.ini`). Then, use the `certbot` command-line tool with the `certbot-dns-namecheap:dns-namecheap` authenticator, pointing to your credentials file. The example includes obtaining a wildcard certificate. Remember to test with `--test-cert` first.
Ensure your Namecheap account meets the API activation criteria or contact Namecheap support.
Use a static IP address for your server, or if on a dynamic IP, consider an alternative DNS provider with dynamic IP support for API access, or implement a mechanism to update the whitelisted IP dynamically before renewal.
Always set restrictive file permissions (e.g., `chmod 600`) on your API credentials file and store it in a secure location. Avoid hardcoding credentials directly in scripts or version control.
If validation fails, retry after a few minutes to allow more time for DNS changes to propagate. You can manually check TXT record propagation using `dig TXT _acme-challenge.yourdomain.com`.