banner
cliouo

cliouo

CertBot搭配DNSPod

CertBot 搭配 DNSPod#

summary: cetbot 搭配 dnspod 实现自动注册 ssl 证书和自动续期

1. 安装 pip、venv、新建 certbot 虚拟环境并激活#

apt install python3-pip
apt install python3.11-venv
python3 -m venv certbot-env
source certbot-env/bin/activate

2. pip 安装 certbot#

  • 虚拟环境内安装 certbot,pip 安装的优点为版本是最新的,(使用豆瓣源)
pip3 install certbot -i https://pypi.doubanio.com/simple/

3. 安装 DNSPod 扩展#

pip install git+https://github.com/tengattack/certbot-dns-dnspod.git
  • (optional) 如若提示缺失 zope
pip install zope.interface -i https://pypi.doubanio.com/simple/

4.certbot-dns-dnspod 配置文件#

编辑 dnspod 的配置 ini 文件

dns_dnspod_api_id = 12345
dns_dnspod_api_token = 1234567890abcdef1234567890abcdef

5.certbot 搭配插件使用#

certbot certonly -a dns-dnspod \
  --dns-dnspod-credentials /etc/letsencrypt/dnspod.ini \
  -d example.com \
  -d *.example.com

6.Certbot 常用管理命令#

  • 查看 certbot 当前管理的证书
certbot certificates 
  • 续期
certbot renew
加载中...
此文章数据所有权由区块链加密技术和智能合约保障仅归创作者所有。