Enabling password authentication
If you’re using an external Redis service and need to provide a password you can do this by setting theOVERLEAF_REDIS_PASS and REDIS_PASSWORD environment variables in the config/variables.env file and running the bin/up -d command to recreate the sharelatex container.
If you’re running a local instance of Redis, you’ll need to configure the redis service to start with password authentication. After setting the above environment variables, you’ll also need to complete these additional steps:
Create a docker-compose.override.yml file in the config/ directory with the following content:
config/docker-compose.override.yml
bin/up -d to recreate the containers.
Enabling Append-Only File Persistence
(Original: https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/redis#enabling-append-only-file-persistence) Redis AOF (Append-Only File) persistence provides a robust way to ensure data durability by logging every write operation received by the server. Unlike RDB snapshots, which take point-in-time copies of your dataset, AOF keeps a complete record of all changes made to your data.Disabling RDB is optional. It’s generally recommended that both persistence methods be used together. Before making any changes in production, review the advantages and disadvantages of running AOF and RDB together.
- Schedule a maintenance window for the upgrade.
- Stop the instance using
bin/stopand take a backup of the config/ and data/ folders. - Run
bin/upto start the instance - Run the command
docker exec -it redis sh - Run the command
redis-clito open the Redis command line interface - In the redis-cli, run the command
config set appendonly yes - Now you’ll need to wait for AOF rewrite to finish persisting the data. You can do that by typing
INFO persistenceinto the redis-cli and waiting foraof_rewrite_in_progressandaof_rewrite_scheduledto be0, and validating thataof_last_bgrewrite_statusisok. - Exit the redis-cli by typing
exitand pressing the return key - Exit the redis container by typing
exitand pressing the return key - Run the command
ls ./data/redisand confirm you can see the appendonly.aof file - Edit the config/overleaf.rc file and change the
REDIS_AOF_PERSISTENCEenvironment variable fromfalsetotrue - Run
bin/up -dand make sure the application works (The project editor and history pane are functional).

