Personalizing your instance
Before you start your Overleaf instance for the first time, update two configuration files with your custom information: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:config/overleaf.rc
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: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.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: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.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.Once you have updated these environment variables, save and quit.4
Setup Sandbox Compile
Next, configure TeX Live Full for sandboxed-compiles.md. Open
config/variables.env and update the following environment variables:config/variables.env
5
Start your instance
To start your instance run: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:
Start the instance
Start without attaching to logs
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.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:
Show the published port
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.

