Featured image of post 使用 ACME 在 DNSPod 上自动配置 SSL 证书指南

使用 ACME 在 DNSPod 上自动配置 SSL 证书指南

本指南详细介绍如何通过 ACME 协议在 DNSPod 平台实现 SSL 证书的自动化申请与配置,包含 DNS 解析验证的完整操作流程。

这篇文章已发布 917 天,部分内容可能已过时。如有疑问,可在评论区留言。

Docker 部署 acme.sh

docker-compose.yml,将 DNSPod API ID 和 Key 替换为实际值。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
services:
  acme-sh:
    image: neilpang/acme.sh:latest
    container_name: acme
    restart: always
    command: daemon
    environment:
      - TZ=Asia/Shanghai
      - DP_Id=******            # DNSPod API ID
      - DP_Key=**************** # DNSPod API Key
    volumes:
      - ./certs/:/acme.sh/

配置 acme.sh

1
2
3
4
5
6
# 启动 acme.sh
docker compose up -d
# 进入 acme.sh 容器
docker compose exec -it acme sh
# 设置默认 CA
acme.sh --set-default-ca --server letsencrypt

申请证书

生成证书,将 www.example.com 替换为实际域名。证书会挂载到 ./certs/ 目录下。

1
acme.sh --issue --dns dns_dp -d www.example.com
面朝大海,春暖花开。
使用 Hugo 构建
主题 StackJimmy 设计