Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

ddev-arangodb

tests Add-on Registry Project is maintained

A DDEV add-on that provisions an ArangoDB multi-model database service alongside your DDEV project. Designed to be zero-config for Drupal sites that consume ArangoDB but useful for any DDEV project that needs a local graph/document/key-value store.

What you get

Install

ddev add-on get kevinquillen/ddev-arangodb
ddev restart

First boot takes ~20 seconds while ArangoDB initializes the data volume and sets the root credential; subsequent boots are fast.

Open the web UI:

ddev launch :8530
# or visit https://<project>.ddev.site:8530 directly

In the ArangoDB web UI’s login form:

Field Value
Username root
Password ddevpassword (override via .ddev/config.arangodb.yaml)
Database _system (or any database you create)

Connect from your project

From PHP (Drupal-ready)

If your project type is Drupal, the add-on writes web/sites/default/settings.ddev.arangodb.php and includes it from settings.php. It populates:

$settings['arangodb'] = [
  'endpoint' => 'http://arangodb:8529',
  'username' => 'root',
  'password' => getenv('DDEV_ARANGODB_PASSWORD') ?: 'ddevpassword',
  'database' => getenv('DDEV_ARANGODB_DATABASE') ?: '_system',
];

Sites that need bespoke credentials can simply not include the file and define their own block.

From the CLI

arangosh ships in the ArangoDB image:

docker exec -it ddev-<project>-arangodb arangosh \
  --server.endpoint http+tcp://localhost:8529 \
  --server.username root \
  --server.password ddevpassword

Or hit the HTTP API directly from the web container:

ddev exec "curl -u root:ddevpassword http://arangodb:8529/_api/version"

Connection endpoints

Caller Endpoint
PHP / drush / web container http://arangodb:8529 (plaintext, in-network)
Host browser (web UI) https://<project>.ddev.site:8530
Host browser (HTTP) http://<project>.ddev.site:8529

ArangoDB speaks only HTTP(S), so the DDEV router proxies everything. No raw-TCP host port binding is required.

Configuration overrides

The add-on ships .ddev/config.arangodb.yaml for per-project tuning. Edit it and run ddev restart:

web_environment:
  - DDEV_ARANGODB_PASSWORD=ddevpassword
  - DDEV_ARANGODB_DATABASE=_system
  - DDEV_ARANGODB_MEMORY=
  - ARANGODB_DOCKER_IMAGE=arangodb:3.12

To claim ownership of the file (so a future ddev add-on get will not overwrite your edits), delete the #ddev-generated marker comment at the top.

Changing the root password after first boot

ARANGO_ROOT_PASSWORD is only honored on a fresh data volume. To change it on an existing volume, either drop the volume and reinstall, or run arango-secure-installation inside the container:

docker exec -it ddev-<project>-arangodb arango-secure-installation

Low-memory hosts

Pin RocksDB’s view of total RAM:

web_environment:
  - DDEV_ARANGODB_MEMORY=2G

This maps to ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY inside the container.

Pin a specific patch version

web_environment:
  - ARANGODB_DOCKER_IMAGE=arangodb:3.12.9

This add-on targets community edition only. Enterprise tags are not supported.

Wipe the database

Three options, in order of severity:

# Drop a single collection's contents from arangosh.
docker exec -it ddev-<project>-arangodb arangosh \
  --server.username root --server.password ddevpassword \
  --javascript.execute-string 'db._collection("mycol").truncate()'

# Remove the data volume only.
ddev stop
docker volume rm "ddev-${DDEV_PROJECT:-$(basename $PWD)}_arangodb-data"
ddev start

# Remove the add-on entirely (wipes data, Foxx apps,
# Drupal settings include).
ddev add-on remove arangodb

Compatibility

Layer Tested Notes
DDEV CLI 1.24.10+ Required for x-ddev describe extensions
ArangoDB 3.12 community Pin via ARANGODB_DOCKER_IMAGE
Host OS macOS (Apple Silicon + Intel), Linux x86_64 Multi-arch image
Drupal 9, 10, 11 Settings injection is conditional on PROJECT_TYPE

Operational notes

Removing the add-on

ddev add-on remove arangodb

This removes:

Testing

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.

License

Apache 2.0. See LICENSE.

ArangoDB community edition is licensed under the Apache 2.0 license with a 100 GB production dataset limit for non-commercial use; review the ArangoDB Community License before deploying. You are responsible for compliance.

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.