Skip to main content

Environment variables

These are read from the stack's .env (the repository root env.template). The frontend-only frontend/.env.example covers npm run dev.

Read by npm run dev only (not Docker Compose)​

VariablePurposeDefault
PUBLIC_TRITON_API_URLPoints the dev server's browser bundle directly at a reachable OpenProcessor API origin, bypassing the nginx proxy. Leave unset for docker compose up — Compose passes it through to the browser bundle, which would then call this origin directly instead of the proxy.empty

Read by npm run dev and Docker Compose​

VariablePurposeDefault
PUBLIC_API_PREFIXPath prefix the backend serves curation endpoints under. Must equal the backend's own OP_API_PREFIX — the API builds some URLs (region thumbnails) from its own prefix./curation

Build time only (source builds)​

Vite inlines these into the bundle when the app is built, so they take effect in npm run dev or a host npm run build, not as a Docker Compose setting: the published image and the Compose stack never read them.

VariablePurposeDefault
PUBLIC_APP_NAMETop-bar wordmark, for a white-label deploymentCropwright
PUBLIC_APP_BADGETop-bar badge lettersCW

Read by docker-compose.yml / docker-entrypoint.sh only​

VariablePurposeDefault
API_UPSTREAMWhere nginx proxies PUBLIC_API_PREFIX/* — the OpenProcessor API container, by name over the shared docker networkhttp://op-api:8000
OP_CROPWRIGHT_PORTHost port this instance publishes nginx on5184
OP_UI_BIND_ADDRESSHost address the Cropwright port is published on (the optional monitoring UIs follow it). Defaults to OP_BIND_ADDRESS, then loopback. Set 0.0.0.0 to allow your local network; the API has no authentication, so keep it on a trusted network.127.0.0.1
OP_CROPWRIGHT_DATASET_UPLOAD_MAX_MBUpload cap for a dataset archive on dataset import (nginx client_max_body_size for the dataset-upload route, in MB), with a one-hour read timeout. Substituted into both nginx.conf and the served client config; the client refuses a larger file before sending it.2048
OP_CROPWRIGHT_INGEST_MAX_REQUEST_MBDeployment-owned upload cap for /ingest (nginx client_max_body_size, in MB); substituted into both nginx.conf and the served client config so the two can't drift256

Both upload caps must be positive integers; the container refuses to start otherwise. Values are substituted when the container starts, so one image fits any deployment and a change needs only a restart, not a rebuild.

Settings that are not environment variables​

Almost everything else you might want to change is not configured on Cropwright. It is either backend configuration or a per-project setting you edit in the app. See Runtime settings for where each one lives.

See Running a second instance for the multi-instance pattern, and Backend feature flags for what the backend needs to enable per feature — none of that is a Cropwright env var.