Deploy Memgraph + Memgraph Lab
[Updated Jul 2026] Production Ready Memgraph Instance with Memgraph Lab
Memgraph Lab
Just deployed
Memgraph
Just deployed
/var/lib/memgraph
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
- Memgraph Lab user manual
- MAGE graph algorithm library
- Client SDKs (Python, JavaScript, Go, Java, ...)
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:
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_USERandMEMGRAPH_PASSWORDonly apply on the first boot. To change the password later, runSET 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, 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.
Template Content
Memgraph Lab
memgraph/lab:3.11.0Memgraph
memgraph/memgraph-mage:3.11.0