切换主题
🚀 快速开始
本指南将帮助您在 5 分钟内快速部署和使用 WuEasy Cert Server。
📋 前置要求
- 操作系统:Windows、Linux 或 macOS
- 域名:需要有自己的域名并可以配置 DNS
- 网络:服务器需要能访问互联网
🔽 下载安装
shell
# Windows 64位下载地址
https://software.wueasy.com/cert/latest/cert_win_64.zip
1
2
2
shell
# Linux系统(Intel/AMD处理器)
https://software.wueasy.com/cert/latest/cert_linux_amd64.zip
# Linux系统(飞腾/鲲鹏等ARM处理器)
https://software.wueasy.com/cert/latest/cert_linux_arm64.zip
1
2
3
4
5
2
3
4
5
shell
# Mac系统(M1/M2/M3芯片)
https://software.wueasy.com/cert/latest/cert_mac_arm64.zip
# Mac系统(Intel处理器)
https://software.wueasy.com/cert/latest/cert_mac_amd64.zip
1
2
3
4
5
2
3
4
5
如何选择正确的版本?
Windows系统:直接使用Windows 64位版本
AMD64架构(x86_64):
- Linux系统:使用 Linux AMD64版本
- Mac系统:使用 Mac AMD64版本
- 适用于:Intel或AMD处理器
ARM64架构(aarch64):
- Linux系统:使用 Linux ARM64版本(飞腾/鲲鹏等)
- Mac系统:使用 Mac ARM64版本(M1/M2/M3芯片)
可以通过以下命令查看系统架构:
bash
# Linux/Mac系统
uname -m
# 输出说明:
# x86_64: 选择AMD64版本
# aarch64/arm64: 选择ARM64版本
1
2
3
4
5
6
2
3
4
5
6
⚙️ 基础配置
创建配置文件 config.yaml
:
yaml
log:
level: info
# 证书服务端配置
cert_server:
enabled: true # 启用服务端功能
port: 9897
tokens: #访问令牌
- "0EFECC68862C41B88A6B74D1A6BC7D06"
# ACME配置
acme:
environment: production # production 或 staging(建议先用staging测试)
renewal_threshold: 30 # 续期阈值(天数)
# 证书列表配置
domains:
# 泛域名证书示例(DNS验证)
- id: "web-cert" # 证书id,需要唯一(可以是UUID)
cert_name: example #证书名称,需要唯一,证书存储的文件夹名称
domain: "www.example.com" #域名
domains: # 证书域名集合,可以配置多个,配置后domain会失效
- "example.com"
- "*.example.com"
email: "admin@example.com" #邮箱
challenge_type: dns-01 # 验证方式,推荐使用dns方式
dns_provider: aliyun # dns厂商
dns_config: #dns配置
access_key: demo
secret_key: demo
enabled: true # 是否启用
# 证书客户端配置
cert_client:
enabled: true # 是否启用客户端功能
# server_url: "http://127.0.0.1:9897" # 证书服务器地址(留空启用本地模式)
# token: "0EFECC68862C41B88A6B74D1A6BC7D06" #访问令牌
certificates: #客户端证书配置列表
- id: "web-cert" #本地证书文件路径
cert_path: "/etc/ssl/certs/example.crt" # 本地证书文件路径
key_path: "/etc/ssl/private/example.key" # 本地私钥文件路径
post_update_script: "/etc/scripts/reload-nginx.sh" # 更新后执行脚本(例如:同步成功后重新加载nginx,促使证书生效)
enabled: true # 是否启用
enabled: true # 是否启用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
🚀 启动服务
bash
# 启动服务
./cert_linux_amd64
# 使用指定配置文件
./cert_linux_amd64 -c config.yaml
1
2
3
4
5
2
3
4
5
启动后,您将看到类似以下的日志输出:
2024-01-01 10:00:00 [INFO] 证书服务端启动,端口: 9897
2024-01-01 10:00:00 [INFO] 证书客户端启用本地模式
2024-01-01 10:00:00 [INFO] 开始检查证书状态...
2024-01-01 10:00:01 [INFO] 域名 example.com 的证书不存在,开始申请新证书
1
2
3
4
2
3
4
🛡️ 安全建议
使用 Token 认证:
yamlcert_server: tokens: ["your_random_secure_token"]
1
2限制访问端口:
- 仅对必要的 IP 开放 API 端口
- 使用防火墙规则限制访问
定期备份:
- 备份
certs
目录 - 备份
accounts
目录 - 备份配置文件
- 备份
📋 常见问题
Q: 证书申请失败怎么办?
A: 检查以下几点:
- 域名是否正确解析
- 80 端口是否开放(HTTP-01)
- DNS 配置是否正确(DNS-01)
- 网络是否正常
Q: 如何查看详细日志?
A: 修改日志级别:
yaml
log:
level: debug
1
2
2
Q: 支持哪些 DNS 提供商?
A: 支持 25+ 主流 DNS 提供商,包括 Cloudflare、阿里云、腾讯云等。详见 DNS 提供商配置。