1.安装
使用apt安装Certbot
使用git获取certbot-he-hook脚本 https://github.com/angel333/certbot-he-hook
2.生成证书
HE_USER=<username> HE_PASS=<password> certbot certonly \
--preferred-challenges dns \
--email your@email.com \
--manual \
--manual-auth-hook /path/to/certbot-he-hook.sh \
--manual-cleanup-hook /path/to/certbot-he-hook.sh \
--manual-public-ip-logging-ok \
--domain <requested.domain.com>
3.更新
HE_USER=<username> HE_PASS=<password> certbot renew \
--preferred-challenges dns \
--manual-auth-hook /path/to/certbot-he-hook.sh \
--manual-cleanup-hook /path/to/certbot-he-hook.sh \
--manual-public-ip-logging-ok
4.证书位置
/etc/letsencrypt/live/<domain>/