Redis
Last updated
Was this helpful?
Last updated
Was this helpful?
If you're you're using an external Redis service and need to provide a password you can do this by setting the OVERLEAF_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
If you have enable AOF persistence enabled, you'll need to add --appendonly yes
to the command
Run bin/up -d
to recreate the containers
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.
You can read more about enabling AOF persistence in Redis here:
Schedule a maintenance window for the upgrade.
Stop the instance using bin/stop
and take a backup of the config/ and data/ folders.
Run bin/up
to start the instance
Run the command docker exec -it redis sh
Run the command redis-cli
to 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 persistence
into the redis-cli and waiting for aof_rewrite_in_progress
and aof_rewrite_scheduled
to be 0
, and validating that aof_last_bgrewrite_status
is ok
.
Exit the redis-cli by typing exit
and pressing the return key
Exit the redis container by typing exit
and pressing the return key
Run the command ls ./data/redis
and confirm you can see the appendonly.aof file
Edit the config/overleaf.rc file and change the REDIS_AOF_PERSISTENCE
environment variable from false
to true
Run bin/up -d
and make sure the application works (The project editor and history pane are functional).