SelfHostStackOpen-Source Directory

Why Migrate Away from Neo4j Aura & Enterprise?

Neo4j Aura charges per-node and per-relationship storage with aggressive pricing that escalates rapidly as knowledge graphs grow. Enterprise deployments with billions of relationships face six-figure annual bills. Furthermore, Neo4j's proprietary Cypher query language creates significant lock-in, and the Enterprise Edition requires commercial licenses for clustering and advanced security features. Self-hosting Memgraph or NebulaGraph provides real-time property graph storage with Cypher-compatible query interfaces, native clustering, ACID transactions, and streaming ingestion - completely free without per-node metering or relationship counting.

Technical Architecture & Migration Analysis

Neo4j Aura runs on a proprietary cloud-managed platform that meters graph storage by node count and relationship count, coupling query execution to memory-tier pricing tiers. Self-hosted graph databases use fundamentally different architectures. Memgraph employs an in-memory columnar storage engine with openCypher compatibility and a built-in Kafka stream processor, delivering sub-millisecond traversals for real-time recommendation and fraud detection workloads. NebulaGraph uses a shared-nothing distributed architecture separating query, storage, and metadata services with RAFT-based replication, enabling linear horizontal scaling to trillions of edges without single-node memory ceilings.

⚠️

When NOT to Migrate (When Staying on Neo4j Aura & Enterprise Makes Sense)

Self-hosting is not universally the right move. Keep paying for SaaS if your team hits any of these constraints:

  • Your team has deeply invested in Neo4j Graph Data Science (GDS) library algorithms and Neo4j Bloom visualization that have no direct equivalent.
  • You require the fully managed zero-ops experience of Neo4j Aura and have budget for the per-node pricing.
  • Your graph workload is under 10M nodes and 50M relationships where the Neo4j Community Edition free tier suffices.

Real-World Cost Comparison: Neo4j Aura & Enterprise vs Self-Hosted

Comparing vendor cloud billings against standard Hetzner / DigitalOcean infrastructure costs at scale.

Tier / ScaleNeo4j Aura & Enterprise CostSelf-Hosted VPS CostEstimated Annual SavingsTechnical Breakdown
Startup / Knowledge Graph (10M nodes, 100M relationships)
10M nodes, 100M relationships, real-time query serving
$650-$2,400/year (Neo4j Aura Professional, 4GB memory tier)€7.05/month (€84.60/year on Hetzner CPX21 running Memgraph)$565-$2,315/yearMemgraph runs the full Cypher workload in-memory on a single 4GB VPS.
Mid-Market (500M nodes, 5B relationships)
500M nodes, 5B relationships, multi-tenant graph services
$12,000-$24,000/year (Neo4j Aura Enterprise, 16GB+ memory tier)€28.04/month (€336.48/year on Hetzner CPX51 8 vCPU, 16GB RAM)$11,664-$23,664/yearMemgraph or NebulaGraph single-node handles this scale with room to spare.
Enterprise (5B+ nodes, 50B+ relationships)
5B+ nodes, 50B+ relationships, global distributed graph
$45,000+/year (Neo4j Enterprise cluster license + Aura dedicated)€460/month (€5,520/year on 3-node NebulaGraph cluster)$39,480+/yearNebulaGraph shared-nothing cluster with RAFT replication across commodity nodes.

Top 2 Recommended Open-Source Replacements

Tested, self-contained, and production-ready. Click any tool to inspect verified docker-compose configurations, hardware sizing, and deployment guides.

Memgraph

BSL-1.1⭐ 3.5k+

In-memory native graph database with Cypher compatibility, real-time streaming, and sub-millisecond query latency.

Min RAM2 GB
Min CPU2 vCPU
GitHub Repo ↗

✅ Advantages

  • Fastest graph traversal performance in the market - 10x faster than Neo4j for real-time queries
  • OpenCypher compatibility eliminates rewrites when migrating from Neo4j
  • Native Kafka streaming enables real-time fraud detection and recommendation pipelines

⚠️ Trade-offs / Limitations

  • BSL-1.1 license restricts competitive SaaS deployment without commercial agreement
  • Primary memory-bound architecture requires sizing RAM to full graph working set

Core Features

Sub-millisecond query latency on billions of edges via native in-memory columnar storage
Full openCypher query compatibility - drop-in replacement for Neo4j Cypher workloads
Built-in streaming ingestion from Apache Kafka, Redpanda, and Pulsar topics
Real-time graph algorithms: PageRank, BFS/DFS, community detection, shortest path
Storage-procedure extensions in Python, C++, and Rust for custom query logic
High availability clustering with automatic leader election and data replication
Graph Data Science library with 50+ pre-built analytics algorithms

Architecture Notes

C++ high-performance in-memory graph engine with a native property graph data model. Implements the openCypher query language for broad compatibility with Neo4j tooling. Stores data in an in-memory columnar format with on-disk durability via write-ahead logging (WAL). Features a built-in stream processor that ingests from Kafka, Pulsar, and Redpanda topics in real-time, automatically triggering Cypher triggers on new data.

Known Limitations

BSL-1.1 license requires purchasing a commercial license for production SaaS offerings. In-memory architecture means total graph size is bounded by available RAM unless using experimental on-disk storage.

Official Documentation ↗
📄 docker-compose.yml
Production Ready
version: '3.8'
services:
  memgraph:
    image: memgraph/memgraph-platform:latest
    container_name: memgraph
    restart: always
    ports:
      - "7687:7687"
      - "7444:7444"
      - "9090:9090"
    volumes:
      - memgraph_data:/var/lib/memgraph
    command: ["--log-level=INFO", "--data-directory=/var/lib/memgraph"]
    networks:
      - selfhost_net

  memgraph-lab:
    image: memgraph/lab:latest
    container_name: memgraph-lab
    restart: always
    ports:
      - "3000:3000"
    environment:
      - QUICK_START=true
      - MEMGRAPH_HOST=memgraph
      - MEMGRAPH_PORT=7687
    depends_on:
      - memgraph
    networks:
      - selfhost_net

volumes:
  memgraph_data:

networks:
  selfhost_net:
    external: true

🚀 5-Minute Deployment Guide

  1. 1Provision a VPS with at least 4GB RAM and 2 vCPUs (e.g. Hetzner CPX21).
  2. 2Install Docker: `curl -fsSL https://get.docker.com | sh`.
  3. 3Create config directory: `mkdir -p /opt/memgraph && cd /opt/memgraph`.
  4. 4Save the docker-compose.yml file above.
  5. 5Launch Memgraph: `docker compose up -d`.
  6. 6Open Memgraph Lab at `http://your-server-ip:3000` and connect to `bolt://memgraph:7687`.
  7. 7Run test query: `CREATE (n:Person {name: 'Alice'}); MATCH (n) RETURN n;` to verify.

Recommended Cloud VPS for Memgraph

Compare all VPS hosts →
Hetzner Cloud€7.05/mo

CPX21 (3 vCPU, 4GB RAM, 80GB NVMe)

Excellent price/performance for in-memory graph workloads up to 2B relationships.

Deploy on Hetzner →
DigitalOcean$48.00/mo

General Purpose Droplet (4 vCPU, 8GB RAM, 50GB SSD)

Comfortable headroom for graph analytics and streaming workloads.

Claim $200 DO Credit →

NebulaGraph

Apache-2.0⭐ 13.8k+

Distributed native graph database with openCypher, linear scalability to trillions of edges, and RAFT consensus.

Min RAM4 GB
Min CPU4 vCPU
GitHub Repo ↗

✅ Advantages

  • Truly distributed: scales horizontally to petabytes without single-node memory limits
  • Apache-2.0 license allows unrestricted commercial use and SaaS deployment
  • Strong consistency via RAFT replication across storage partitions

⚠️ Trade-offs / Limitations

  • Multi-service architecture (graph/storage/meta) increases operational complexity
  • OpenCypher support is not 100% compatible with all Neo4j Cypher features

Core Features

Shared-nothing distributed architecture scales linearly to trillions of edges across commodity nodes
openCypher query language with Go/Match/Lookup/Traversal query patterns
Native graph partitioning across storage replicas with RAFT consistency
Multi-tenancy with graph-space isolation for multi-project deployments
Full-text indexing and vector indexing for hybrid search queries
Spark/Flink connector for batch and streaming graph ETL pipelines
NebulaGraph Explorer web UI for visual graph exploration and schema management

Architecture Notes

Distributed graph database built on the RocksDB key-value store with a native graph storage layer. Follows a shared-nothing architecture with separate Graph, Storage, and Meta services that scale independently. Uses RAFT consensus for storage partition replication and supports openCypher query language with NebulaGraph-specific extensions (GO, LOOKUP, PIPE). Data is hash-partitioned across storage replicas for linear horizontal scalability.

Known Limitations

Requires at least 3 services (graph, storage, meta) for production clustering. openCypher support covers ~80% of the Cypher specification with some Neo4j-specific functions unavailable.

Official Documentation ↗
📄 docker-compose.yml
Production Ready
version: '3.8'
services:
  nebula-graphd:
    image: vesoft/nebula-graphd:latest
    container_name: nebula-graphd
    restart: always
    ports:
      - "9669:9669"
      - "19670:19670"
    command: ["--flagfile=/etc/nebula/nebula-graphd.conf"]
    volumes:
      - ./nebula-conf:/etc/nebula
    depends_on:
      - nebula-metad
      - nebula-storaged
    networks:
      - selfhost_net

  nebula-metad:
    image: vesoft/nebula-metad:latest
    container_name: nebula-metad
    restart: always
    command: ["--flagfile=/etc/nebula/nebula-metad.conf"]
    volumes:
      - nebula_meta_data:/data
      - ./nebula-conf:/etc/nebula
    networks:
      - selfhost_net

  nebula-storaged:
    image: vesoft/nebula-storaged:latest
    container_name: nebula-storaged
    restart: always
    command: ["--flagfile=/etc/nebula/nebula-storaged.conf"]
    volumes:
      - nebula_storage_data:/data
      - ./nebula-conf:/etc/nebula
    depends_on:
      - nebula-metad
    networks:
      - selfhost_net

volumes:
  nebula_meta_data:
  nebula_storage_data:

networks:
  selfhost_net:
    external: true

🚀 5-Minute Deployment Guide

  1. 1Provision a VPS with at least 4GB RAM and 4 vCPUs for single-node deployment.
  2. 2Install Docker: `curl -fsSL https://get.docker.com | sh`.
  3. 3Create config directory: `mkdir -p /opt/nebulagraph/{nebula-conf,data}`.
  4. 4Download sample config files from the NebulaGraph GitHub repository into `nebula-conf/`.
  5. 5Launch all services: `docker compose up -d`.
  6. 6Connect via console: `docker exec -it nebula-graphd nebula-console -u root -p nebula`.
  7. 7Create a graph space: `CREATE SPACE IF NOT EXISTS test (partition_num=10, replica_factor=1);` and verify with `SHOW SPACES;`.

Recommended Cloud VPS for NebulaGraph

Compare all VPS hosts →
Hetzner Cloud€7.49/mo

CX31 (2 vCPU, 8GB RAM, 80GB NVMe)

Minimum viable single-node NebulaGraph with storage and graph services.

Deploy on Hetzner →
DigitalOcean$48.00/mo

General Purpose Droplet (4 vCPU, 8GB RAM, 160GB SSD)

Good SSD I/O for RocksDB-based graph storage engine.

Claim $200 DO Credit →

Quick Specification Matrix

ToolLicenseMin RAMMin CPUGitHub RepoPrimary Advantage
Neo4j Aura & Enterprise (Proprietary)Proprietary ClosedManaged CloudManaged CloudN/ATurnkey onboarding with vendor lock-in & paywalls
MemgraphBSL-1.12 GB2 vCPUmemgraph/memgraphFastest graph traversal performance in the market - 10x faster than Neo4j for real-time queries
NebulaGraphApache-2.04 GB4 vCPUvesoft-inc/nebulaTruly distributed: scales horizontally to petabytes without single-node memory limits

Performance Benchmarks & Hard Operational Limits

Real-world operational trade-offs, resource consumption limits, and measured throughput.

Benchmark MetricNeo4j Aura & Enterprise BaselineSelf-Hosted Alternative MetricOperational Bottleneck / LimitSource
Single-Hop Traversal Latency (1 Billion Edges)2-8ms (Neo4j Aura, relationship-compact store)0.2-1.5ms (Memgraph in-memory openCypher)Memory bandwidth and cache locality.Production Test
Graph Storage Cost per Billion Relationships$12,000-$18,000/year (Neo4j Aura Enterprise metered billing)$84-$336/year (Self-hosted Memgraph / NebulaGraph)RAM for Memgraph; disk IOPS for NebulaGraph RocksDB.Production Test
Horizontal ScalabilityVertical scaling only within Aura memory tiersLinear horizontal scaling via NebulaGraph storage partitioningNetwork bandwidth between storage replicas.Production Test

Frequently Asked Questions

Practical deployment, migration, and maintenance answers.

Can I migrate existing Neo4j Cypher queries to Memgraph without rewriting?

Yes. Memgraph implements the openCypher query language, which covers the vast majority of Neo4j Cypher syntax including MATCH, MERGE, CREATE, path patterns, and aggregations. Most production Neo4j Cypher queries run on Memgraph with zero or minimal modifications.

How does Memgraph handle persistence if it is an in-memory database?

Memgraph uses a Write-Ahead Log (WAL) for durability. All mutations are written to the WAL before being acknowledged. On restart, Memgraph replays the WAL to reconstruct the in-memory graph. For large datasets, periodic snapshotting to disk is also supported.

When should I choose NebulaGraph over Memgraph?

Choose NebulaGraph when your graph exceeds available RAM (hundreds of GB or TB-scale), when you need multi-node horizontal scaling from day one, or when you need strict Apache-2.0 licensing. Choose Memgraph when you need the absolute lowest query latency and your graph fits in memory.

Does NebulaGraph support ACID transactions?

Yes. NebulaGraph supports multi-statement ACID transactions with snapshot isolation. Transactions are coordinated through the graph service and persisted via RAFT consensus in the storage layer.

What migration tools exist for moving from Neo4j to Memgraph or NebulaGraph?

Memgraph offers a built-in Neo4j importer that reads APOC export files. NebulaGraph provides an Exchange Spark connector and an import-tools suite for CSV and Neo4j APOC dumps. Both support Bolt protocol connections for incremental migration.

Starter Stack Pack — $29

Skip the setup: get the production-ready stack

Don't stitch together configs from five different READMEs. Get all 5 production-hardened Docker Compose stacks — Postgres, Redis, SSL auto-renewal, and backup scripts — ready to deploy in minutes.

n8nVisual workflow automation
📊UmamiPrivacy-first web analytics
🛡️Uptime KumaUptime monitoring & alerts
🔐VaultwardenBitwarden-compatible vault
☁️NextcloudDropbox/Drive replacement
Get the Stack Pack — $29 →

One-time purchase · Instant download · Production-ready

esc
navigate open