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
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
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, we recommend reviewing the advantages and disadvantages of running AOF and RDB together.
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/stop
and take a backup of the config/ and data/ folders.Run
bin/up
to start the instanceRun the command
docker exec -it redis sh
Run the command
redis-cli
to open the Redis command line interfaceIn 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 foraof_rewrite_in_progress
andaof_rewrite_scheduled
to be0
, and validating thataof_last_bgrewrite_status
isok
.Exit the redis-cli by typing
exit
and pressing the return keyExit the redis container by typing
exit
and pressing the return keyRun the command
ls ./data/redis
and confirm you can see the appendonly.aof fileEdit the config/overleaf.rc file and change the
REDIS_AOF_PERSISTENCE
environment variable fromfalse
totrue
Run
bin/up -d
and make sure the application works (The project editor and history pane are functional).
Last updated
Was this helpful?