---
title: "Deploy Dragonfly"
description: "Dragonfly — Redis-compatible in-memory cache with advanced features."
category: "Storage"
url: https://railway.com/deploy/dragonfly-1
---

# Deploy Dragonfly

Dragonfly — Redis-compatible in-memory cache with advanced features.

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

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

## Template content

### dragonfly

- **Image:** dragonflydb/dragonfly:v1.27.1
- **Public domain:** Yes

## Documentation

# Deploy and Host

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/dragonfly)

![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

- [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/dragonfly-1
