Using your own Redis server
Version requirements: We support any version starting from 5.0.
Generally, there is no reason to do this as Sourcegraph only stores ephemeral cache and session data in Redis. However, if you want to use an external Redis server with Sourcegraph, you can follow the deployment specific guidance below:
REDIS_ENDPOINT environment variable to your
docker run command and Sourcegraph will use that Redis server instead of its built-in one. The string must either have the format
or follow the IANA specification for Redis URLs (e.g.,
redis://:[email protected]:6379/2). For example:
docker run [...] -e REDIS_ENDPOINT=redis.mycompany.org:6379 sourcegraph/server:4.0.1
If using Docker for Desktop,
host.docker.internal will resolve to the host IP address.