Note:
The HugeGraph Docker image is a convenience release, not an official ASF distribution artifact. See the ASF Release Distribution Policy for details.
Use release tags (for example,
1.7.0) for stable deployments. Uselatestonly for development or testing.
Use Docker to quickly start a standalone HugeGraph Server with RocksDB.
Using docker run
Use docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph:1.7.0 to start hugegraph server.
Using docker compose
To deploy only the server, use docker compose up -d. The compose file is as follows:
version: '3' services: graph: image: hugegraph/hugegraph:1.7.0 ports: - 8080:8080
To preload sample data on startup, set PRELOAD=true.
To customize the preload, mount your own Groovy script.
Using docker run
Use docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /path/to/script:/hugegraph-server/scripts/example.groovy hugegraph/hugegraph:1.7.0 to start hugegraph server.
Using docker compose
Use docker compose up -d to start quickly. The compose file is below. example.groovy is a predefined script. Replace it with your own script to preload different data:
version: '3' services: graph: image: hugegraph/hugegraph:1.7.0 environment: - PRELOAD=true volumes: - /path/to/script:/hugegraph-server/scripts/example.groovy ports: - 8080:8080
Using start-hugegraph.sh
If you deploy HugeGraph Server without Docker, you can also pass -p true to bin/start-hugegraph.sh.
Using docker run
Use docker run -itd --name=graph -p 8080:8080 -e AUTH=true -e PASSWORD=xxx hugegraph/hugegraph:1.7.0 to enable authentication.
Using docker compose
Set the environment variables in the compose file:
version: '3' services: server: image: hugegraph/hugegraph:1.7.0 container_name: graph ports: - 8080:8080 environment: - AUTH=true - PASSWORD=xxx
CAUTION:
The
docker-compose-trace.yamluses Grafana and Grafana Tempo, both of which are licensed under AGPL-3.0. Use this template for testing only.
Start the OpenTelemetry collector
# Run from the repository root docker compose -f hugegraph-server/hugegraph-dist/docker/example/docker-compose-trace.yaml -p hugegraph-trace up -d
Enable the OpenTelemetry agent
./start-hugegraph.sh -y true
Stop the OpenTelemetry collector
# Run from the repository root docker compose -f hugegraph-server/hugegraph-dist/docker/example/docker-compose-trace.yaml -p hugegraph-trace stop
References
For a full distributed HugeGraph cluster with PD, Store, and Server, use the 3-node compose file in the docker/ directory at the repository root.
Prerequisites: Allocate at least 12 GB memory to Docker Desktop (Settings → Resources → Memory). The cluster runs 9 JVM processes.
cd docker HUGEGRAPH_VERSION=1.7.0 docker compose -f docker-compose-3pd-3store-3server.yml up -d
See docker/README.md for the full setup guide, environment variable reference, and troubleshooting.