Railway

Deploy Lux

A drop-in Redis replacement. 3-5x faster.

Deploy Lux

Just deployed

/data


Deploy and Host Lux on Railway

Lux is a drop-in Redis replacement written in Rust. It's multi-threaded with a sharded concurrent architecture that delivers 3–5x faster throughput than Redis by using all available cores. It speaks the RESP protocol, so it works with every existing Redis client — zero code changes required.

About Hosting Lux

Deploying Lux on Railway uses the official Docker image (ghcr.io/lux-db/lux:latest), which weighs in at just 856KB. Lux starts instantly and auto-tunes its shard count based on available CPU cores. For persistence, Lux takes automatic snapshots at a configurable interval (default 60 seconds), so you'll want a persistent volume to retain data across redeploys. Authentication can be enabled by setting the LUX_PASSWORD environment variable. Connect with any Redis client by pointing it at your Railway-provided domain — no code changes needed compared to an existing Redis setup.

Common Use Cases

  • Replacing Redis or Valkey as a high-performance caching layer with significantly higher throughput on multi-core machines
  • Running a lightweight, persistent key-value store for session management, rate limiting, or pub/sub messaging
  • Providing a Redis-compatible backend for existing applications using ioredis, redis-py, go-redis, or any other RESP client without code changes

Dependencies for Lux Hosting

  • Docker image: ghcr.io/lux-db/lux:latest (856KB)
  • Persistent volume for snapshot data

Deployment Dependencies

Implementation Details

Environment variables for the Railway service:

VariableDefaultDescription
LUX_PORT6379TCP port
LUX_PASSWORD(none)Enable AUTH for client connections
LUX_DATA_DIR/dataSnapshot directory (mount your volume here)
LUX_SAVE_INTERVAL60Snapshot interval in seconds (0 to disable)
LUX_RESTRICTED(none)Set to 1 to disable KEYS, FLUSHALL, FLUSHDB

Mount a persistent volume at the path set in LUX_DATA_DIR to preserve snapshots across redeploys. Connect from your application services using a Railway private network reference variable for low-latency internal access.

Why Deploy Lux 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 Lux 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
Postgres Backup to Cloudflare R2 (S3-Compatible)
Automated PostgreSQL backups to S3-compatible storage with encryption

Aman
View Template
ReadySet
A lightweight caching engine for Postgres

Milo
View Template
Simple S3
Deploy a S3-compatible storage service with a pre-named bucket.

Joey Chilson