certbot 免费泛域名证书的生成,容器启动自动生成,容器自动证书自动续期(按官方证书即将到期的30天)。
目前支持阿里云 DNS、腾讯云 DNS、华为云 NDS、GoDaddy。
命令代码
docker run -itd --name xzxiaoshan-certbot \
-v /opt/certbot/logs:/var/log/letsencrypt \
-v /opt/certbot/letsencrypt:/etc/letsencrypt \
-e ALY_TOKEN=XXXXXXXXXX \
-e ALY_KEY=XXXXXXXXX -e PDNS=aly \
-e CERT_PARAMS="--email [email protected] -d example.com -d *.example.com" \
xzxiaoshan/xzxiaoshan-certbot:latest /bin/bash
参数说明
aly、腾讯云txy、华为云hwy、GoDaddy godaddy[email protected]添加。
上面命令通用于Linux,如果你是群晖直接通过群晖界面配置环境变量和卷挂载即可,其他设备同理。注意事项
timeout就可以确定),然后你只需要重启容器即可,直到没有类似的网络问题错误。certbot.log文件中可能看到。群晖》控制面板》任务计划》新增自定义用户脚本》任务设置》脚本内容填写
/volume1/docker/certbot/letsencrypt/synology/syncSynologyCert.sh
其中前面一段/volume1/docker/certbot/letsencrypt是你群晖配置容器时挂载的卷的目录的实际路径(右键文件夹属性查看)
脚本设置每天执行一次即可。
官方命令certbot-auto每次执行将始终尝试从最新版本中获取自身的最新版本。
如果希望将其锁定到特定版本并且不接收自动更新,只需在命令后加 --no-self-upgrade 即可。
即:certbot-auto renew --no-self-upgrade。
对于本源码中,对应修改 shell/renewCmd.sh 脚本内容,添加 --no-self-upgrade 参数后自行构建镜像即可。
感谢certbot-au代码的作者。
(END)
Content type
Image
Digest
Size
169.7 MB
Last updated
about 5 years ago
docker pull xzxiaoshan/certbot