> For the complete documentation index, see [llms.txt](https://www.axisnow.io/zh/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.axisnow.io/zh/docs/multi-edge/certificates.md).

# 证书

一次签发或上传后自动同步到每一家边缘并按期续期

证书（Certificate）是服务（Service）域名使用的 TLS 证书，由 AxisNow 统一管理并同步到各家边缘提供商。各家边缘的证书模型并不相同：CloudFront 使用 ACM，ESA 使用站点证书池，EdgeOne 按域名绑定，Cloudflare 使用自定义证书或自行签发。这些差异由 AxisNow 处理，您只需在 AxisNow 配置一次证书，更新后同步一次即可在所有边缘生效。

![证书的签发与同步](https://3062891322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKDgGNU6JXG7cqYCk2aCz%2Fuploads%2Fgit-blob-969022b7b3cbf36bd233a85a4d834ecc823c8d33%2Fcertificate-sync.png?alt=media)

## 证书与服务的关系 <a href="#certificates-and-services" id="certificates-and-services"></a>

证书是账号级资产，在左侧导航的 **证书** 页面统一管理，不属于任何一个服务。一个服务绑定一张证书，这张证书必须覆盖服务的全部域名，通常是一张 `*.example.com` 加 `example.com` 的通配符证书；同一张证书可以被多个服务引用。

## 使用通配符证书 <a href="#use-wildcard-certificates" id="use-wildcard-certificates"></a>

推荐一个主域名用一张 `example.com` 加 `*.example.com` 的通配符证书：服务的域名必须属于同一个主域名，一张通配符证书就能覆盖它现在和将来的全部域名，新增域名不需要再动证书，几个服务也可以共用。用 Let's Encrypt 签发时默认就是这个范围；上传自己的证书时也请准备通配符证书，否则每新增一个主机名都要重新签发并上传一次。

证书有两个独立的动作：**更新**（换一份新的证书材料）和**同步**（把当前材料推送到各家边缘）。两者分开，是因为同步不只发生在更新之后：新建的服务、修复好的边缘账号、上次推送失败后的重试，都需要单独同步。更新证书会保留它的身份，服务的绑定不需要动，各家边缘上记录的也仍是这一张证书。

## 获取证书的两种方式 <a href="#two-ways-to-get-certificates" id="two-ways-to-get-certificates"></a>

### 用 Let's Encrypt 签发 <a href="#issue-with-lets-encrypt" id="issue-with-lets-encrypt"></a>

在 **证书** 页面点击 **签发证书**：

1. 填写 **主机名**，可以是主域名 `example.com`，也可以是任意一个子域名，AxisNow 按它的主域名签发，覆盖范围固定为 `example.com` 和 `*.example.com`。**自动续期并同步到边缘提供商** 默认打开，到期前自动续期并同步到各家边缘。点击 **继续**。
2. 页面显示一条 CNAME 记录，形如 `_acme-challenge.example.com` → `<随机标签>.acme.axisnow-edge.io`。在您的 DNS 中添加这条记录。如果这个名字上已经有 TXT 记录，请先删除，CNAME 不能与其他记录共存。
3. AxisNow 每 15 秒检查一次公网 DNS，看到记录后自动完成 CA 验证并保存证书。

![](https://3062891322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKDgGNU6JXG7cqYCk2aCz%2Fuploads%2Fgit-blob-5901becdf5c638f4d66490de47765082416c6dbd%2Fstep-by-step-03.png?alt=media)

{% hint style="info" %}
上面的 CNAME 记录只需添加一次，之后的续期不再需要改动 DNS，请保留它。
{% endhint %}

### 上传自己的证书 <a href="#upload-your-own-certificate" id="upload-your-own-certificate"></a>

在 **证书** 页面点击 **上传证书**，粘贴 **证书（PEM）**、**私钥（PEM）** 和 **证书链（PEM，可选）**，点击 **保存证书**。AxisNow 校验证书与私钥匹配、证书链完整，并从证书中读取适用域名和有效期。上传的证书不能自动续期，到期前需要您上传新的材料。

## 同步到边缘提供商 <a href="#sync-to-edge-providers" id="sync-to-edge-providers"></a>

在列表行的操作菜单中选择 **同步到边缘提供商**。同步页列出绑定这张证书的所有服务的全部边缘提供商，每行显示状态：

* **已是最新**：该边缘已是这份证书，不需要推送。
* **需要同步**：该边缘尚未使用这份证书，需要推送。
* **受阻**：该边缘暂时不能同步并说明原因。

点击 **同步 N 个边缘提供商** 推送到所有 **需要同步** 的边缘，逐行显示 **完成** 或 **失败**，通常几分钟内完成。

以 Cloudflare for SaaS 接入的域名由 Cloudflare 自行签发证书，仅调度（Steer）方式的边缘由您自行维护，这两类在同步页显示为跳过。

## 更新证书 <a href="#update-certificate" id="update-certificate"></a>

在列表行的操作菜单中选择 **更新证书**，重新签发或上传新证书均可。更新是原地替换，证书身份不变，绑定它的服务无需操作；新证书必须覆盖原证书的全部域名。更新完成后到同步页推送，各家边缘才会换用新证书。上传的证书也可以在此改为 Let's Encrypt 签发，之后即可自动续期。

## 自动续期 <a href="#auto-renewal" id="auto-renewal"></a>

签发的证书在到期前 30 天自动续期，续期成功后自动同步到所有绑定服务的边缘提供商。列表的 **续期** 列显示每张证书的续期状态：

* 上传的证书显示 **手动**，需要您手动更新。
* 签发的证书显示一个开关，打开表示会自动续期，悬停可以看到下次续期的时间；关闭后不再自动续期。
* 续期失败时显示 **失败**，悬停查看原因，常见原因是 `_acme-challenge` 的 CNAME 记录被删除或指向了别处。修复 DNS 后，通过 **更新证书 → 签发** 手动续一次即可恢复。

## 列表与到期提醒 <a href="#list-and-expiry-alerts" id="list-and-expiry-alerts"></a>

**证书** 列表显示每张证书的 **域名**、**签发机构**、**状态** 和 **续期**。**状态** 为 **已生效** 表示有效，**即将过期** 表示 30 天内到期，**已过期** 表示已过期，悬停可以看到具体日期。

## 删除证书 <a href="#delete-certificate" id="delete-certificate"></a>

更换证书材料不需要删除证书，用 **更新证书** 原地更新即可。被任何服务引用的证书不能删除，控制台会列出引用它的服务；只有没有服务使用的证书才能删除。删除证书不会从各家边缘上移除已推送的证书。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.axisnow.io/zh/docs/multi-edge/certificates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
