---
title: "Deploy Apache Kvrocks"
description: "Apache Kvrocks 2.17: Redis-compatible store that keeps data on disk."
category: "Storage"
url: https://railway.com/deploy/apache-kvrocks
---

# Deploy Apache Kvrocks

Apache Kvrocks 2.17: Redis-compatible store that keeps data on disk.

**[Deploy Apache Kvrocks on Railway](https://railway.com/template/apache-kvrocks)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/apache-kvrocks/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### kvrocks https://raw.githubusercontent.com/apache/kvrocks-website/main/static/img/kvrocks-featured.png

- **Image:** apache/kvrocks:2.17.0
- **Start command:** `sh -c 'chown kvrocks:kvrocks /var/lib/kvrocks; exec setpriv --reuid=kvrocks --regid=kvrocks --init-groups kvrocks -c - --dir /var/lib/kvrocks --bind "0.0.0.0 ::" --port 6666 --requirepass "$KVROCKS_PASSWORD" --workers 4 --pidfile /tmp/kvrocks.pid --log-dir stdout </dev/null'`

## Documentation

# Deploy and Host Apache Kvrocks on Railway

Apache Kvrocks is a distributed key-value database that speaks the Redis protocol but stores data in RocksDB on disk. Existing Redis clients and commands work against it, while the dataset can grow far beyond the available memory. It is an Apache Software Foundation project used for caches, queues and counters.

## About Hosting Apache Kvrocks

This template runs the official `apache/kvrocks:2.17.0` image as one service. Data lives on a Railway volume, so keys survive restarts and redeploys, and memory use stays low even for large datasets. The server requires the generated password and listens on IPv4 and IPv6. Services in the project connect over the private network, and a TCP proxy allows connections from outside Railway. Kvrocks accepts `AUTH ` but not the two-argument `AUTH default ` form, so connection URLs leave the username empty. The process runs as the unprivileged `kvrocks` user and shuts down cleanly on redeploy.

## Common Use Cases

- A Redis-compatible cache or store for data that does not fit in memory
- Persistent counters, sessions and rate-limit buckets that must survive restarts
- Replacing a large in-memory Redis to cut memory costs

## Dependencies for Apache Kvrocks Hosting

- `apache/kvrocks:2.17.0` (official image)
- A Railway volume at `/var/lib/kvrocks` for the RocksDB data

### Deployment Dependencies

- [Apache Kvrocks](https://kvrocks.apache.org/)
- [Kvrocks 2.17.0 release](https://github.com/apache/kvrocks/releases/tag/v2.17.0)
- [Railway TCP proxy](https://docs.railway.com/reference/tcp-proxy)

### Implementation Details

| Service | Source | Networking | Storage |
| --- | --- | --- | --- |
| kvrocks | `apache/kvrocks:2.17.0` | private port 6666 + TCP proxy | volume at `/var/lib/kvrocks` |

| Variable | Purpose |
| --- | --- |
| `KVROCKS_PASSWORD` | Generated password (`requirepass`) |
| `REDIS_URL` | `redis://:@kvrocks.railway.internal:6666` for services in the project |
| `REDIS_PUBLIC_URL` | Same, through the TCP proxy |

Reference it from another service with `${{kvrocks.REDIS_URL}}`. The start command passes settings as flags (`--bind "0.0.0.0 ::"`, `--workers 4`, `--requirepass`) and reads an empty config from standard input, so no config file is needed on the volume.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Apache Software Foundation or the Kvrocks project.

## Why Deploy Apache Kvrocks 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 Apache Kvrocks 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.


## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/apache-kvrocks
