Deploy Memgraph
[Updated Jul 2026] Production Ready Memgraph Instance
Memgraph
Just deployed
/var/lib/memgraph
Deploy and Host Memgraph on Railway
Memgraph is an open source, in-memory graph database written in C++. It is fast, ACID compliant, and runs transactional and analytical workloads in the same engine. It speaks Cypher and Bolt, so Neo4j drivers work out of the box, and it ships with MAGE, a library of over 300 graph algorithms.
About Hosting Memgraph
This template gives you a production-ready Memgraph instance in one click. It runs the
official memgraph/memgraph-mage image, pinned to a specific version for stability.
Authentication is on from the start: an admin user is created on first boot with a
randomly generated password. Your data lives on a Railway volume mounted at
/var/lib/memgraph, so snapshots and write-ahead logs survive restarts and redeploys.
A public TCP endpoint exposes the Bolt protocol, and ready-made connection strings are
published as BOLT_URL and BOLT_PRIVATE_URL. Memory limit and log level are plain
environment variables, no start-command editing needed. Plan at least 2 GB of RAM,
since Memgraph keeps its working set in memory.
Common Use Cases
- GraphRAG and AI agents: ground LLM answers in a knowledge graph, with built-in vector search and multi-hop traversals. Works with LangChain and LlamaIndex.
- Real-time recommendations: run collaborative filtering and link prediction on live data, with triggers that fire as soon as new data arrives.
- Fraud detection: find suspicious patterns with multi-hop relationship queries that relational databases struggle with.
- Network and dependency analysis: model infrastructure, supply chains, or social graphs and run centrality and community algorithms on them.
Dependencies for Memgraph Hosting
- None. This is a one-click deploy with production-ready configuration out of the box: pinned official image, generated admin password, persistent volume, public Bolt endpoint, 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
- MAGE graph algorithm library
- Client SDKs (Python, JavaScript, Go, Java, ...)
- Memgraph Lab, an optional visual UI you can run locally to query and explore your graph
Implementation Details
Connect with any Neo4j-compatible Bolt driver using the BOLT_URL and
MEMGRAPH_PASSWORD variables from the service:
from neo4j import GraphDatabase
driver = GraphDatabase.driver(
"bolt://your-proxy-domain:port", # BOLT_URL
auth=("memgraph", "your-password"), # MEMGRAPH_USER / MEMGRAPH_PASSWORD
)
with driver.session() as session:
print(session.run("RETURN 'hello graph' AS msg").single()["msg"])
Good to know:
MEMGRAPH_USERandMEMGRAPH_PASSWORDonly apply on the first boot. To change the password later, runSET PASSWORD TO 'new'in Cypher. Changing the variable alone won't do it.- Your data stays in the attached volume across restarts, redeploys, and image upgrades.
- If you only need the C++ algorithms, remove the
PYTHONPATHvariable to skip MAGE's Python modules and save about 700 MB of RAM. - Want a visual UI? Run Memgraph Lab locally with
docker run -p 3000:3000 memgraph/laband point it at yourBOLT_URL.
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.
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 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.
Template Content
Memgraph
memgraph/memgraph-mage:3.11.0