Redis
Enabling password authentication
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
services:
redis:
command: "redis-server --requirepass <YOUR-PASSWORD>"If you have enable AOF persistence enabled, you'll need to add --appendonly yes to the command
Run
bin/up -dto recreate the containers
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.
You can read more about enabling AOF persistence in Redis here: https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/#how-i-can-switch-to-aof-if-im-currently-using-dumprdb-snapshots
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 instanceRun the command
docker exec -it redis shRun the command
redis-clito open the Redis command line interfaceIn the redis-cli, run the command
config set appendonly yesNow 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 keyExit the redis container by typing
exitand pressing the return keyRun the command
ls ./data/redisand confirm you can see the appendonly.aof fileEdit the config/overleaf.rc file and change the
REDIS_AOF_PERSISTENCEenvironment variable fromfalsetotrueRun
bin/up -dand make sure the application works (The project editor and history pane are functional).
Last updated
Was this helpful?