---
title: "Deploy Memgraph"
description: "Memgraph 3.13: in-memory graph database (Cypher, Bolt) with Memgraph Lab."
category: "Storage"
url: https://railway.com/deploy/memgraph-1
---

# Deploy Memgraph

Memgraph 3.13: in-memory graph database (Cypher, Bolt) with Memgraph Lab.

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

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

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

## Template content

### memgraph https://avatars.githubusercontent.com/u/17707542

- **Image:** memgraph/memgraph:3.13.1
- **Start command:** `/usr/lib/memgraph/memgraph --bolt-address=:: --bolt-port=7687 --also-log-to-stderr=true --log-level=INFO --storage-snapshot-on-exit=true --storage-wal-enabled=true --storage-snapshot-interval-sec=300 --telemetry-enabled=false`

### lab https://avatars.githubusercontent.com/u/17707542

- **Image:** memgraph/lab:3.13.2
- **Health check:** /
- **Public domain:** Yes

## Documentation

# Deploy and Host Memgraph on Railway

Memgraph is an in-memory graph database that speaks Cypher and the Bolt protocol, so Neo4j drivers and many Neo4j tools work with it. It is built for fast graph queries and streaming workloads such as recommendations, fraud detection, network analysis and knowledge graphs for AI applications.

## About Hosting Memgraph

This template runs the official `memgraph/memgraph:3.13.1` image with Memgraph Lab, the web UI, as a second service. A database user with a generated password is created on first boot, and Bolt stays on Railway's private network at `memgraph.railway.internal:7687` over IPv4 and IPv6. Lab is public; it asks for that user and password to connect. Snapshots and the write-ahead log are stored on a Railway volume, so data survives redeploys. Memgraph keeps the whole graph in memory, so size the service for your data; small graphs fit the Hobby plan. It runs as root because Memgraph insists that the process owns its data directory.

## Common Use Cases

- Graph queries in Cypher for recommendations or fraud detection
- A knowledge graph behind a GraphRAG or AI agent project
- Running Neo4j-compatible code on a faster in-memory engine

## Dependencies for Memgraph Hosting

- `memgraph/memgraph:3.13.1` (official image)
- `memgraph/lab:3.13.2` (official image)
- A Railway volume at `/var/lib/memgraph`

### Deployment Dependencies

- [Memgraph documentation](https://memgraph.com/docs)
- [Memgraph on GitHub](https://github.com/memgraph/memgraph)
- [Memgraph Lab](https://memgraph.com/docs/memgraph-lab)

### Implementation Details

| Service | Source | Networking | Storage |
| --- | --- | --- | --- |
| memgraph | `memgraph/memgraph:3.13.1` | private only, Bolt 7687 | volume at `/var/lib/memgraph` |
| lab | `memgraph/lab:3.13.2` | public domain on 3000 | none |

| Variable | Default | Purpose |
| --- | --- | --- |
| `MEMGRAPH_USER` | `memgraph` | Database user created on first boot |
| `MEMGRAPH_PASSWORD` | generated | Its password |
| `QUICK_CONNECT_MG_HOST` | `${{memgraph.RAILWAY_PRIVATE_DOMAIN}}` | Pre-filled host in Lab |
| `RAILWAY_RUN_UID` | `0` | Runs as root, matching the root-owned volume |

Notes:

- Connect drivers to `bolt://memgraph.railway.internal:7687` from services in the same project.
- For access from outside Railway, add a TCP proxy for 7687 and enable Bolt TLS; plain Bolt sends passwords unencrypted.
- Memgraph Community is licensed under the BSL 1.1.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by Memgraph Ltd.

## Why Deploy Memgraph 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 Memgraph 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/memgraph-1
