Deploy Neo4j
Neo4j graph database with Browser, APOC, Bolt TCP proxy and a volume
Just deployed
/data
Deploy and Host Neo4j on Railway
Neo4j is an open-source graph database. It stores data as nodes and relationships, and you query it with Cypher. Teams use it for recommendations, fraud detection, knowledge graphs and GraphRAG for AI apps. This template runs Neo4j Community Edition 2026.10.2 with APOC Core, Neo4j Browser and persistent storage.
About Hosting Neo4j
Hosting Neo4j means running the database server, keeping its data on persistent storage, protecting it with a password, and exposing two protocols: HTTP for Neo4j Browser and the Query API, and Bolt for drivers. This template builds the official Neo4j image, pinned by digest, from a public GitHub repo and stores everything under /data on a Railway volume. A generated password protects the neo4j user. One HTTPS domain serves Neo4j Browser and Bolt over WebSocket, so you can log in from any browser. Bolt is also open on Railway's private network and on a TCP proxy for drivers and tools outside Railway.
Common Use Cases
- Knowledge graphs and GraphRAG backends for LLM apps (LangChain, LlamaIndex, Graphiti)
- Recommendation engines, fraud detection and network or dependency analysis
- Modelling highly connected data (identity and access, supply chains, social graphs) with Cypher queries
Dependencies for Neo4j Hosting
- Neo4j Community Edition 2026.10.2 (official
neo4jDocker image, pinned by digest) - A Railway volume mounted at
/data
Deployment Dependencies
- Neo4j Docker documentation: https://neo4j.com/docs/operations-manual/current/docker/
- Neo4j releases: https://github.com/neo4j/neo4j/releases
- Template source: https://github.com/aalfath/neo4j-railway-template
Implementation Details
After the deploy finishes, open the service's domain. Neo4j Browser opens with neo4j+s://YOUR-DOMAIN:443 filled in: log in as neo4j with the NEO4J_PASSWORD variable.
Connect apps with:
- Same Railway project:
neo4j://neo4j.railway.internal:7687 - Outside Railway:
neo4j://YOUR-TCP-PROXY-HOST:PORT(see the service's TCP proxy under Settings → Networking; the connection is unencrypted)
NEO4J_PASSWORD is applied only on the first start. To change it later, run ALTER CURRENT USER SET PASSWORD FROM 'old' TO 'new' in Neo4j Browser, then update the variable. Memory defaults (heap 512m–1G, page cache 512m) suit small plans. Raise them with variables such as NEO4J_server_memory_heap_max__size=2G and NEO4J_server_memory_pagecache_size=2G. Add plugins with NEO4J_PLUGINS, for example ["apoc","graph-data-science"]. Updates arrive as Railway "update available" notices when the template repo changes; read its CHANGELOG first.
Why Deploy Neo4j 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 Neo4j 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
