Skip to main content
This page describes the environment variables that are supported in the config/variables.env file for Toolkit deployments. The config/variables.env file consists of variable definitions in the form NAME=value; lines beginning with # are treated as comments.
It is necessary that you re-create the Docker containers after changing anything in config/overleaf.rc or config/variables.env by running bin/up.

All versions

These environment variables are compatible with Overleaf Community Edition, Overleaf Server Pro and Ayakaleaf Pro, and provide an easy migration path between them. They can also be used with both Toolkit and Docker Compose deployments.
It is possible to enforce password restrictions on users when using the Overleaf login system (local accounts), not an SSO option such as LDAP. For SSO accounts, password policies will be enforced by your identity provider or directory service, additionally allowing support for multi-factor authentication.

Q&A

Answer: OVERLEAF_SESSION_SECRET is not set. Without it, Overleaf signs the session cookies with a random secret that the container generates when it is created. bin/up recreates the container whenever config/variables.env or config/overleaf.rc changed, and so does every upgrade, so the secret changes and every existing login cookie stops matching. The sessions themselves are still in Redis; only the signature is no longer valid. Stopping and starting the same container (bin/stop and bin/start) keeps the secret.To fix it, set a fixed secret once in config/variables.env and run bin/up -d:
Users are logged out one last time when you add it. After that, sessions survive bin/up and upgrades. Keep the value with your backups, and use the same value on every instance if you run more than one.
Answer: No, there is no environment variable for it. The login form accepts 20 requests per minute from one IP address, and 10 attempts per email address in 2 minutes; a successful login clears the count for that email address. Behind a reverse proxy, set OVERLEAF_TRUSTED_PROXY_IPS so that Overleaf sees each user’s own IP address, otherwise all users share the proxy’s address and its limit.
Last modified on November 1, 2026