certbot
Let's Encrypt 证书申请与续期客户端
补充说明
certbot 通过 HTTP-01/DNS-01 等方式申请和续期 TLS 证书。生产环境要区分 staging/production,避免触发速率限制。
常用示例
certbot certonly --standalone -d example.com
certbot certonly --webroot -w /var/www/html -d example.com
certbot renew --dry-run
certbot certificates
易错点与排错
- 先用
--dry-run/staging 测试,别在 production 反复失败触发限流。
- HTTP-01 需要 80 端口可达;DNS-01 需要 DNS API 凭据。
- 续期由 timer/cron 触发;确认
certbot.timer 或 cron 正常运行。
- 证书路径/权限要让 Web 服务器可读;不要在续期后忘记 reload。
- 多域名/SAN 要写全;漏掉域名会导致浏览器告警。
- 不要用
--manual 做无人值守续期;容易卡住。