Skip to main content
v2026.11,986 entries · CC-BY 4.0

What Is Neo4j? Install and First Cypher Queries

Neo4j is a graph database queried with Cypher. See what it stores, how to run it in Docker and four starter queries from the manual.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

Neo4j is a graph database: it stores data as nodes, relationships and properties instead of in tables or documents, and you query it with Cypher. This guide goes from that definition to a running instance and your first queries, using commands taken from the current Neo4j documentation (checked 2026-10-29).

What it is used for in research

Neo4j’s documentation describes a graph database as one that stores data as “nodes, relationships, and properties instead of in tables or documents.” Nodes represent entities, and labels tag their roles (for example Person). Relationships “provide named connections between two nodes”: each has a start node, an end node, exactly one type and a direction. Nodes and relationships can both hold any number of key-value properties.

That makes it a fit for data whose value lies in the connections between records, such as people linked to works, works linked to works, or records linked to the identifiers that describe them. It is a native graph database, which the documentation defines as one that “implements a true graph model all the way down to the storage level,” and it also provides ACID transactions. Queries are written in Cypher, “a declarative query language similar to SQL, but optimized for graphs.”

Neo4j is not an RDF triple store

If you came here from linked data, note the difference. A property-graph database such as Neo4j is not an RDF triple store: it uses a different data model and query language than SPARQL. For the triple-based side, see what a knowledge graph is; for tracing how data moves between records, see data lineage.

Install or access (official source only)

The Neo4j installation documentation lists these routes: Linux, macOS, Windows, Neo4j Desktop, Docker, and AuraDB. Aura is the managed cloud service and needs no installation. The documentation lists release lines 2026.10 (Current), 5.26 (LTS) and 4.4. Neo4j offers Community and Enterprise editions, with free and subscription-based licensing options.

System requirements

Item What the documentation states
Java A compatible JVM must be installed first for non-Docker installs. The requirements page lists Java SE 21 and Java SE 25 for recent releases (Java 25 is supported from Neo4j 2025.10); check the requirements page for the release you install.
Memory, on-premises production Minimum 8 GB
CPU architecture x86-64 or ARM64
Cloud production minimum 2 vCPU, 2 GB memory, 10 GB disk
Production operating systems (examples) Ubuntu Server 24.04 and 26.04 LTS; RHEL 9 and 10 (the page marks some older platforms, such as Ubuntu 22.04 and RHEL 8, as deprecated)

Step-by-step: run Neo4j in Docker and query it

  1. Start the Community edition container, exactly as in the Neo4j Docker documentation:
    docker run --restart always --publish=7474:7474 --publish=7687:7687 neo4j:2026.10.1

    Port 7474 serves Neo4j Browser and 7687 is also published.

  2. To set a password at start-up, add --env NEO4J_AUTH=neo4j/your_password to that command. For the Enterprise edition use the tag neo4j:2026.10.1-enterprise and also pass --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes.
  3. Open http://localhost:7474/. The default user is neo4j with password neo4j; you are prompted to change it at first connection, and the minimum password length is 8.
  4. In Neo4j Browser, type :guide to open its embedded guides.
  5. Create a small graph. This statement is the relationship example from the Cypher manual’s CREATE page:
    CREATE (charlie:Person:Actor {name: 'Charlie Sheen'})-[:ACTED_IN {role: 'Bud Fox'}]->(wallStreet:Movie {title: 'Wall Street'})<-[:DIRECTED]-(oliver:Person:Director {name: 'Oliver Stone'})
  6. Read it back with the query from the manual’s basic-queries page:
    MATCH (people:Person) RETURN people LIMIT 5

The remaining examples on the manual’s basic-queries page run against the manual’s movie dataset, which you load using the script that page links to.

Output and how to read it

Each query returns what its RETURN clause names. These four queries come from the Cypher manual, in order of difficulty:

Query What it does
MATCH (keanu:Person {name:'Keanu Reeves'}) RETURN keanu.name AS name, keanu.born AS born Matches one node by label and property; returns two columns named by AS.
MATCH (people:Person) RETURN people LIMIT 5 Matches every Person node and returns at most five.
MATCH (m:Movie {title: 'The Matrix'})<-[d:DIRECTED]-(p:Person) RETURN p.name as director Follows a DIRECTED relationship backwards, from the movie to the person; the arrow shows direction.
MATCH (bornInEighties:Person) WHERE bornInEighties.born >= 1980 AND bornInEighties.born < 1990 RETURN bornInEighties.name as name, bornInEighties.born as born ORDER BY born DESC Filters on a property range with WHERE and sorts newest first.

Troubleshooting

  • Browser does not load at localhost:7474. Confirm the command included both --publish flags; 7474 serves Browser and 7687 is the second published port.
  • Password rejected. The minimum length is 8, and the first connection with the default neo4j/neo4j credentials prompts for a change.
  • Enterprise container will not start. The Enterprise tag needs NEO4J_ACCEPT_LICENSE_AGREEMENT=yes.
  • Native install fails. A compatible JVM must be installed before Neo4j; compare your Java version with the requirements page.

Alternatives: Cypher-compatible and RDF options

Tool Query language What its documentation says
Memgraph Cypher “A high-performance, in-memory graph database”; its documentation says it “is compatible with Neo4j for most queries.”
Apache Jena Fuseki SPARQL 1.1 “A SPARQL server,” running standalone or embedded; licensed under the Apache License, Version 2.0.

Jena Fuseki works with RDF triples rather than a property graph, so it answers a different modelling question than Neo4j does.

FAQ

What is Neo4j in one sentence?

A native graph database that stores nodes, relationships and properties and is queried with Cypher.

Is Neo4j free?

Neo4j states that it has free and subscription-based licensing options, with Community and Enterprise editions. Check the licensing terms of the edition you run.

Does Neo4j use SQL?

No. It uses Cypher, a declarative language that its documentation describes as similar to SQL but optimized for graphs.

Do I need to install anything to try it?

Not locally: Aura is a managed cloud option with no installation. Otherwise Docker avoids installing a JVM yourself.

Sources (official docs)

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about What Is Neo4j? Install and First Cypher Queries

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →