Deploy Valkey | (Just Updated) Redis Alternative, Crash-Safe Data, Memory Capped

Valkey Redis fork. Password on, AOF every second, memory capped, data kept

Deploy Valkey | (Just Updated) Redis Alternative, Crash-Safe Data, Memory Capped

Just deployed

/data

Deploy and Host Valkey on Railway

Valkey is the Linux Foundation's open-source fork of Redis. It speaks the Redis protocol, so existing clients, queues, rate limiters and caches connect to it unchanged, and it keeps the dataset in memory for sub-millisecond reads.

This template runs Valkey 9.1 as a single service from a digest-pinned official image: the Redis port on a Railway TCP proxy, and a Railway volume holding an append-only file that is flushed every second.

About Hosting Valkey

  • A crash does not erase your data. A stock Valkey container saves a snapshot only every hour (and only after a change), so a hard kill, such as an out-of-memory kill or a node failure, loses everything written since. This template turns on the append-only file with a one-second flush, so a hard kill loses at most the last second.
  • A password is required from the first connection. It is generated per deploy; anonymous clients are rejected with NOAUTH.
  • Memory and threads follow your plan. The start command reads the container's memory and CPU limits and sets maxmemory to 70% of the memory limit, leaving headroom for rewrites, with the noeviction policy, so a full instance refuses writes instead of being killed. It also sets the I/O thread count from the container's cores, not the host's.
  • Two ways in. Services in the same project use the private URL; clients elsewhere use the TCP proxy URL.

Common Use Cases

  • A drop-in replacement for Redis as a cache or session store
  • Job queues (BullMQ, Sidekiq, Celery) and rate limiters on the Redis protocol
  • Leaderboards, counters and real-time state shared between services
  • Pub/sub and streams between your Railway services

Dependencies for Valkey Hosting

  • One Railway volume for the append-only file and snapshots (created by the template)

Deployment Dependencies

Implementation Details

VariablePurpose
VALKEY_PASSWORDPassword for connections, generated per deploy.
VALKEY_PRIVATE_URLredis:// URL on the private network, for services in the same project.
VALKEY_PUBLIC_URLredis:// URL on the TCP proxy, for clients outside Railway.

Python:

import redis
r = redis.from_url("")
r.set("hello", "world")

Why Deploy Valkey on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Valkey on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
8
View Template
Redis
Self Host Latest Redis with Railway

8
View Template
EasyImg
Simple self-hostable Nuxt.js personal image hosting system.

Muhammad Bilal
0