Skip to content

Environment variables

Onebox owns the ONEBOX_ prefix. Everything it injects or reads lives there, which keeps it greppable in a CI settings page, a secrets store, or someone else’s hook script.

Your application’s own variables are never touched. A workload that expects FANOUT_*, DATABASE_URL, or OTEL_EXPORTER_OTLP_ENDPOINT receives exactly those keys, unchanged — Onebox passes workload environment through rather than namespacing it.

A hook declared local: true runs on your machine. It is given enough to reach the server itself, because Onebox’s own connection is not something a separate process can borrow:

VariableValue
ONEBOX_APPThe application name
ONEBOX_HOSTThe server’s hostname, unbracketed
ONEBOX_SERVERuser@host, valid as an OpenSSH destination
ONEBOX_SSH_USERThe SSH user
ONEBOX_SSH_PORTThe SSH port, separate because user@host:port is invalid for both ssh and rsync
ONEBOX_SSH_JUMPThe jump host, empty on a direct connection — see Deploy through a jump host
ONEBOX_RELEASE_DIRAbsolute path of the release directory on the server
ONEBOX_RELEASE_IDThe release identifier
Terminal window
ssh ${ONEBOX_SSH_JUMP:+-J "$ONEBOX_SSH_JUMP"} "$ONEBOX_SERVER" -p "$ONEBOX_SSH_PORT" 'uptime'
VariableValue
ONEBOX_RESULT_FILEPath a job writes its structured result to

A job that reports back writes one JSON document there:

Terminal window
printf '{"schema_version":"onebox.run/job-result/v1alpha1","changed":true}' > "$ONEBOX_RESULT_FILE"
VariableValue
ONEBOX_REPOSITORY_KEYRepository encryption key
ONEBOX_S3_KEY_ENTRYName of the entry holding the S3 access key
ONEBOX_S3_SECRET_ENTRYName of the entry holding the S3 secret key
ONEBOX_S3_SESSION_TOKEN_ENTRYName of the entry holding the S3 session token
VariableEffect
ONEBOX_LOCAL1 or true runs against the local Docker daemon instead of connecting over SSH
ONEBOX_BIN_DIRWhere just build writes the binary, and where the other recipes look for it (default bin)
ONEBOX_INSTALL_DIRWhere just install places the binary (default ~/.local/bin)
ONEBOX_VERSIONVersion string just build stamps into the binary; must match vYYYY.M.REVISION with an optional -alpha suffix
ONEBOX_RELEASE_REPOSITORYRepository scripts/release.sh queries to confirm the previous release run finished, when the git remote does not name it

ONEBOX_LOCAL is the only one of these Onebox itself reads; the rest are build and release controls read by just and the release script.

Contributor and test controls — ONEBOX_E2E, ONEBOX_E2E_*, ONEBOX_SERVER_E2E, and ONEBOX_UPDATE_VERDICTS — follow the same prefix. just e2e sets ONEBOX_E2E for you; the rest are set by hand when running a suite or refreshing a frozen fixture.

Nothing in this namespace reaches a generated runtime. Generation reads no process environment at all, so the same project renders the same Compose on your laptop and in CI, and a digest keeps meaning something.