---
title: "Deploy Dragonfly"
description: "Dragonfly — Redis-compatible in-memory data store built for scale"
category: "Storage"
url: https://railway.com/deploy/dragonfly-1
---

# Deploy Dragonfly

Dragonfly — Redis-compatible in-memory data store built for scale

**[Deploy Dragonfly on Railway](https://railway.com/template/dragonfly-1)**

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

- **Creator:** INAPP
- **Category:** Storage
- **Total deploys:** 1

## Template content

### dragonfly

- **Image:** dragonflydb/dragonfly:v1.27.1@sha256:385cb73078f4dabe43d536766842eab444f3d791b0fcf86951decdcbcda37917
- **Public domain:** Yes

## Documentation

# Deploy and Host

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.com/deploy/dragonfly-1)

![OG Image](https://raw.githubusercontent.com/INAPP-Mobile/railway-dragonfly/main/og-image.svg)

Dragonfly is a Redis-compatible, high-performance in-memory database. It's a modern alternative to Redis with 30K+ GitHub stars, typically 25% less memory usage, and up to 70% better performance.

## About Hosting

Dragonfly runs as a single container on Railway with:
- Port: 6379 (Redis-compatible, automatically managed by Railway)
- No external dependencies - it IS the database
- ~48MB Docker image fits any tier

## Why Deploy

- Drop-in Redis replacement - same protocol, zero code changes
- Better performance - up to 70% faster than Redis
- Lower memory usage - typically 25% less
- Single binary deployment
- Massive community (30K+ GitHub stars)

## Common Use Cases

- Session cache for web applications
- Real-time analytics and counters
- Leaderboards and rate limiting
- Message queues and pub/sub
- Primary database for small workloads

## Dependencies for Dragonfly

### Deployment Dependencies

No external dependencies required.

---

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `DRAGONFLY_PORT` | Internal port | 6379 |
| `DRAGONFLY_REQUIREPASS` | Auth password | (empty) |
| `DRAGONFLY_MAXMEMORY` | Max memory limit | (empty) |
| `DRAGONFLY_MAXMEMORY_POLICY` | Eviction policy | (empty) |

## Local Development

```bash
git clone https://github.com/INAPP-Mobile/railway-dragonfly && cd railway-dragonfly
cp .env.example .env
# Edit .env if needed
docker run -d --name dragonfly -p 6379:6379 -v dragonfly-data:/data dragonflydb/dragonfly:v1.27.1
# Test connection
redis-cli ping  # Should return PONG
```

## License

This template packages [Dragonfly](https://github.com/dragonflydb/dragonfly) which is licensed under the **Dragonfly License (Source Available)**. See the [LICENSE](https://github.com/dragonflydb/dragonfly/blob/main/LICENSE) for details. Template maintained by [INAPP-Mobile](https://github.com/INAPP-Mobile).

## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

Open this page in a browser: https://railway.com/deploy/dragonfly-1
