From 5f78f58c34850e0b035eb0037ec925726947dd0e Mon Sep 17 00:00:00 2001 From: Matthew McNeely Date: Thu, 19 Nov 2026 15:52:55 -0500 Subject: [PATCH 1/2] Document running the published container image in the README The README only covered building from source. Add a "Run with Docker" section for ghcr.io/hydra-db/hydradb: tags, a docker run for a single plaintext dev node, and the uid 10001 bind-mount gotcha on Linux. Co-Authored-By: Claude Opus 5.5 --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6d7213a..3fc02d49 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,51 @@ visible WAL tail is applied to the indexed base. See ## Getting Started +### Run with Docker + +The published image needs no Rust toolchain or native libraries. Each release +pushes `ghcr.io/hydra-db/hydradb` for `linux/amd64` and `linux/arm64`, tagged +`latest`, the version (`0.5.0`, `0.5`, `0`), and `sha-`. Its entrypoint +is `graph-node`. A single plaintext development node on a local directory: + +```bash +mkdir -p .hydradb/store +printf '%s\n' 'local-development-token-32-bytes' > .hydradb/auth-token + +docker run -d --name hydradb -p 7687:7687 -p 8443:8443 -p 9090:9090 \ + -v "$PWD/.hydradb/store:/data" \ + -v "$PWD/.hydradb/auth-token:/run/secrets/auth-token:ro" \ + -e CLOUD_PROVIDER=local -e LOCAL_PATH=/data \ + -e GRAPH_NAMESPACE=default -e GRAPH_ID=default \ + -e GRAPH_CELL_ID=cell-0 -e GRAPH_CELLS=cell-0 -e GRAPH_NODE_ID=node-0 \ + -e GRAPH_ADVERTISED_BOLT_ADDR=127.0.0.1:7687 \ + -e GRAPH_BOLT_NODE_ADDRESSES=node-0=127.0.0.1:7687 \ + -e GRAPH_AUTH_TOKEN_FILE=/run/secrets/auth-token -e GRAPH_ALLOW_PLAINTEXT=true \ + ghcr.io/hydra-db/hydradb:latest + +curl -fsS http://127.0.0.1:9090/readyz && echo READY +``` + +Ports, token, and namespace match [Run a local node](#run-a-local-node), so its +`curl` examples work unchanged. Bolt clients use any non-empty username and the +token as the password. The graph persists in `.hydradb/store` across +`docker rm`; delete the directory to start over. + +The container runs as uid `10001`. Docker Desktop maps bind-mount ownership for +you; on Linux, run `sudo chown 10001:10001 .hydradb/store` first. Don't use +`--user` instead: the image's cache directory is owned by `10001`, and the node +exits with `Permission denied`. Change `GRAPH_ADVERTISED_BOLT_ADDR` and +`GRAPH_BOLT_NODE_ADDRESSES` if clients reach the node by another address. + +The image also ships `graph-indexer` and `falkor-dump-import` (use +`--entrypoint`), and is built with the DataFusion engine and OTLP export. For +production, use the [Helm chart](#kubernetes), which defaults to this image. + ### Prerequisites -Rust 1.99+, a C/C++ toolchain, `libcypher-parser`, and SuiteSparse GraphBLAS. -[`just`](https://github.com/casey/just) runs the recipes. On Ubuntu or WSL: +Building from source needs Rust 1.99+, a C/C++ toolchain, `libcypher-parser`, +and SuiteSparse GraphBLAS. [`just`](https://github.com/casey/just) runs the +recipes. On Ubuntu or WSL: ```bash sudo apt-get install -y build-essential clang libclang-dev cmake pkg-config \ From 5c9500c20a8d3f0ddc6069b1c3fb43a689dbd598 Mon Sep 17 00:00:00 2001 From: Matthew McNeely Date: Mon, 23 Nov 2026 15:51:47 -0500 Subject: [PATCH 2/2] Lock down the Docker quick start's token and ports chmod the dev auth token to 0600, publish the Bolt, HTTP, and admin ports on loopback only, and say what production needs instead: a unique random token from a secret manager, and TLS. On Linux the 0600 token also has to be chowned to uid 10001 or the node can't read it. Co-Authored-By: Claude Opus 5.5 --- README.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3fc02d49..388a4466 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,10 @@ is `graph-node`. A single plaintext development node on a local directory: ```bash mkdir -p .hydradb/store printf '%s\n' 'local-development-token-32-bytes' > .hydradb/auth-token +chmod 600 .hydradb/auth-token -docker run -d --name hydradb -p 7687:7687 -p 8443:8443 -p 9090:9090 \ +docker run -d --name hydradb \ + -p 127.0.0.1:7687:7687 -p 127.0.0.1:8443:8443 -p 127.0.0.1:9090:9090 \ -v "$PWD/.hydradb/store:/data" \ -v "$PWD/.hydradb/auth-token:/run/secrets/auth-token:ro" \ -e CLOUD_PROVIDER=local -e LOCAL_PATH=/data \ @@ -107,11 +109,24 @@ Ports, token, and namespace match [Run a local node](#run-a-local-node), so its token as the password. The graph persists in `.hydradb/store` across `docker rm`; delete the directory to start over. +The token is readable only by its owner, and the ports are published on +loopback only, so nothing outside this machine can reach the node. This recipe +is for local development. For production, treat the token as a real secret: +generate a unique random value, keep it out of docs and shell history, deliver +it through a secret manager (the [Helm chart](#kubernetes) mounts it from a +Kubernetes Secret), and turn TLS back on by dropping `GRAPH_ALLOW_PLAINTEXT`. + The container runs as uid `10001`. Docker Desktop maps bind-mount ownership for -you; on Linux, run `sudo chown 10001:10001 .hydradb/store` first. Don't use -`--user` instead: the image's cache directory is owned by `10001`, and the node -exits with `Permission denied`. Change `GRAPH_ADVERTISED_BOLT_ADDR` and -`GRAPH_BOLT_NODE_ADDRESSES` if clients reach the node by another address. +you. On Linux, hand both mounts to that uid first, or the node exits with +`Permission denied` on the store or the `0600` token: + +```bash +sudo chown -R 10001:10001 .hydradb/store .hydradb/auth-token +``` + +Don't use `--user` instead: the image's cache directory is owned by `10001`, +and the node exits with `Permission denied`. Change `GRAPH_ADVERTISED_BOLT_ADDR` +and `GRAPH_BOLT_NODE_ADDRESSES` if clients reach the node by another address. The image also ships `graph-indexer` and `falkor-dump-import` (use `--entrypoint`), and is built with the DataFusion engine and OTLP export. For