Skip to content

Configuration

All configuration is via environment variables in apps/api/.env. Copy from .env.example to get started.

Required

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

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

API Server

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

Authentication (Ory Kratos)

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 dashboardfalse
TRUSS_ADMIN_IDENTITY_IDSComma-separated Kratos identity UUIDs for admin access(none)

Authorization (Ory Keto)

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)

OAuth2 / OIDC (Ory Hydra)

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)

API Gateway (Ory Oathkeeper)

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)

Storage (MinIO / S3)

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

Cross-Origin

VariableDescriptionDefault
CORS_ALLOWED_ORIGINSComma-separated frontend origins(none)

When deploying the dashboard and API on different domains (e.g. Cloudflare Pages + Coolify), set this to allow cross-origin requests:

CORS_ALLOWED_ORIGINS=https://truss.pages.dev,https://truss.yourdomain.com