在 Debian 12 上确定 Certbot 是否会自动续期

在 Debian 12 系统上,Certbot 通常会自动配置证书续期。您可以通过以下方法确认:

1. 检查 systemd 计时器

systemctl list-timers | grep certbot

正常情况下,您应该能看到 certbot.timer 被启用并计划在特定时间运行。

2. 检查 cron 配置

如果使用 cron 而不是 systemd:

cat /etc/cron.d/certbot

或查看当前用户的 crontab:

crontab -l | grep certbot

3. 执行模拟续期测试

sudo certbot renew --dry-run

这会模拟证书续期过程,确认一切配置正常。

4. 检查 Certbot 配置

cat /etc/letsencrypt/renewal/你的域名.conf

确认配置中有 renew_before_expiry 和 autorenew 相关设置。

5. 查看日志记录

sudo journalctl -u certbot

sudo cat /var/log/letsencrypt/letsencrypt.log

6. 查看证书信息

sudo certbot certificates

这将显示所有证书及其过期日期信息。

在 Debian 12 上,Certbot 默认会设置自动续期,通常通过 systemd timer 每天尝试续期(仅对即将到期的证书生效,通常是到期前 30 天)。

相关阅读:使用certbot自动获取SSL证书

在 Debian 12 上确定 Certbot 是否会自动续期》有一个想法

  1. Pingback引用通告: 使用certbot自动获取SSL证书 – 老吴笔记

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注