---
title: "Deploy Memgraph + Memgraph Lab"
description: "[Updated Aug 2026] Production Ready Memgraph Instance with Memgraph Lab"
category: "Storage"
url: https://railway.com/deploy/memgraph-memgraph-lab
---

# Deploy Memgraph + Memgraph Lab

[Updated Aug 2026] Production Ready Memgraph Instance with Memgraph Lab

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

- **Creator:** Ramadan Omar's Projects
- **Category:** Storage
- **Total deploys:** 2

## Template content

### Memgraph Lab https://memgraph.com/docs/memgraph-logo-navigation.svg

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

### Memgraph https://memgraph.com/docs/memgraph-logo-navigation.svg

- **Image:** memgraph/memgraph-mage:3.12.0
- **Start command:** `sh -c 'exec /usr/lib/memgraph/memgraph --bolt-address=:: --memory-limit=${MEMGRAPH_MEMORY_LIMIT:-1024} --log-level=${MEMGRAPH_LOG_LEVEL:-WARNING} --also-log-to-stderr ${MEMGRAPH_EXTRA_ARGS:-}'`

## Documentation

# Deploy and Host Memgraph + Memgraph Lab on Railway

Memgraph is an open source, in-memory graph database written in C++: fast, ACID
compliant, Cypher and Bolt compatible, with the MAGE library of 300+ graph algorithms
included. Memgraph Lab is its visual interface for writing queries, exploring graphs,
and monitoring your instance. This template deploys both, wired together and ready to
use.

## About Hosting Memgraph + Memgraph Lab

You get two services. The database runs the official `memgraph/memgraph-mage` image,
pinned to a specific version, with authentication enabled from the first boot, a
persistent volume at `/var/lib/memgraph`, and a public Bolt endpoint published as
`BOLT_URL`. Memgraph Lab runs on its own public URL, and its connect form comes
pre-filled with the database's private network address, so the two talk to each other
without leaving Railway. Memory limit and log level are plain environment variables.
Plan at least 2 GB of RAM for the database, since Memgraph keeps its working set in
memory. Lab itself is lightweight.

## Common Use Cases

- **Interactive graph exploration**: a hosted query UI your whole team can open in
  the browser, no local installs needed
- **GraphRAG and AI agents**: ground LLM answers in a knowledge graph with built-in
  vector search, and inspect what the agent actually stored using Lab
- **Real-time recommendations and fraud detection**: run multi-hop queries and MAGE
  algorithms on live data, and visualize the patterns you find
- **Prototyping graph models**: sketch, query, and refine your schema visually before
  wiring up application code

## Dependencies for Memgraph + Memgraph Lab Hosting

- None. One click deploys both services with production-ready configuration: pinned
  official images, generated admin password, persistent volume, public Bolt endpoint,
  private networking between Lab and the database, and sane memory settings.

### Deployment Dependencies

The template itself depends on nothing. These are the docs, SDKs, and tools you will
actually use once it is running:

- [Memgraph documentation](https://memgraph.com/docs)
- [Memgraph Lab user manual](https://memgraph.com/docs/data-visualization)
- [MAGE graph algorithm library](https://memgraph.com/docs/advanced-algorithms)
- [Client SDKs (Python, JavaScript, Go, Java, ...)](https://memgraph.com/docs/client-libraries)

### Implementation Details

Signing in to Lab takes about 20 seconds: open the Lab service's public URL, click
**New connection**, and choose **Memgraph instance**. The host and port are already
filled in from the private network. Under Authentication pick **Username/password**
and use `MEMGRAPH_USER` and `MEMGRAPH_PASSWORD` from the Memgraph service's
variables. Lab cannot log you in automatically because the database requires
authentication, which you want, since its Bolt endpoint is public.

Your applications connect with any Neo4j-compatible driver:

```python
from neo4j import GraphDatabase

driver = GraphDatabase.driver(
    "bolt://your-proxy-domain:port",          # BOLT_URL
    auth=("memgraph", "your-password"),       # MEMGRAPH_USER / MEMGRAPH_PASSWORD
)
```

Good to know:

- Lab's live log-streaming tab is not available on Railway, since it needs direct
  browser access to port 7444. Use Railway's log viewer instead.
- `MEMGRAPH_USER` and `MEMGRAPH_PASSWORD` only apply on the first boot. To change the
  password later, run `SET PASSWORD TO 'new'` in Cypher.
- Data persists in the attached volume across restarts, redeploys, and image
  upgrades.

## FAQ

### How do I know this template will be maintained?

It is built and maintained by [Webified](https://webified.eu), a software agency. We
use this exact setup in commercial projects for paying clients, so we have a direct
interest in keeping it healthy. Versions are pinned, and we review new Memgraph
releases before bumping them. If you run into anything, ask in the template's support
thread on Railway.

### Why do I have to type the password into Lab?

Lab's quick connect cannot carry credentials yet (it is an open feature request with
the Memgraph team), and the database rightly refuses anonymous connections. The
connect form comes pre-filled with the host and port, so it is one paste of the
password and you are in.

### What happens to my data on restarts, redeploys, or upgrades?

Nothing. Snapshots and write-ahead logs live on the attached Railway volume, which
survives all of those. Upgrading means changing the image tag and redeploying. Your
data stays where it is.

## Why Deploy Memgraph + Memgraph Lab 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 + Memgraph Lab 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-memgraph-lab
