> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/zh-cn/pei-zhi/overleaf-toolkit/toolkit-settings.md).

# Toolkit 设置

本页面描述在以下内容中支持的环境变量 `config/overleaf.rc` 用于 Toolkit 部署的文件。

该 `config/overleaf.rc` 文件由如下形式的变量定义组成 `NAME=value`。以……开头的行 `#` 开头的行会被视为注释。

{% hint style="info" %}
在更改以下内容后，必须重新创建 Docker 容器 `overleaf.rc` 或 `variables.env` ，方法是运行 `bin/up`.
{% endhint %}

## 容器

### `sharelatex`

| 名称                           | 描述                                                                                                                                                                                                                                                                                             |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PROJECT_NAME`               | <p>设置……的值 <code>--project-name</code> 传递给……的标志 <code>docker-compose</code>。这在同一主机上运行多个 Overleaf 实例时很有用，因为每个实例都可以有不同的项目名称。<br><br>- <strong>默认</strong>: <code>overleaf</code></p>                                                                                                              |
| `OVERLEAF_IMAGE_NAME`        | <p>Server Pro/CE 应用容器使用的 Docker 镜像。这只是 Docker 镜像名称；Docker 镜像标签取自 <code>config/version</code>.<br><br>- <strong>默认：</strong><br>- Server Pro： <code>quay.io/sharelatex/sharelatex-pro</code><br>- 社区版： <code>sharelatex/sharelatex</code></p>                                                   |
| `SERVER_PRO`                 | <p>当设置为 <code>true</code>，告诉 Toolkit 使用 Server Pro 镜像（<code>quay.io/sharelatex/sharelatex-pro</code>），而不是默认的 Server CE 镜像（<code>sharelatex/sharelatex</code>).<br><br>- <strong>默认</strong>: <code>false</code></p>                                                                            |
| `GIT_BRIDGE_ENABLED`         | <p>设置为 <code>true</code> 以启用 git-bridge 功能（仅 Server Pro）。更多信息请参见 <a href="https://www.overleaf.com/learn/how-to/Git_integration"><https://www.overleaf.com/learn/how-to/Git_integration></a> 用户文档。<br><br>- <strong>默认：</strong> <code>false</code></p>                                        |
| `GIT_BRIDGE_IMAGE`           | <p>git-bridge 容器使用的 Docker 镜像（仅 Server Pro）。这只是 Docker 镜像名称；Docker 镜像标签取自 <code>config/version</code>.<br><br>- <strong>默认：</strong> <code>quay.io/sharelatex/git-bridge</code></p>                                                                                                            |
| `GIT_BRIDGE_DATA_PATH`       | 设置将被挂载到……中的目录路径 `git-bridge` 容器（仅 Server Pro），并用于存储 git 仓库。这可以是完整路径（以 `/`），也可以相对于 Toolkit 的基础目录。                                                                                                                                                                                               |
| `GIT_BRIDGE_LOG_LEVEL`       | <p>配置……的日志级别 <code>git-bridge</code> 容器。可用级别： <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>.<br><br>- <strong>默认：</strong> <code>INFO</code></p>                                                                                            |
| `SIBLING_CONTAINERS_ENABLED` | <p>当设置为 <code>true</code>，告诉 Toolkit 使用 <strong>Sibling Containers</strong> 技术，在独立沙箱中编译项目，为每个项目使用单独的 Docker 容器。更多信息请参见 \<server-pro-only-configuration/sandboxed-compiles> 文档。<br><br>- <strong>需要：</strong> <code>SERVER\_PRO=true</code><br>- <strong>默认：</strong> <code>true</code></p>     |
| `SIBLING_CONTAINERS_PULL`    | <p>当设置为 <code>true</code>，告诉 Toolkit 自动拉取使用……设置的所有 TeX Live 镜像 <code>ALL\_TEX\_LIVE\_DOCKER\_IMAGES</code> 设置在 <strong>config/variables.env</strong> 文件，当使用 <code>bin/up</code> 命令时。<br><br>- <strong>默认：</strong> <code>true</code></p>                                                       |
| `DOCKER_SOCKET_PATH`         | <p>设置主机机器（运行 Toolkit 的机器）上的 Docker 套接字路径。当 <code>SIBLING\_CONTAINERS\_ENABLED</code> 为 <code>true</code>时，该套接字将被挂载到容器中，以允许编译服务在主机上启动新的 Docker 容器。<br><br>- <strong>需要：</strong> <code>SIBLING\_CONTAINERS\_ENABLED=true</code><br>- <strong>默认：</strong> <code>/var/run/docker.sock</code></p> |
| `文件中，或者在`                    | <p>设置将被挂载到主 <code>sharelatex</code> 容器中，并用于存储编译数据。这可以是完整路径（以 <code>/</code>），也可以相对于 Toolkit 的基础目录。<br><br>- <strong>默认：</strong> <code>data/overleaf</code></p>                                                                                                                                |
| `OVERLEAF_LISTEN_IP`         | <p>设置容器将绑定到的主机 IP 地址。例如，如果将其设置为 <code>0.0.0.0</code>，则网页界面将可通过任意主机 IP 地址访问。对于直接容器访问， <code>OVERLEAF\_LISTEN\_IP</code> 的值必须设置为你的公网 IP 地址。将 <code>OVERLEAF\_LISTEN\_IP</code> 设置为 <code>0.0.0.0</code> 或主机的外部 IP，通常会在与……配合使用时导致错误。<br><br>- <strong>默认：</strong> <code>127.0.0.1</code></p>     |
| `OVERLEAF_PORT`              | <p>设置容器将绑定到的主机端口。例如，如果将其设置为 <code>8099</code> 和 <code>OVERLEAF\_LISTEN\_IP</code> 被设置为 <code>127.0.0.1</code>，则网页界面将可在 <code><http://localhost:8099></code>.<br><br>- <strong>默认：</strong> <code>80</code></p>                                                                                 |
| `OVERLEAF_LOG_PATH`          | <p>设置将被挂载到主 <code>sharelatex</code> 容器中，并用于将应用日志提供到 Docker 主机。这可以是完整路径（以 <code>/</code>），也可以相对于 Toolkit 的基础目录。删除配置项即可禁用绑定挂载。未设置时，重新创建容器时日志将被丢弃。<br><br>有关日志记录的信息请参见。<br><br>- <strong>默认：</strong> 未设置</p>                                                                                     |

***

### `mongo`

| 名称                | 描述                                                                                                                                                                                                                                                              |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MONGO_ENABLED`   | <p>当设置为 <code>true</code>，告诉 Toolkit 创建一个 MongoDB 容器来托管数据库。当设置为 <code>false</code>时，不会创建此容器，系统将使用由……指定的 MongoDB 数据库 <code>MONGO\_URL</code> 作为替代。<br><br>- <strong>默认</strong>: <code>true</code></p>                                                           |
| `MONGO_URL`       | <p>指定在……时要使用的 MongoDB 连接 URL <code>MONGO\_ENABLED</code> 为 <code>false</code>.<br><br>- <strong>默认</strong>：未设置</p>                                                                                                                                             |
| `MONGO_DATA_PATH` | <p>设置将被挂载到……中的目录路径 <code>mongo</code> 容器中，并用于存储 MongoDB 数据库。这可以是完整路径（以 <code>/</code>），也可以相对于 toolkit 的基础目录。此选项只影响本地 <code>mongo</code> 容器，该容器在……时创建 <code>MONGO\_ENABLED</code> 为 <code>true</code>.<br><br>- <strong>默认</strong>: <code>data/mongo</code></p> |
| `MONGO_IMAGE`     | <p>MongoDB 容器使用的 Docker 镜像。这只是 Docker 镜像名称；Docker 镜像标签应放入 <code>MONGO\_VERSION</code> （见下文）。<br><br>- <strong>默认：</strong> <code>mongo</code></p>                                                                                                               |
| `MONGO_VERSION`   | <p>MongoDB 容器使用的 MongoDB 版本。该值必须以 MongoDB 主版本号和一个点开头，例如 <code>6.0</code> 或 <code>6.0-with-suffix</code>.<br><br>- <strong>默认：</strong> <code>6.0</code></p>                                                                                                     |

***

### `redis`

| 名称                      | 描述                                                                                                                                                                                                                                                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `REDIS_ENABLED`         | <p>当设置为 <code>true</code>，告诉 Toolkit 创建一个 Redis 容器来托管 redis 数据库。当设置为 <code>false</code>时，不会创建此容器，系统将使用由……指定的 Redis 数据库 <code>REDIS\_HOST</code> 和 <code>REDIS\_PORT</code> 作为替代。<br><br>- <strong>默认</strong>: <code>true</code></p>                          |
| `REDIS_HOST`            | <p>指定在……时要使用的 Redis 主机 <code>REDIS\_ENABLED</code> 为 <code>false</code>.<br><br>- <strong>默认</strong>：未设置</p>                                                                                                                                                 |
| `REDIS_PORT`            | <p>指定在……时要使用的 Redis 端口 <code>REDIS\_ENABLED</code> 为 <code>false</code>.<br><br>- <strong>默认</strong>：未设置</p>                                                                                                                                                 |
| `REDIS_DATA_PATH`       | <p>设置将被挂载到……中的目录路径 <code>redis</code> 容器中，并用于存储 Redis 数据库。这可以是完整路径（以 <code>/</code>），也可以相对于 Toolkit 的基础目录。此选项只影响本地 <code>redis</code> 容器，该容器在……时创建 <code>REDIS\_ENABLED</code> 为 <code>true</code>.<br><br>- <strong>默认</strong>: <code>data/redis</code></p> |
| `REDIS_AOF_PERSISTENCE` | <p>为 Redis 启用 AOF（仅追加文件）持久化。这是 <strong>推荐的</strong> Redis 持久化配置。<br><br>更多详情，请参见 <../../maintenance/data-and-backups> 中的 <../../../maintenance/data-and-backups#aof-append-only-file> 部分。<br><br>- <strong>默认：</strong> <code>true</code></p>                 |

***

### `nginx`

| 名称                     | 描述                                                                                                                                                                                                                                                                                     |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NGINX_ENABLED`        | <p>当设置为 <code>true</code>，告诉 Toolkit 创建一个 NGINX 容器作为 TLS 代理。<br><br>- <strong>默认</strong>: <code>false</code></p>                                                                                                                                                                      |
| `NGINX_CONFIG_PATH`    | <p>TLS 代理要使用的 NGINX 配置文件路径。<br><br>- <strong>默认</strong>: <code>config/nginx/nginx.conf</code></p>                                                                                                                                                                                     |
| `NGINX_TLS_LISTEN_IP`  | <p>设置 TLS 代理容器用于 HTTPS 绑定的主机 IP 地址。例如，如果将其设置为 <code>0.0.0.0</code> 则 HTTPS 网页界面将在任意主机 IP 地址上可用。通常应将其设置为主机的外部 IP。<br><br>- <strong>默认</strong>: <code>127.0.1.1</code></p>                                                                                                              |
| `NGINX_HTTP_LISTEN_IP` | <p>设置 TLS 代理容器用于 HTTP 重定向绑定的主机 IP 地址。例如，如果将其设置为 <code>127.0.1.1</code> 则对……的 HTTP 连接将 <code>127.0.1.1</code> 会被重定向到 HTTPS 网页界面。通常应将其设置为主机的外部 IP。不要将其设置为 <code>0.0.0.0</code> 因为这通常会与……产生冲突 <code>OVERLEAF\_LISTEN\_IP</code>.<br><br>- <strong>默认</strong>: <code>127.0.1.1</code></p> |
| `NGINX_HTTP_PORT`      | <p>设置 TLS 代理容器用于 HTTP 绑定的主机端口。<br><br>- <strong>默认</strong>: <code>80</code></p>                                                                                                                                                                                                       |
| `TLS_PORT`             | <p>设置 TLS 代理容器用于 HTTPS 绑定的主机端口。<br><br>- <strong>默认</strong>: <code>443</code></p>                                                                                                                                                                                                     |
| `TLS_PRIVATE_KEY_PATH` | <p>TLS 代理要使用的私钥路径。<br><br>- <strong>默认</strong>: <code>config/nginx/certs/overleaf\_key.pem</code></p>                                                                                                                                                                                 |
| `TLS_CERTIFICATE_PATH` | <p>TLS 代理要使用的公钥证书路径。<br><br>- <strong>默认</strong>: <code>config/nginx/certs/overleaf\_certificate.pem</code></p>                                                                                                                                                                       |


---

# 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://ayakaleaf-pro.ayaka.space/on-premises/zh-cn/pei-zhi/overleaf-toolkit/toolkit-settings.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.
