> 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/files-and-locations.md).

# 文件和位置

本页描述了 Toolkit 用来配置您本地部署的 Overleaf 的配置文件。

### 持久化数据

Overleaf Toolkit 需要存储持久化数据，例如编译 LaTeX 项目所需的文件，以及 MongoDB 数据库的内容。这可以通过将主机上的若干目录挂载到 Docker 容器中，并将数据写入这些目录来实现。

#### 数据目录

该 `sharelatex` 容器需要一个目录来存储与 LaTeX 编译相关的数据。该目录通过 `文件中，或者在` 变量在 `config/overleaf.rc`.

该 `mongo` 容器（如果已启用）需要一个目录来存储其数据库文件，而 `redis` 容器也是如此。这些目录也可在 `config/overleaf.rc`.

#### 文件权限

由于 Docker 以 `root 用户`运行，数据目录最终将归属于 `root 用户` 用户，即使 Toolkit 是由非 root 用户使用的。这不是问题，但如果您打算从容器外部修改持久化数据，这一点值得注意。

### 配置文件位置

所有由用户拥有的配置文件都位于 `config/` 目录中。

该目录 **不包含在** git 版本控制系统中，因此更新 Toolkit 代码不会更改它。Toolkit 将 **不要** 更改目录中的任何数据 `config/` ，未经您的许可。

{% hint style="info" %}
对配置文件的更改不会自动应用到现有容器，即使容器已停止并重新启动（使用 `bin/stop` 和 `bin/start`）。要应用这些更改，请运行 `bin/up`，在后台， `docker compose` 将自动把配置更改应用到新容器。（或者，运行 `bin/up -d`，如果您不想附加到 Docker 日志。）
{% endhint %}

### 该 `overleaf.rc` 文件

该 `config/overleaf.rc` 该文件包含 Toolkit 使用的最重要的顶级配置设置。它包含用于设置变量的语句，格式为： `VARIABLE_NAME=value`

要查看所有可用配置选项的详细说明，请参阅我们的设置部分。

### 该 `variables.env` 文件

该 `config/variables.env` 该文件包含将加载到 `sharelatex` 容器中的环境变量，并用于配置 Overleaf 微服务。其中包括应用程序名称（显示在网页界面的页眉中）、电子邮件发送设置，以及其他高级设置，例如用于 Server Pro 的 SSO。

要查看所有可用环境变量的详细说明，请参阅 [环境变量](broken://pages/8e0a2795a807f6db8f317f47523c2b84136db8ed) 章节。

### 该 `版本` 文件

该 `config/version` 文件包含将用于创建您的 Overleaf 服务器运行实例的 Docker 镜像版本号。

{% hint style="info" %}
对这些配置文件的更改不会自动应用到现有容器，即使容器已停止并重新启动（使用 `bin/stop` 和 `bin/start`）。要应用您的更改，请运行 `bin/up`，Toolkit 将自动为您创建一个应用了配置更改的新容器。
{% endhint %}

### 该 `docker-compose.override.yml` 文件

如果存在， `config/docker-compose.override.yml` 文件将包含在对 `docker compose`的调用中。这对于覆盖 Docker Compose 的特定配置很有用。

另请参阅 [docker-compose 文档](https://docs.docker.com/compose/extends/#adding-and-overriding-configuration) 以了解更多详情。


---

# 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/files-and-locations.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.
