> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 域名和 SSL 证书

## 域名要求

Dify Enterprise 需要设置 6 个域名。这些域名是：

* 控制台：console.dify.local
* 服务 API：api.dify.local
* 应用：app.dify.local
* 文件：upload.dify.local
* 企业版：enterprise.dify.local
* 触发器：trigger.dify.local

## 在 Helm Chart 值中找到域名配置

### 显示 Helm Chart 值

```bash theme={null}
helm show values dify/dify
```

以下是 Helm chart 值中域名配置的示例。

```yaml theme={null}
global:
  consoleApiDomain: "console.dify.local"
  consoleWebDomain: "console.dify.local"
  serviceApiDomain: "api.dify.local"
  appApiDomain: "app.dify.local"
  appWebDomain: "app.dify.local"
  filesDomain: "upload.dify.local"
  enterpriseDomain: "enterprise.dify.local"
  triggerDomain: "trigger.dify.local"
  ... ...
```

## 如何配置 SSL 证书

### 生成 SSL 证书

```bash theme={null}
kubectl create secret tls example-tls --key example.key --cert example.crt
```

### 更新 Helm 值

#### 将 `useTLS` 设置为 `true`

```yaml theme={null}
global:
  useTLS: true
```

#### 更新 Ingress 值

如果你只有一个证书，可以这样设置：

```yaml theme={null}
ingress:
  tls: 
  - hosts:
    - console.dify.local
    - app.dify.local
    - api.dify.local
    - upload.dify.local
    - enterprise.dify.local
    - trigger.dify.local
    secretName: example-tls
```

如果你有多个证书，可以这样设置：

```yaml theme={null}
ingress:
  tls: 
  - hosts:
    - console.dify.local
    secretName: example-tls
  - hosts:
    - app.dify.local
    secretName: example-tls-2
  - hosts:
    - api.dify.local
    secretName: example-tls-3
  - hosts:
    - upload.dify.local
    secretName: example-tls-4
  - hosts:
    - enterprise.dify.local
    secretName: example-tls-5
  - hosts:
    - trigger.dify.local
    secretName: example-tls-6
```
