> ## 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.

# 5. Personalizing your instance

### Personalizing your instance

Before you start your Overleaf instance for the first time, update two configuration files with your custom information:

| File | Read by | Set here |
| - | - | - |
| `config/overleaf.rc` | the Toolkit scripts, such as `bin/up` | how containers run: `OVERLEAF_LISTEN_IP`, `OVERLEAF_PORT`, `SERVER_PRO`, data paths |
| `config/variables.env` | the application inside the container | how Overleaf behaves: `OVERLEAF_SITE_URL`, email, TeX Live images |

**1. Edit the variables file**

Open `config/variables.env` in your favorite text editor and update the environment variables below with the required values.

**2. Listen address and port**

By default, the Toolkit publishes the web interface on `127.0.0.1:80`, so it can only be opened from a browser on the server itself. Other computers get a "connection refused" or "server not found" error. To change this, edit `config/overleaf.rc`:

```bash title="config/overleaf.rc" theme={null}
OVERLEAF_LISTEN_IP=0.0.0.0
OVERLEAF_PORT=8080
```

`OVERLEAF_LISTEN_IP` is the host IP address the container binds to, and `OVERLEAF_PORT` is the host port. Together they form the Docker port mapping `OVERLEAF_LISTEN_IP:OVERLEAF_PORT:80`. Pick the values that match your setup:

| Setup | `OVERLEAF_LISTEN_IP` | `OVERLEAF_PORT` | Open in browser |
| - | - | - | - |
| Only on this machine (default) | `127.0.0.1` | `80` | `http://localhost` |
| Other computers on the LAN or the internet connect directly | `0.0.0.0`, or one IP of the server | `80`, or any free port | `http://<server-ip>:<port>` |
| Behind your own reverse proxy (NGINX, Caddy, Cloudflare Tunnel) on the same host | `127.0.0.1` | any free port | the proxy's URL |
| Behind the Toolkit [TLS proxy](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/overleaf-toolkit/tls-proxy.md) | `127.0.0.1` | `80` | `https://<your-domain>` |

If port `80` is already used on the host, for example by another web server, set `OVERLEAF_PORT` to a free port such as `8080`. Otherwise, `bin/up` fails with `bind: address already in use`.

> [!WARNING]
>
> Ports published by Docker bypass host firewalls such as `ufw` and `firewalld`. With `0.0.0.0`, the instance is reachable from every network the server is connected to. On a cloud server, you also need to allow the port in the provider's security group. Use HTTPS before exposing the instance to the internet, see [TLS proxy](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/overleaf-toolkit/tls-proxy.md).

You can start with the default and open the instance on `localhost` first. To allow access from other computers later, change these two variables in `config/overleaf.rc` and `OVERLEAF_SITE_URL` in `config/variables.env`, then run `bin/up` again to recreate the containers.

**3. Required environment variables**

Update the following variables in `config/variables.env`:

| Name | Description | Example |
| - | - | - |
| `OVERLEAF_SITE_URL` | Where your instance of Overleaf is publicly available. This is used in public links, and when connecting over websockets, so **must be configured correctly**! | `https://overleaf.lilliput.com` |
| `OVERLEAF_EMAIL_FROM_ADDRESS` | This email address will be used as the `from` address for all outgoing emails. | `no-reply@lilliput.com` |
| `OVERLEAF_ADMIN_EMAIL` | The email address where users can reach the person who runs the site. | `it-services@lilliput.com` |

`OVERLEAF_SITE_URL` is the address users type in their browser, not the listen address. Include the port when it is not `80` (HTTP) or `443` (HTTPS), for example `http://192.168.1.20:8080`. Do not use `http://0.0.0.0`. If `OVERLEAF_SITE_URL` does not match the address in the browser, the editor fails to connect, and links in emails and OAuth callbacks point to the wrong place.

Without a mail server, leave `OVERLEAF_EMAIL_FROM_ADDRESS` unset: Overleaf then sends no emails, and you can give new users their activation link yourself, see the Q\&A in [Public Access](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/overleaf-toolkit/authentication/public-access.md).

Also set `OVERLEAF_SESSION_SECRET` to a value generated with `openssl rand -hex 32`. Without it, every `bin/up` that recreates the container, and every upgrade, logs all users out. See the Q\&A in [Environment Variables](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/overleaf-toolkit/environment-variables.md).

Once you have updated these environment variables, save and quit.

**4. Setup Sandbox Compile**

Next, configure TeX Live Full for [sandboxed-compiles.md](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/overleaf-toolkit/sandboxed-compiles.md "mention"). Open `config/variables.env` and update the following environment variables:

```dotenv title="config/variables.env" wrap theme={null}
ALL_TEX_LIVE_DOCKER_IMAGES=ghcr.io/ayaka-notes/texlive-full:2026.1, ghcr.io/ayaka-notes/texlive-full:2025.1
ALL_TEX_LIVE_DOCKER_IMAGE_NAMES=Texlive 2026, Texlive 2025
TEX_LIVE_DOCKER_IMAGE=ghcr.io/ayaka-notes/texlive-full:2026.1
```

**5. Start your instance**

To start your instance run:

```text title="Start the instance" theme={null}
bin/up
```

This command will download the required images including texlive, create the containers (using your customizations), and start the instance. You should see log output from the various Docker containers.

To start them up again later (without attaching to the log output) run:

```text title="Start without attaching to logs" theme={null}
bin/start
```

> [!NOTE]
>
> The Toolkit uses `docker compose` to manage the Overleaf Docker containers. The Toolkit provides a set of scripts which wrap `docker compose` and take care of most details for you.

If all goes well, you should be able to view the login page for your new Overleaf instance by navigating to [http://127.0.0.1/](http://127.0.0.1/) or [http://localhost/](http://localhost/) in your browser. If you changed `OVERLEAF_LISTEN_IP` or `OVERLEAF_PORT`, open the address from the table in the **Listen address and port** step instead, for example `http://<server-ip>:8080`.

To check which address and port the web interface is published on, run:

```text title="Show the published port" theme={null}
bin/docker-compose port sharelatex 80
```

The output, for example `0.0.0.0:8080`, shows the host IP address and port in use. If it shows `127.0.0.1`, the instance is reachable only from the server itself.

> [!WARNING]
>
> Depending on your network configuration and where your Overleaf instance is hosted, you may need to make additional configuration changes. See the Toolkit settings for more details: [toolkit-settings.md](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/overleaf-toolkit/toolkit-settings.md "mention")


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