CertBot with DNSPod#
summary: Using Certbot with DNSPod to achieve automatic registration of SSL certificates and automatic renewal
1. Install pip, venv, create and activate the certbot virtual environment#
apt install python3-pip
apt install python3.11-venv
python3 -m venv certbot-env
source certbot-env/bin/activate
2. Install certbot using pip#
- Install certbot in the virtual environment. The advantage of using pip is that the version is the latest (using Douban source).
pip3 install certbot -i https://pypi.doubanio.com/simple/
3. Install DNSPod extension#
pip install git+https://github.com/tengattack/certbot-dns-dnspod.git
- (optional) If prompted for missing zope
pip install zope.interface -i https://pypi.doubanio.com/simple/
4. certbot-dns-dnspod configuration file#
Edit the configuration ini file for dnspod
dns_dnspod_api_id = 12345
dns_dnspod_api_token = 1234567890abcdef1234567890abcdef
5. Using certbot with the plugin#
certbot certonly -a dns-dnspod \
--dns-dnspod-credentials /etc/letsencrypt/dnspod.ini \
-d example.com \
-d *.example.com
6. Common management commands for Certbot#
- View the certificates currently managed by certbot
certbot certificates
- Renewal
certbot renew