---
title: "Deploy FalkorDB | (Just Updated) Graph Database for AI, Survives Crashes"
description: "FalkorDB graph DB for AI. Password on from boot, data kept, TCP proxy ready"
category: "Storage"
url: https://railway.com/deploy/falkordb-or-just-updated-graph-database-
---

# Deploy FalkorDB | (Just Updated) Graph Database for AI, Survives Crashes

FalkorDB graph DB for AI. Password on from boot, data kept, TCP proxy ready

**[Deploy FalkorDB | (Just Updated) Graph Database for AI, Survives Crashes on Railway](https://railway.com/template/falkordb-or-just-updated-graph-database-)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/falkordb-or-just-updated-graph-database-/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Storage

## Template content

### falkordb

- **Image:** falkordb/falkordb:6.0.0@sha256:92fbda814970a648b1fd80835bff221766bccd0f0ce958bc58a62976fea06620
- **Start command:** `/bin/sh -c 'set -e; M=$(cat /sys/fs/cgroup/memory.max 2>/dev/null || echo max); Q=$(cut -d" " -f1 /sys/fs/cgroup/cpu.max 2>/dev/null || echo max); MM=""; if [ "$M" != max ]; then MM="--maxmemory $((M / 100 * 60))"; fi; if [ "$Q" != max ]; then CORES=$(( (Q + 99999) / 100000 )); else CORES=$(nproc); fi; export PORT=3000 REDIS_ARGS="--requirepass $FALKORDB_PASSWORD --appendonly yes --appendfsync everysec $MM" FALKORDB_ARGS="MAX_QUEUED_QUERIES 25 TIMEOUT 1000 RESULTSET_SIZE 10000 THREAD_COUNT $CORES"; echo "[railway] cores=$CORES memory.max=$M redis-args=$MM owner=$(stat -c %u:%g /var/lib/falkordb/data)"; exec /var/lib/falkordb/bin/run.sh'`
- **Public domain:** Yes

## Documentation

# Deploy and Host FalkorDB on Railway

FalkorDB is a low-latency graph database that speaks the Redis protocol and answers openCypher
queries. It is the store behind GraphRAG and agent-memory stacks: entities and relationships in a
graph, queried in milliseconds, from any Redis client.

This template runs FalkorDB 6.0 as a single service from a digest-pinned official image: the Redis
port on a Railway TCP proxy, the FalkorDB Browser on a public domain, and all data on a Railway
volume with append-only persistence.

## About Hosting FalkorDB

- **A password is required from the first connection.** A stock `falkordb/falkordb` container has
  no password, so anyone who can reach port 6379 can read, write and delete every graph. Here a
  password is generated per deploy and anonymous connections are rejected.
- **Data survives redeploys.** The append-only file lives on the attached volume; a graph written
  before a redeploy was read back after it.
- **Memory and threads follow your plan.** The start command reads the container's memory and CPU
  limits and passes `maxmemory` (60% of the limit) and the query thread count, instead of the
  host's figures that Railway containers report.
- **Two ways in.** Services in the same project use the private URL; clients elsewhere use the TCP
  proxy URL.

## Common Use Cases

- GraphRAG and knowledge graphs for LLM applications
- Agent memory stores that keep entities and relations between sessions
- Fraud, recommendation and dependency-graph queries
- A drop-in server for existing Redis-protocol FalkorDB and RedisGraph clients

## Dependencies for FalkorDB Hosting

- One Railway volume for the data directory (created by the template)

### Deployment Dependencies

- FalkorDB documentation: https://docs.falkordb.com
- Official image: https://hub.docker.com/r/falkordb/falkordb

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `FALKORDB_PASSWORD` | Password for connections, generated per deploy. |
| `FALKORDB_PRIVATE_URL` | `redis://` URL on the private network, for services in the same project. |
| `FALKORDB_PUBLIC_URL` | `redis://` URL on the TCP proxy, for clients outside Railway. |

Python:

```python
from falkordb import FalkorDB
db = FalkorDB(host="", port=, password="")
g = db.select_graph("social")
g.query("CREATE (:Person {name:'ada'})-[:KNOWS]-&gt;(:Person {name:'bob'})")
```

## Why Deploy FalkorDB 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 FalkorDB 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/falkordb-or-just-updated-graph-database-
