Valkey on Railway
Valkey 9, the BSD-licensed Redis alternative, with persistence and daily backups on Railway.
Valkey is an open-source key-value store that continues the Redis 7.2 code base under the Linux Foundation. It speaks the Redis protocol, so existing Redis clients and frameworks connect without code changes.
It is used for caches, sessions, rate limiters, pub/sub, streams and job queues. With the JSON, Bloom and Search modules it also handles JSON documents, vector and full-text search, and Bloom filters.
Valkey is licensed under BSD-3-Clause, which is the main reason teams choose it over Redis 8.
What Valkey can do
- Redis protocol compatibility
- JSON, Bloom and Search modules
- AOF and RDB persistence
- Password on every connection
- Memory cap that refuses writes instead of being killed
- Daily verified backups
What people use it for
- Drop-in replacement for Redis behind caches and sessions
- Job queues and background workers
- JSON documents and vector search for RAG
- Deduplication with Bloom filters
Videos
Running Valkey on Railway
On Railway, the Valkey template deploys Valkey 9.1.3 with the JSON, Bloom and Search modules from the valkey-bundle image, a generated password and AOF plus RDB persistence on a volume at /data. A cron job writes a checked snapshot to a Railway Bucket daily at 03:30 UTC, with 14-day retention. It exposes the same variables as Railway's Redis service, so switching a reference is simple. It runs one primary without a web UI, and cost follows memory and the volume.
Valkey templates on Railway
Tracklayer templates are listed first. Other Valkey templates follow, ordered by total deployments on Railway. How this works.
Deployment numbers as of 2026-11-20.
Questions about Valkey
How do I connect to Valkey?
Copy REDIS_PUBLIC_URL from the Valkey service and use it with valkey-cli or redis-cli. From other Railway services use the REDIS_URL reference on the private network.
How do I switch from Railway's Redis?
Valkey exposes the same variables. Change the reference in your app from the Redis service to the Valkey service and redeploy. Existing data must be copied at the command level.
What happens when memory is full?
maxmemory is set to 75% of the service's memory limit with the noeviction policy, so writes fail instead of the server being killed. For a cache, set VALKEY_MAXMEMORY_POLICY to allkeys-lru or allkeys-lfu.
How do backups and restores work?
The backup job writes a checked snapshot and a manifest to the Bucket daily. To restore, set VALKEY_RESTORE_FROM to a run folder and deploy; the previous data is moved aside, not deleted.
What is not included?
Only one primary: replicas, Sentinel and cluster mode are not part of the template. The TCP proxy carries the Redis protocol without TLS; delete it if only Railway services connect.
Guides
Similar apps
Tracklayer maintains the templates marked as such; Valkey is a trademark of its owners and this site is not affiliated with them.