我是否应该在自动运行 certobot-auto 时删除 --no-bootstrap 和 --no-self-upgr



我正在开发一个程序来自动为我的服务器续订SSL证书。

目前,续订 SSL 证书的命令是 /opt/certbot-auto certonly --keep --no-bootstrap --no-self-upgrade --non-interactive --webroot -w /usr/share/nginx/html -d myDomain

如果我应该删除命令中的--no-self-upgrade选项,我正在徘徊。因为如果我不升级certobot-auto,我会收到一条警告,说Attempting to parse the version <new_version> renewal configuration file found at XXX with version <old_version> of Certbot. This might not work.。恐怕将来的某一天,如果我不升级 certbot-auto,该程序将无法更新我机器上的 SSL 证书。

如果我删除--no-self-upgrade,我是否也应该删除--no-bootstrap?因为新版本的 certbot-auto 可能具有不同的操作系统依赖项。

是的,我建议删除这些标志。

另外,由于您使用的是Nginx,因此您可能希望使用Certbot内置的Nginx支持。为此,请仅运行一次 /opt/certbot-auto --nginx ,然后按照提示进行操作,包括对续订证书说"是",即使您已经有一个证书。这将使用 Nginx 支持保存续订设置。

然后,您可以将 cron 作业更改为 Simply /opt/certbot-auto -q renew ,这将自动续订所有以前颁发的证书,并重新加载 Nginx。

最新更新