Configuration

Synchronization

Configuration around synchronization and Redis.
Environment Variables
Environment variables are configurable for Directus Business Cloud and Enterprise Cloud projects via our Customer Success team. You can also set environment variables in self-hosted projects.

Synchronization in Directus refers to the process of coordinating actions across multiple instances or containers. This is crucial for ensuring consistency and reliability in distributed environments. Directus supports two synchronization stores: memory and redis. The memory store is the default and suitable for single-container deployments, while redis is recommended for multi-container deployments to ensure synchronization across all instances.

VariableDescriptionDefault Value
SYNCHRONIZATION_STOREOne of memory, redis.memory
SYNCHRONIZATION_NAMESPACEHow to scope the channels in Redis.directus-sync

Redis

Redis is a critical component for Directus in multi-container deployments. It enables features like caching, rate-limiting, and WebSockets to function reliably across all instances of Directus. To use Redis, you can configure the following variables:

VariableDescriptionDefault Value
REDIS_ENABLEDWhether or not Redis should be used. Defaults to whether or not you have any of the vars below configured.
REDISRedis connection string. Using this will ignore the other Redis connection parameter environment variables.
REDIS_HOSTHostname of the Redis instance.
REDIS_PORTPort of the Redis instance.
REDIS_USERNAMEUsername for the Redis instance.
REDIS_PASSWORDPassword for the Redis instance.