GRAFT_*. The source of truth is packages/env/src/schema.ts in the repository, with .env.example beside the compose file as the annotated starting point.
Under Docker Compose, everything in .env reaches the graft container, so any variable below can be set there. A few are fixed by the compose file itself and win over the same name in .env.
Two rules to know
Some settings only make sense complete. A group that is half set is refused at boot, because a partial group is always a typo or a half-finished deploy and would otherwise present as a feature that silently never works. The groups are the capability token key pair, the Docker sandbox pair, the admin pair, the Langfuse pair, the model provider settings, and the four gateway provider settings. A production self-host must have a model. WithNODE_ENV=production and the default GRAFT_BACKINGS=open, which is what the published image runs as, Graft refuses to start unless GRAFT_MODEL_BACKEND=provider, GRAFT_MODEL_PROVIDER and GRAFT_MODEL_API_KEY are set. acquire is the product, and a server that boots with no model would answer every acquire with acquire_unconfigured while looking installed. The refusal reads:
PLACEHOLDER string.
Read by the compose file
These shape the containers and are not read by the server itself.Set by the compose file
The compose file fixes these for thegraft service. They are listed so you know what the server runs with; change the .env value they derive from rather than these.
The image itself sets
NODE_ENV=production, PORT=3000, GRAFT_CONSOLE_DIR=/app/apps/web/dist and GRAFT_TOOLBOX_ROOT=/var/lib/graft/toolboxes.
The server’s variables
Required
Graft does not boot without these.docker compose run --rm --no-deps graft node dist/keys.mjs mints the three secrets above plus the capability token key pair below.
The proxy and the capability token
Without the key pair the server boots, nothing mints a token, and the proxy answers
503 proxy_unconfigured. A half pair is refused.
Backings, sandbox and toolbox
The Docker backing also honours
DOCKER_HOST as the Docker CLI does, unix:///path or tcp://host:port, for the sibling-daemon arrangement.
The package policy
See Packages and SDKs for the policy these feed.
Approvals, the sweep and acquire
The model
Any of the five provider settings set while
GRAFT_MODEL_BACKEND is not provider is refused, since nothing would read it. A wrong model id is not caught at boot; it fails the first job with the provider’s own message.
Langfuse
Your API gateway
With the four set, a vendor whose hosts they cover connects with no person step and every call for it relays through the gateway. See Route vendors through your API gateway.
First start
The admin pair is read on every start and acts once: a database that already holds a person is never touched, so changing
GRAFT_ADMIN_PASSWORD later resets nothing, and the boot log says admin bootstrap skipped.