配起来还是挺简单的,由于不是给网站配的,选择了CF的DNS自动验证。
# 获取ACME
curl https://get.acme.sh | sh -s [email protected]
# 刷新变量
source ~/.bashrc
# 配置自动更新
acme.sh --upgrade --auto-upgrade至此安装完成,下面开始配置
# API Token
export CF_Token="CF_Token"
# 域名的区域ID
export CF_Zone_ID="CF_Zone_ID"
# 可以是泛域名,也可以是单子域名
acme.sh --issue --dns dns_cf -d example.com -d '*.example.com'至此获取证书完成,下面开始配置自动复制到需要的位置并执行重启对应软件
acme.sh --install-cert -d example.com \
--key-file /path/to/your/dir/example.key \
--fullchain-file /path/to/your/dir/example.crt \
--reloadcmd "systemctl restart your_software"结束。