If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
A DDEV add-on that provisions a Neo4j graph database service alongside your DDEV project. Designed to be zero-config for Drupal sites that consume Neo4j but useful for any DDEV project that needs a local graph database.
bolt://neo4j:7687 and http://neo4j:7474.https://<project>.ddev.site:7475, with a
valid TLS cert provided by DDEV’s router.ddev stop and are wiped only by ddev add-on remove neo4j.settings.ddev.neo4j.php snippet wired into
sites/default/settings.php that populates
$settings['content_graph_neo4j'] so the Drupal side connects with
no extra wiring.ddev add-on get kevinquillen/ddev-neo4j
ddev restart
First boot takes ~30 seconds while Neo4j downloads and installs APOC and GDS into the plugins volume; subsequent boots are fast.
Open the Browser UI:
ddev launch :7475
# or visit https://<project>.ddev.site:7475 directly
In the Browser’s Connect form:
| Field | Value |
|---|---|
| Connect URL | bolt+s://<project>.ddev.site:7687 |
| Authentication | Username / Password |
| Username | neo4j |
| Password | ddevpassword (override via .ddev/config.neo4j.yaml) |
The cert is generated at install time with mkcert — the same tool
DDEV uses for its own TLS — so it’s signed by the same root CA your
browser already trusts. No certificate warning, no bolt+ssc://
workaround.
If mkcert wasn’t available at install time, the add-on falls back
to an openssl self-signed cert; use bolt+ssc://<project>.ddev.site:7687
in that case (the Browser will prompt you to trust it once).
If your project type is Drupal, the add-on writes
web/sites/default/settings.ddev.neo4j.php and includes it from
settings.php. It populates:
$settings['content_graph_neo4j'] = [
'uri' => 'bolt://neo4j:7687',
'username' => 'neo4j',
'password' => getenv('DDEV_NEO4J_PASSWORD') ?: 'ddevpassword',
'database' => getenv('DDEV_NEO4J_DATABASE') ?: 'neo4j',
];
Sites that need bespoke credentials can simply not include the file and define their own block.
ddev exec cypher-shell -a bolt://neo4j:7687 -u neo4j -p ddevpassword
| Caller | Endpoint |
|---|---|
| PHP / drush / web container | bolt://neo4j:7687 (plaintext, in-network) |
| Host machine (Browser UI, Neo4j Desktop, local cypher-shell) | bolt+s://<project>.ddev.site:7687 |
| HTTP API (from web container) | http://neo4j:7474 |
Neo4j is configured with server.bolt.tls_level=OPTIONAL, so the same
port 7687 accepts both plaintext Bolt (for in-network clients) and
TLS-wrapped Bolt (for the Browser UI and any host-side client).
Override the host-side Bolt port via DDEV_NEO4J_BOLT_HOST_PORT in
.ddev/config.neo4j.yaml if 7687 collides with another project.
The add-on ships .ddev/config.neo4j.yaml for per-project tuning.
Edit it and run ddev restart:
web_environment:
- DDEV_NEO4J_PASSWORD=ddevpassword
- DDEV_NEO4J_DATABASE=neo4j
- DDEV_NEO4J_HEAP_INITIAL=512m
- DDEV_NEO4J_HEAP_MAX=1G
- DDEV_NEO4J_PAGECACHE=512m
- NEO4J_DOCKER_IMAGE=neo4j:5-community
- NEO4J_ACCEPT_LICENSE_AGREEMENT=no
To claim ownership of the file (so a future ddev add-on get won’t
overwrite your edits), delete the #ddev-generated marker comment at
the top.
Note: values that contain YAML flow indicators (
[,],{,},,) cannot live inconfig.neo4j.yaml— they get inlined as plain scalars into the rendered base compose file and break the merged-file YAML parse. To override the plugin list, editNEO4J_PLUGINSdirectly in.ddev/docker-compose.neo4j.yaml.
web_environment:
- NEO4J_DOCKER_IMAGE=neo4j:5-enterprise
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
You are responsible for complying with Neo4j’s commercial license.
Edit the NEO4J_PLUGINS line in .ddev/docker-compose.neo4j.yaml and
set it to []:
- 'NEO4J_PLUGINS=[]'
Then run ddev restart.
web_environment:
- DDEV_NEO4J_HEAP_MAX=512m
- DDEV_NEO4J_PAGECACHE=256m
Three options, in order of severity:
# Drop all nodes/relationships, keep credentials and config.
ddev exec cypher-shell -a bolt://neo4j:7687 -u neo4j -p ddevpassword \
'MATCH (n) DETACH DELETE n'
# Remove the data volume only.
ddev stop
docker volume rm "ddev-${DDEV_PROJECT:-$(basename $PWD)}-neo4j-data"
ddev start
# Remove the add-on entirely (wipes data, logs, plugin caches,
# Drupal settings include).
ddev add-on remove neo4j
| Layer | Tested | Notes |
|---|---|---|
| DDEV CLI | 1.24.10+ | Required for x-ddev describe extensions |
| Neo4j | 5.x community | 5-enterprise supported as opt-in |
| Plugins | APOC 5.x, GDS 2.x | Pinned to Neo4j 5 |
| Host OS | macOS (Apple Silicon + Intel), Linux x86_64 | Multi-arch image |
| Drupal | 9, 10, 11 | Settings injection is conditional on PROJECT_TYPE |
ddev start blocks
briefly. This is not a hang.DDEV_NEO4J_HEAP_MAX and DDEV_NEO4J_PAGECACHE if your Docker VM
is smaller.ddev-<project>-neo4j-{data,logs,plugins}, so multiple DDEV sites
on the same host don’t collide.ddev add-on remove neo4j
This removes:
.ddev/docker-compose.neo4j.yaml.ddev/config.neo4j.yaml.ddev/neo4j/conf/neo4j.conf.ddev/settings.ddev.neo4j.phpsettings.php include block (left intact if you
modified it).ddev-<project>-neo4j-{data,logs,plugins} Docker volumes.brew install bats-core bats-assert bats-file bats-support
bats ./tests/test.bats
CI runs the same suite via
ddev/github-action-add-on-test
on every PR, every push to main, and weekly on a cron schedule.
Apache 2.0. See LICENSE.
Neo4j community edition is GPL v3; Neo4j enterprise edition is commercial. APOC is Apache 2.0; Graph Data Science community edition is GPL v3. You are responsible for compliance with their respective licenses when running the add-on.
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.