> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/run-the-platform/zh/xi-tong-guan-li/certificates.md).

# 服务器证书

VergeOS web 服务器需要 HTTPS，并且必须配置至少一个 TLS 证书。默认情况下，系统会安装一个自签名证书。VergeOS 还内置了从以下机构请求并应用免费 TLS 证书的功能： **Let’s Encrypt**。您还可以手动安装来自其他证书颁发机构（CA）的证书。

{% hint style="success" %}
**VergeOS v26 新增**

VergeOS 现在支持每个系统配置多个服务器证书，从而提供更高的灵活性、安全性和弹性
{% endhint %}

### 默认自签名证书

安装后，VergeOS 会自动生成一个自签名证书：

* 分配给 **Verge-API** 接口（用于本地控制台访问）
* 应保留此证书以用于本地访问以及恢复或回退场景。

## 请求并应用 Let’s Encrypt（或其他基于 ACME 的）证书

以下步骤将指导您直接从 VergeOS 界面生成并应用基于 ACME 的证书（默认使用 Let’s Encrypt）。

{% hint style="success" %}
***Let’s Encrypt*****&#x20;是一个全球信任的开放证书颁发机构，提供免费的 TLS 证书以保护网站；其根证书几乎被所有现代浏览器和操作系统信任。**
{% endhint %}

### 步骤：

{% hint style="info" %}
**需要公开访问**

来自 *Let’s Encrypt*以及其他基于 ACME 的提供商的证书，需要一个可公开访问的域名。
{% endhint %}

1. 导航到 **系统** > **证书**.
2. 单击 **新建** 在左侧菜单中。
3. 在 **证书类型** 下拉菜单，选择 **Let’s Encrypt**.
4. 输入 **域** 名（例如， `verge.abcco.com`).
5. 选择一个 **联系用户** 从下拉菜单中选择。证书将使用与该用户关联的电子邮件地址进行注册。要验证用户的电子邮件，请前往 **系统** > **用户**，然后双击该用户条目。
6. 查看 [Let’s Encrypt 服务条款](http://letsencrypt.org/repository) 并勾选 **同意 TOS** 以继续。使用非 Let’s Encrypt 的 ACME 服务器时，您必须查看并接受该提供商的服务条款。

{% hint style="success" %}
**强制续订**

启用后，证书请求会立即发送。若禁用，则会在下一次自动续订周期中处理（通常每天一次）
{% endhint %}

7. **使用其他基于 ACME 的提供商** （除 Let's Encrypt 之外的提供商）
   * 选择 **使用自定义 ACME 服务器** 选项。
   * 提供 **ACME 服务器** 完整目录 URL（例如， `https://ca.smallstep.com/acme/acme/directory`)
   * 有关其他 ACME 服务器设置的说明，请参阅所提供商的文档，例如 *外部帐户绑定的密钥标识符*, *外部帐户绑定的 HMAC 密钥*, *密钥类型*
8. 单击 **提交** 以请求并应用该证书。

## 从另一 CA 安装现有证书（手动输入）

使用此方法安装由除 Let’s Encrypt/ACME 兼容提供商之外的 CA 签发的证书。

### 步骤：

1. 前往 **系统** > **证书**.
2. 单击 **新建** 在左侧菜单中。
3. 在 **证书类型** 下拉菜单，选择 **手动**.
4. （可选）输入一个 **描述** （例如，域名、用途）。
5. 粘贴 **公钥** 和 **私钥** 文本到各自的字段中。
6. 如果证书包含信任链（例如，中间 CA 证书），请粘贴完整链（例如，来自 `chain.pem` 或 `fullchain.pem`）中的内容到 **链密钥** 字段中。
7. 单击 **提交** 以应用证书。

***

## 监听器

**适用于 VergeOS v26.0 及更高版本**

监听器定义了 VergeOS 用于接受传入连接的端口和密码套件设置。

### 默认监听器

VergeOS 包含两个默认监听器：

* `default_443`：监听 TCP 端口 443，使用默认 TLS 密码套件
* `default_80`：监听 TCP 端口 80，并重定向到 HTTPS（443）

{% hint style="warning" %}
**修改默认监听器时请谨慎**

* 仅在满足组织要求时才更改默认监听器条目
* **更改端口：** 确保外部网络防火墙规则允许访问新端口
* **修改密码套件设置：** 查看下面的警告
  {% endhint %}

### 添加自定义监听器

1. 前往 **系统** > **证书**.
2. 单击 **监听器** 在左侧菜单中。
3. 单击 **新建**.
4. 输入一个 **名称** 用于该监听器。
5. （可选）添加一个 **描述**.
6. 输入所需的 **端口** 号。
7. （可选）定义自定义 **密码套件** 字符串。参阅 [OpenSSL 密码套件文档](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html).

{% hint style="warning" %}
**密码套件设置 - 需要高级配置**

* 默认密码套件设置遵循当前 OpenSSL 关于强安全性和广泛兼容性的建议。
* 您可以覆盖这些设置以强制执行更严格的策略，但这样做需要深入了解 TLS 密码套件行为。
* 配置错误的密码套件可能削弱安全性——例如，启用过时算法或禁用前向保密。请始终根据最佳实践验证更改，并在部署前跨客户端环境进行测试。
  {% endhint %}

***

## 注册自定义根 CA

**适用于 VergeOS v26.0 及更高版本**

此功能允许您将受信任的根证书颁发机构（CA）添加到 VergeOS 系统的信任存储中。这对于内部企业 CA、开发环境，或与使用私有证书的系统同步非常有用。

**常见用例**：为了在不允许不安全证书的情况下启用安全站点同步，请将您的内部 CA 注册为根 CA。

### 添加受信任根 CA

1. 前往 **系统** > **证书**.
2. 单击 **根 CA** 在左侧菜单中。
3. 单击 **新建**.
4. 将根证书文本粘贴到 **证书** 字段中。
5. 单击 **提交** 中以保存。

***


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verge.io/run-the-platform/zh/xi-tong-guan-li/certificates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
