Matruno

Environment Variables

Last updated April 25, 2026

Configure Matruno runtime, database, Redis, Temporal, auth, integrations, frontend, and observability environment variables from the repo examples.

Source files#

The root reference file is .env.example. Docker Compose also loads backend/.env for the backend and worker services, so keep root .env and backend/.env aligned for local Compose runs.

For local setup:

bash
cp .env.example .env
cp .env.example backend/.env

If you run the frontend outside Docker, create frontend/.env.local with frontend public values.

Required core variables#

VariableUsed byPurpose
DATABASE_URLBackend, workerAsync PostgreSQL connection string
SECRET_KEYBackend, workerSession/application secret and encrypted secret material
TOKEN_HASH_SECRETBackend, workerIndependent token hashing/HMAC secret
REDIS_URLBackend, workerRedis cache, locks, and coordination
TEMPORAL_HOSTBackend, workerTemporal frontend address
TEMPORAL_NAMESPACEBackend, workerTemporal namespace
FRONTEND_URLBackendBrowser origin and callback-safe links
CORS_ORIGINSBackendExplicit browser origins when credentials are enabled
NEXT_PUBLIC_API_URLFrontendPublic API base URL, usually http://localhost:5678/api/v1

Local default ports#

VariableDefault
API_PORT / BACKEND_PORT5678
FRONTEND_PORT3456
ADMIN_PANEL_PORT5679
TEMPORAL_UI_PORT8233
POSTGRES_PORT5433
Docs PORT / MATRUNO_DOCS_PORT3457

Optional provider and integration variables#

Variable familyPurpose
OPENAI_API_KEY, OPENAI_API_KEYSOpenAI-backed agent, extraction, drafting, and chat paths
ANTHROPIC_API_KEY, ANTHROPIC_API_KEYSOptional Anthropic provider paths
GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, GMAIL_REDIRECT_URI, GMAIL_SCOPESGmail OAuth and email flows
AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, AZURE_REDIRECT_URI, GRAPH_SCOPESMicrosoft Graph email paths
NANGO_SECRET_KEY, NEXT_PUBLIC_NANGO_PUBLIC_KEYNango-backed provider status and OAuth flows
SMTP_*, IMAP_*SMTP sending and IMAP inbox monitoring
VOICE_AGENT_WS_URL, VOICE_AGENT_HEALTH_URLOptional voice-agent observability links

Observability variables#

VariablePurpose
OTEL_ENABLEDEnables backend and worker OpenTelemetry bootstrap
OTEL_EXPORTER_OTLP_ENDPOINTOTLP gRPC endpoint, local Compose uses the collector
OTEL_EXPORTER_OTLP_INSECURELocal insecure OTLP transport flag
OTEL_SERVICE_VERSIONResource version label
OTEL_DEPLOYMENT_ENVIRONMENTResource environment label
OTEL_METRIC_EXPORT_INTERVAL_MILLISMetric export interval
GRAFANA_CLOUD_OTLP_ENDPOINTOptional Grafana Cloud OTLP target
GRAFANA_CLOUD_OTLP_AUTH_HEADEROptional Grafana Cloud auth header
NEXT_PUBLIC_BROWSER_OBSERVABILITY_ENABLEDEnables frontend/admin browser RUM
NEXT_PUBLIC_BROWSER_OTLP_BASE_URLBrowser same-origin OTLP proxy base
OTEL_BROWSER_PROXY_TARGETFrontend/admin proxy target for browser OTLP

Production secrets

Never use the example secrets in production. Set high-entropy secrets, lock down CORS, enable secure cookies, and configure only the integration credentials your deployment actually needs.

Was this helpful?