Deploy Redis
Run Redis 7 on Railway with official image and persistence hints.
railwayapp-redis
Just deployed
Redis for railway.app
Redis is an open-source, in-memory data store used as a database, cache, message broker, and queue, prized for its speed and simple key-value model with support for richer structures like lists, sets, and hashes. This template deploys Redis 7 on Railway using the official Docker image, with append-only persistence and password authentication enabled by default.
ποΈ Architecture
flowchart LR
Client(["π¦ App / Client"]) -->|"Redis Protocol"| Proxy["Railway TCP Proxy"]
Proxy -->|"$PORT β 6379"| App["Container\nredis:7-alpine\n(--appendonly yes)"]
App --> Volume[("Volume\n/data")]
Environment variables
REDIS_PASSWORD=replace-with-strong-password
REDIS_PASSWORD is required. The server is started with --requirepass "$REDIS_PASSWORD", so Redis will not accept unauthenticated connections β set it as a generated secret in the Railway dashboard before deploying. Clients must authenticate with AUTH (or redis-cli -a ).
Persistence
railway.toml declares requiredMountPath = "/data" for AOF/RDB files (append-only is enabled). Attach a Railway volume to that path before production traffic β Railway will prompt for it based on this setting, but it is not created automatically.
Health check
The Dockerfile defines a HEALTHCHECK that runs redis-cli -a "$REDIS_PASSWORD" ping on an interval, since Redis has no HTTP endpoint to probe.
Local
docker build -t railwayapp-redis .
docker run --rm -e REDIS_PASSWORD=dev-password -p 6379:6379 railwayapp-redis
Template Content
railwayapp-redis
vergissberlin/railwayapp-redis