Deploy Serverless Redis | Open Source Upstash Alternative with REST API
Redis behind an HTTP REST API — drop-in for @upstash/redis
Just deployed
Redis
Just deployed
/data
Deploy and Host Serverless Redis on Railway
Serverless Redis puts an HTTP REST API in front of a real Redis instance, speaking the same protocol as Upstash. Anywhere you cannot open a TCP socket — Cloudflare Workers, Vercel Edge, Deno Deploy, a browser — you can still talk to Redis over fetch.
About Hosting Serverless Redis
Two services: Redis Stack for storage, and a small HTTP server in front of it that accepts Upstash-shaped requests and executes them. The @upstash/redis SDK works against it unchanged — swap the URL and token, keep the code.
The HTTP service holds the public domain and is protected by a generated bearer token. Redis itself sits on the private network with a generated password and a persistent volume.
Common Use Cases
- Edge and serverless runtimes: Cloudflare Workers, Vercel Edge Functions and Deno Deploy cannot open raw TCP connections; this makes Redis reachable from all of them.
- Leaving Upstash without rewriting code: Point the same SDK at your own deployment and keep the per-request pricing model out of the picture.
- Rate limiting and session storage from the browser or a Lambda: Anything that already speaks HTTP gets Redis semantics without a connection pool.
Dependencies for Serverless Redis Hosting
Deployment Dependencies
- Redis Stack — storage, with a persistent volume
- The serverless-redis HTTP server
- Client side: @upstash/redis or plain
fetch
Implementation Details
SR_TOKEN is the bearer token clients send. It is generated per deployment, and it is the only thing standing between the public domain and your data — treat it as a password, and rotate it by editing the variable and redeploying.
The HTTP server binds ::, so it answers both the public domain and *.railway.internal. Services inside the same project can therefore use PRIVATE_URL and skip the public round trip entirely.
REDIS_URL carries ?family=0, which lets the client resolve both A and AAAA records — Railway's private network is IPv6-only, and a client pinned to IPv4 will not connect.
SR_IDLE_TIMEOUT_MS closes idle upstream connections after five minutes. Raise it if you see reconnect churn under steady traffic.
Redis Stack is the image rather than plain Redis, so JSON, search and time-series commands are available through the same HTTP API.
Why Deploy Serverless Redis 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 Serverless Redis 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.
Resources: small — the HTTP layer is a few tens of megabytes and Redis is as large as your dataset. Expect a few dollars a month at modest volume, with memory the thing to watch as keys accumulate.
Template Content