Skip to content
Beta — Truss is in public beta. Documentation is actively updated but may not reflect the latest changes. Report issues on GitHub.

Configuration

All configuration is via environment variables in the repo-root .env (the API loads it from the project root). Copy from .env.example to get started.

VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgres://postgres:postgres@localhost:5432/postgres

That’s it. Everything else is optional — Truss works with just a database.

VariableDescriptionDefault
API_PORTPort the Express server listens on8787
QUERY_TIMEOUT_MSMax query execution time (ms)10000
SQL_MAX_ROWSMax rows returned by the SQL workbench200

Required for user authentication. Without these, the dashboard runs in dev mode (no login required).

VariableDescriptionDefault
KRATOS_PUBLIC_URLKratos public APIhttp://localhost:4433
KRATOS_ADMIN_URLKratos admin APIhttp://localhost:4434
KRATOS_ADMIN_TOKENBearer token for the Kratos admin proxy(none)
KRATOS_IDENTITY_SCHEMA_IDIdentity schema to use for new usersdefault
KRATOS_OIDC_PROVIDERSComma-separated social login provider IDs(none)
TRUSS_AUTH_REQUIREDRequire authentication for dashboard. Set false for local dev to skip login. Production (NODE_ENV=production) always forces auth on regardless of this value.true
TRUSS_ADMIN_IDENTITY_IDSComma-separated Kratos identity UUIDs for admin access(none)
TRUSS_BOOTSTRAP_ADMINSeed a default admin on first boot (set false to disable)true
TRUSS_BOOTSTRAP_ADMIN_EMAILEmail for the seeded first-boot adminadmin@truss.local
TRUSS_BOOTSTRAP_ADMIN_PASSWORDPassword for the seeded admin (blank = a random one is generated and printed to the API logs)(none; blank → a random password is generated and logged)
TRUSS_DEMO_MODEEnable anonymous read-only demo access via the X-Demo: true header (rate-limited, mutations blocked). Security-relevant — leave off unless you intend a public demo.false

When Kratos is configured and TRUSS_BOOTSTRAP_ADMIN is not false, Truss seeds a default admin on startup so you can log in immediately, the same way Grafana and Argo CD do. This only ever runs when no identity exists yet, so it never overwrites real users.

  • Email: admin@truss.local (override with TRUSS_BOOTSTRAP_ADMIN_EMAIL).

  • Password: if you set TRUSS_BOOTSTRAP_ADMIN_PASSWORD, that value is used. If you leave it blank, a random password is generated and printed once to the API logs:

    Terminal window
    # Docker Compose
    docker compose logs truss-api | grep "Default admin"
    # Kubernetes / Helm
    kubectl -n truss logs deploy/truss-api | grep "Default admin"

The seeded account has full admin rights. Change the password right after your first login in the dashboard under Settings → Account → Change Password (which runs the Ory Kratos self-service settings flow). To opt out of seeding entirely, set TRUSS_BOOTSTRAP_ADMIN=false and create your first user via the normal registration screen.

Required for relation-based access control (ReBAC).

VariableDescriptionDefault
KETO_READ_URLKeto read APIhttp://localhost:4466
KETO_WRITE_URLKeto write APIhttp://localhost:4467
KETO_ADMIN_TOKENBearer token for the Keto admin proxy(none)

Required for OAuth2 client management and token issuance.

VariableDescriptionDefault
HYDRA_PUBLIC_URLHydra public API (OAuth2 endpoints)http://localhost:4444
HYDRA_ADMIN_URLHydra admin API (client management)http://localhost:4445
HYDRA_ADMIN_TOKENBearer token for the Hydra admin proxy(none)

Required for the API gateway / reverse proxy features.

VariableDescriptionDefault
OATHKEEPER_PROXY_URLOathkeeper proxy endpointhttp://localhost:4455
OATHKEEPER_ADMIN_URLOathkeeper admin APIhttp://localhost:4456
OATHKEEPER_ADMIN_TOKENBearer token for the Oathkeeper admin proxy(none)

Required for file storage features.

VariableDescriptionDefault
MINIO_S3_ENDPOINTS3-compatible endpoint URLhttp://localhost:9000
MINIO_CONSOLE_URLMinIO web console URLhttp://localhost:9001
MINIO_ACCESS_KEYS3 access keyminioadmin
MINIO_SECRET_KEYS3 secret keyminioadmin
MINIO_REGIONS3 regionus-east-1
MINIO_FORCE_PATH_STYLEUse path-style S3 URLs (required for MinIO)true

Optional. Powers the Cache / KV panel (keyspace browser, stats, developer views). Valkey is Redis-compatible, so an existing Redis also works. Without these, the Cache panel reports “not configured” and the rest of Truss runs normally.

VariableDescriptionDefault
VALKEY_HOSTValkey/Redis hostnamelocalhost
VALKEY_PORTValkey/Redis port6379
VALKEY_PASSWORDrequirepass value (blank = no auth)(none)
VALKEY_URLFull redis:// URL, overrides host/port/password(none)

VALKEY_PASSWORD is the cache service’s own auth and is unrelated to the dashboard login. The bundled Compose and Helm setups generate it for you.

Metrics (/metrics) and structured JSON logs are always on. Tracing is opt-in. See the Observability guide for the full setup.

VariableDescriptionDefault
OTEL_EXPORTER_OTLP_ENDPOINTOTLP/HTTP endpoint for trace export (e.g. http://collector:4318). Unset = tracing off.(none)
OTEL_SERVICE_NAMEService name attached to spanstruss-api
LOG_LEVELpino log level (debug/info/warn/error)info
VariableDescriptionDefault
CORS_ALLOWED_ORIGINSComma-separated frontend origins(none)
TRUSS_PUBLIC_URLPublic URL users hit in the browser (used to infer the session-cookie Secure flag)http://localhost:3000
COOKIE_SECUREForce the session-cookie Secure flag (true/false). Inferred from the URL scheme when unset(inferred)

The session cookie is only marked Secure when you serve Truss over HTTPS. Serving over plain HTTP (e.g. http://localhost:3000) keeps it non-Secure so the browser does not drop it; otherwise login would never stick. Set COOKIE_SECURE=true to force it on behind an HTTPS-terminating proxy that the API can’t detect.

When deploying the dashboard and API on different domains, set this to allow cross-origin requests:

CORS_ALLOWED_ORIGINS=https://app.yourdomain.com,https://truss.yourdomain.com