letsencrypt auto renewal by dns challenge
源码: autossl-alidns
使用条件:
- 域名接入阿里云DNS
- 已经有解析记录存在
env
- ALI_SECRET_ID=
- ALI_SECRET_KEY=
create accounts and renewal config file
- shell
$ certbot certonly --manual --preferred-challenges=dns --manual-auth-hook /usr/src/app/authenticator.sh -d hub.newops.cn
- docker
docker run -it --rm --name alidns -e ALI_SECRET_ID=xxx -e ALI_SECRET_KEY=xxx -v /data/ssl/:/etc/letsencrypt/ hub.newops.cn/base/alidns:1.0.0 update hub.newops.cn
renewal by force
- shell
certbot renew --force-renewal
- docker
docker run -it --rm --name alidns -e ALI_SECRET_ID=xxx -e ALI_SECRET_KEY=xxx -v /data/ssl/:/etc/letsencrypt/ hub.newops.cn/base/alidns:1.0.0
renewal cron
$ crontab -l
00 09 01 * * /root/cron/update_cert_cron.sh # 每月定时重新签发一次证书