banner
cliouo

cliouo

CertBot搭配DNSPod

CertBot 搭配 DNSPod#

summary: certbot 搭配 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
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。