Article Timeliness Reminder

It has been 276 days since the article was published, the content may be outdated.

【记录】使用acme.sh签发泛域名证书

Last updated on June 29, 2024 am

.top 域名的 KSK 密钥轮替,不知道为什么把 Let's EncryptDNSSEC 验证流量阻断了,导致 Nginx Proxy Manager 现在无法续签证书,因此用 acme.sh 来申请其他家的证书暂时替代一下了。(DNSSEC: DNSKEY Missing

准备工作

  1. 安装 acme.shcurl https://get.acme.sh | sh -s email=limour@limour.top
  2. 获取 CF_Token:我的个人资料 - API 令牌 - 创建令牌 - 编辑区域 DNS 模板
  3. 获取 CF_Zone_ID: 域名页 - 概览 - 右侧下滑 - API - 区域 ID

申请证书

1
2
3
export CF_Token="Y_jpG9AnfQmuX5Ss9M_qaNab6SQwme3HWXNDzRWs"
export CF_Zone_ID="763eac4f1bcebd8b5c95e9fc50d010b4"
~/.acme.sh/acme.sh --issue --dns dns_cf -d *.limour.top -d limour.top -k ec-256
  • 不能只写 -d *.limour.top, 需要再加一个 -d limour.top
  • 记录下 .key 的路径和 fullchain.cer 的路径

传递证书

SSH免密

1
2
ssh-keygen -t rsa
ssh-copy-id root@xxx.limour.top

传递脚本

1
nano scp_cert.sh && chmod +x scp_cert.sh
1
2
3
#!/bin/bash
scp /root/.acme.sh/*.limour.top_ecc/*.limour.top.key root@xxx.limour.top:/root/app/quic/my.key
scp /root/.acme.sh/*.limour.top_ecc/fullchain.cer root@xxx.limour.top:/root/app/quic/my.cert

计划任务

1
2
crontab -e
50 22 1 * * /root/scp_cert.sh

【记录】使用acme.sh签发泛域名证书
https://hexo.limour.top/use-acme.sh-to-issue-certificates
Author
Limour
Posted on
June 29, 2024
Updated on
June 29, 2024
Licensed under