> For the complete documentation index, see [llms.txt](https://docs.overleaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/files-and-locations.md).

# Files and locations

This page describes the configuration files that are used by the Toolkit to configure your on-premises deployment of Overleaf.

## Persistent Data

The Overleaf Toolkit needs to store persistent data, such as the files required to compile LaTeX projects, and the contents of the MongoDB database. This is achieved by mounting a few directories from the host machine into the Docker containers, and writing the data to those directories.

### Data Directories

The **sharelatex** container requires a directory in which to store data relating to LaTeX compiles. This directory is set with the `OVERLEAF_DATA_PATH` variable in `config/overleaf.rc`.

The **mongo** container, if it is enabled, requires a directory in which to store it's database files, and the same is true of the **redis** container. These directories can also be configured in `config/overleaf.rc`.

### File Permissions

Because Docker runs as `root`, the data directories will end up being owned by the `root` user, even if the Toolkit is being used by a non-root user. This is not a problem, but is worth being aware of, if you intend to alter the persistent data from outside of the containers.

With rootless Podman, `bin/podman-setup` sets the ownership of the data directories for you.

On hosts with SELinux enabled, the data directories are relabelled when the containers start, so the containers can access them.

## Configuration file location

All user-owned configuration files are found in the `config/` directory.

This directory is **excluded** from the git revision control system, so it will not be changed by updating the Toolkit code. The Toolkit will **not** change any data in the `config/` directory without your permission.

{% hint style="info" %}
Changes to the configuration files will not be automatically applied to existing containers, even if the container is stopped and restarted (with `bin/stop` and `bin/start`). To apply the changes, run `bin/up`, and behind the scenes, `docker compose` will automatically apply the configuration changes to a new container. (Or, run `bin/up -d`, if you prefer to not attach to the Docker logs.)
{% endhint %}

### The `overleaf.rc` file

The `config/overleaf.rc` file contains the most important **top level** configuration settings used by the Toolkit. It contains statements that set variables, in the format `VARIABLE_NAME=value`.

To see a breakdown of all available configuration options see our settings section.

### The `variables.env` file

The `config/variables.env` file contains environment variables that are loaded into the `sharelatex` container, and used to configure the Overleaf microservices. These include the name of the application, as displayed in the header of the web interface, settings for sending emails, and other premium settings such as SSO for use with Server Pro.

To see a breakdown of all available environment variables see the [Environment variables](https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/environment-variables.md) section.

### The `version` file

The `config/version` file contains the version number of the Docker image that will be used to create the running instance of your Overleaf server.

{% hint style="info" %}
Changes to these configuration files will not be automatically applied to existing containers, even if the container is stopped and restarted (with `bin/stop` and `bin/start`).

To apply your changes, run `bin/up`, and the Toolkit will automatically create a new container for you with configuration changes applied.
{% endhint %}

### The `docker-compose.override.yml` file

If present, the `config/docker-compose.override.yml` file will be included in the invocation to `docker compose`. This is useful for overriding configuration specific to Docker compose.

See the [docker-compose documentation](https://docs.docker.com/compose/extends/#adding-and-overriding-configuration) for more details.

### The `config/seccomp/<version>/clsi-profile.json` file

The seccomp profile extracted from the Server Pro image, when running on Podman.

### `config/selinux/`&#x20;

The SELinux policy module built by `bin/podman-setup --apply`, when `SELINUX_MODE=managed`


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/files-and-locations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
