Certbot
$ certbot 官方出品 中风险certbot 通过 HTTP-01 或 DNS-01 质询自动完成 Let's Encrypt TLS 证书的申请、部署与续期。它提供完善的 --non-interactive(-n)与 --dry-run 预演参数,但仅支持纯文本输出且默认目录常需管理员权限。
brew install certbot 宿主机 TLS 证书生命周期客户端,需直接操作本地 /etc/letsencrypt/ 文件及 80 端口或 DNS 质询。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
具备成熟的 --non-interactive(-n)与 --dry-run 参数防止挂起或触发限流,但无 --json 输出。
- Explicit
--non-interactiveand--dry-runflags onrenew/certonly - No
--jsonoutput mode; text output only
--dry-run 使用 staging 服务校验且不改动 /etc/letsencrypt/live 线上证书目录;但正式签发受限于 CA 配额,安装插件也可能修改本地 Web 配置。
--dry-run/--stagingsafe simulation- Installer plugins can modify local web server configs
可通过 Homebrew、snap 与 pip 在 Linux 与 macOS 安装,官方已停止支持 Windows。
- Python runtime dependency; Linux and macOS only
配合丰富的 DNS-01 插件与续期钩子,可稳定实现自动化证书运维。
- Rich ecosystem of DNS-01 plugins and auto-renewal hooks
电子前哨基金会(EFF)官方项目(certbot/certbot),Apache-2.0 协议维护。
- Maintained by EFF under Apache-2.0
eff-certbot.readthedocs.io 手册完整覆盖命令参数、插件与限额说明。
- Detailed CLI docs at eff-certbot.readthedocs.io
安全边界、鉴权与放权指南
ACME 账号密钥与证书默认存放在 /etc/letsencrypt/(可通过 --config-dir 调整);DNS 插件读取 .ini 凭证文件或环境变量。
EFF 开源项目,Apache-2.0 协议;Let's Encrypt 证书免费(受 ACME 速率限制约束)。
# Certbot Agent Rules - Always pass `-n` / `--non-interactive` so Certbot never blocks on interactive prompts. - Test changes with `--dry-run` or `--staging` first to avoid Let's Encrypt production rate limits. - Keep DNS credential `.ini` files `chmod 600` and never print private keys.
Agent 高频安全命令配方
只读查询(安全推荐)
certbot certificates --non-interactive
展示已配置的域名、到期时间与密钥路径,不触发续期或修改证书。
certbot renew --dry-run --non-interactive
连接 Let's Encrypt staging 环境端到端验证续期流程,不覆盖线上证书。
受控写入与预演
certbot certonly --non-interactive --agree-tos -m [email protected] --webroot -w /var/www/html -d example.com
显式传入 --non-interactive、--agree-tos 与 Webroot 路径以无提示签发证书。
核心优势
- + 成熟的
--dry-run机制可安全连接测试服务器验证续期。 - + 显式
--non-interactive(-n)彻底杜绝 TTY 阻塞。 - + 拥有丰富的 DNS-01 与 Webroot 插件生态。
注意事项与踩坑点
- ! 无
--json输出格式,Agent 需解析纯文本报告。 - ! 默认路径(
/etc/letsencrypt)常需 root 权限或显式指定--config-dir/--work-dir/--logs-dir。