certbot 强制更新只用加上 --force-renewal
参数, 执行命令 certbot renew --force-renewal即可。如果是想更新指定的使用参数--cert-name
。
比如更新
查看当前的 certbot certificates 可以看到的名字
certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: liuhaolin.com
Domains: liuhaolin.com www.liuhaolin.com
Expiry Date: 2019-04-03 23:25:43+00:00 (VALID: 74 days)
Certificate Path: /etc/letsencrypt/live/liuhaolin.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/liuhaolin.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
let's encrypt 强制更新
certbot renew --cert-name liuhaolin.com --force-renewal
certbot renew --cert-name liuhaolin.com --force-renewal
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/liuhaolin.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for liuhaolin.com
http-01 challenge for www.liuhaolin.com
Waiting for verification...
Cleaning up challenges
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
new certificate deployed without reload, fullchain is
/etc/letsencrypt/live/liuhaolin.com/fullchain.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations, all renewals succeeded. The following certs have been renewed:
/etc/letsencrypt/live/liuhaolin.com/fullchain.pem (success)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
查看更新的
certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: liuhaolin.com
Domains: liuhaolin.com www.liuhaolin.com
Expiry Date: 2019-04-19 11:43:26+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/liuhaolin.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/liuhaolin.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
可以看到还可以使用 89天