> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 4. 个性化你的实例

> 将你的设置放入替代 config/variables.env 的 ConfigMap 中。

ConfigMap `overleaf-env` 取代了 Toolkit 的 `config/variables.env`：[Toolkit 文档](https://ayakaleaf-pro.mintlify.site/zh-CN/on-premises/configuration/overleaf-toolkit/environment-variables.md)中的每个环境变量都放在这里，而密钥则放入[第 2 步](https://ayakaleaf-pro.mintlify.site/zh-CN/on-premises/installation/using-kubernetes/2.-create-the-namespace-and-secrets.md)中的 Secret。

```yaml title="30-config.yaml" wrap theme={null}
apiVersion: v1
kind: ConfigMap
metadata:
  name: overleaf-env
  namespace: overleaf
data:
  OVERLEAF_APP_NAME: Ayakaleaf Pro
  OVERLEAF_SITE_URL: http://192.0.2.10:30080      # the address users open; https://... behind TLS
  OVERLEAF_ADMIN_EMAIL: admin@example.com
  # Emails: add the sender and the SMTP server together, see Email delivery
  # All members, so that the driver finds the primary even when mongo-0 is down
  OVERLEAF_MONGO_URL: mongodb://mongo-0.mongo:27017,mongo-1.mongo:27017,mongo-2.mongo:27017/sharelatex?replicaSet=overleaf
  OVERLEAF_REDIS_HOST: redis
  REDIS_HOST: redis
  ENABLED_LINKED_FILE_TYPES: project_file,project_output_file,url
  ENABLE_CONVERSIONS: "true"
  EMAIL_CONFIRMATION_DISABLED: "true"
  # Requests arrive from kube-proxy or your ingress controller, inside the pod network
  OVERLEAF_TRUSTED_PROXY_IPS: loopback,10.244.0.0/16
  # Sandboxed compiles. The HOST_DIR paths are paths ON THE NODE: the hostPath volumes that
  # the Deployment mounts at /var/lib/overleaf/data/{compiles,output,cache}.
  SANDBOXED_COMPILES: "true"
  SANDBOXED_COMPILES_SIBLING_CONTAINERS: "true"
  DOCKER_RUNNER: "true"
  SANDBOXED_COMPILES_HOST_DIR_COMPILES: /srv/overleaf/compiles
  SANDBOXED_COMPILES_HOST_DIR_OUTPUT: /srv/overleaf/output
  SANDBOXED_COMPILES_HOST_DIR_CACHE: /srv/overleaf/cache
  # Each image must be pulled into Docker on every node that can run Ayakaleaf Pro (step 0)
  ALL_TEX_LIVE_DOCKER_IMAGES: ghcr.io/ayaka-notes/texlive-full:2026.1
  ALL_TEX_LIVE_DOCKER_IMAGE_NAMES: TeX Live 2026
  TEX_LIVE_DOCKER_IMAGE: ghcr.io/ayaka-notes/texlive-full:2026.1
```

```bash theme={null}
kubectl apply -f 30-config.yaml
```

| 变量 | 设置为 |
| - | - |
| `OVERLEAF_SITE_URL` | 用户在浏览器中输入的 URL。使用[第 5 步](https://ayakaleaf-pro.mintlify.site/zh-CN/on-premises/installation/using-kubernetes/5.-deploy-ayakaleaf-pro.md)中的 NodePort 时，为任意节点的 IP 加端口 `30080`；位于 ingress 或负载均衡器之后时，为其 URL。 |
| `OVERLEAF_MONGO_URL` | 你的副本集。使用 `?replicaSet=` 并填入 `rs.initiate` 中的名称。 |
| `OVERLEAF_REDIS_HOST` 和 `REDIS_HOST` | 两者都设置为 Redis Service。 |
| `OVERLEAF_TRUSTED_PROXY_IPS` | `loopback` 加上你的代理所连接的网络。`10.244.0.0/16` 是 flannel 的 pod 网络；请使用你集群的 pod CIDR。 |
| `SANDBOXED_COMPILES_HOST_DIR_*` | 编译卷在节点上的路径。它们必须与[第 5 步](https://ayakaleaf-pro.mintlify.site/zh-CN/on-premises/installation/using-kubernetes/5.-deploy-ayakaleaf-pro.md)中的 `hostPath` 卷一致。 |

在 HTTPS 之后运行时，还需设置 `OVERLEAF_SECURE_COOKIE: "true"`，参见 [TLS 代理](https://ayakaleaf-pro.mintlify.site/zh-CN/on-premises/configuration/overleaf-toolkit/tls-proxy.md)。

> [!NOTE]
>
> 更改后的 ConfigMap 只有在重启后才会作用于正在运行的 pod：`kubectl -n overleaf rollout restart deployment/overleaf`。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.