4
ACME协议自动获取和续订TLS证书
X edited this page 2025-08-18 15:43:09 +00:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

  • 安装依赖软件
apt update
apt install socat -y
  • 安装acme.sh
curl  https://get.acme.sh | sh -s email=XXX@outlook.com
  • 生成证书,确保DNS解析到当前服务器中
~/.acme.sh/acme.sh --issue -d hostname.x.com --standalone --force
  • 设定时任务,检查证书到期后自动续订:crontab -e 添加以下任务
0 */12 * * * ~/.acme.sh/acme.sh --cron --home ~/.acme.sh
  • 手动更新
#关闭占用80端口的应用完成后再打开
acme.sh --renew -d xxx.ai-life.net