Environment Variables

June 23, 2026 · View on GitHub

All configuration is done through environment variables. Set them in a .env file in the project root or pass them directly to Docker.

Core

VariableDefaultRequiredDescription
PORT8080NoPort the application listens on
APP_ENVdevelopmentNoSet to production for production deployments
LOG_LEVELinfoNoLog verbosity: debug, info, warn, error

Database

VariableDefaultRequiredDescription
DATABASE_URLpostgresql://regen:secret@localhost:5432/regen?sslmode=disableYes (production)PostgreSQL connection string
DB_MAX_OPEN_CONNS25NoMaximum open database connections
DB_MAX_IDLE_CONNS5NoMaximum idle database connections
DB_CONN_MAX_LIFE5mNoMaximum connection lifetime

Migrations run automatically on startup. No manual migration step required.

Redis

VariableDefaultRequiredDescription
REDIS_URLredis://localhost:6379NoRedis connection URL (ignored when Sentinel is configured)
REDIS_PASSWORDNoRedis password (used in both single and Sentinel mode)
REDIS_SENTINEL_ADDRSNoComma-separated Sentinel addresses for HA: sentinel1:26379,sentinel2:26379
REDIS_SENTINEL_MASTERmymasterNoSentinel master name (only used when REDIS_SENTINEL_ADDRS is set)

Slack

VariableDefaultRequiredDescription
SLACK_BOT_TOKENYes (Slack)Bot token starting with xoxb-
SLACK_SIGNING_SECRETYes (Slack)Signing secret from your Slack app

See Connecting Slack for how to obtain these values.

Microsoft Teams

VariableDefaultRequiredDescription
TEAMS_APP_IDYes (Teams)Azure App Registration Application ID
TEAMS_APP_PASSWORDYes (Teams)Azure App Registration client secret
TEAMS_TENANT_IDYes (Teams)Azure AD Tenant ID
TEAMS_TEAM_IDYes (Teams)ID of the Team where incident channels are created
TEAMS_BOT_USER_IDYes (Teams)AAD object ID of the bot user (required for DMs)
TEAMS_SERVICE_URLhttps://smba.trafficmanager.net/amer/NoBot Framework relay URL — change for non-US tenants: /emea/, /apac/, /in/

Teams integration is disabled when TEAMS_APP_ID is not set.

AI (OpenAI)

VariableDefaultRequiredDescription
OPENAI_API_KEYNoYour OpenAI API key — AI features are disabled when not set
OPENAI_MODELgpt-4o-miniNoModel to use for summaries and post-mortem generation
OPENAI_MAX_TOKENS1000NoToken limit for summaries
OPENAI_POSTMORTEM_MAX_TOKENS3000NoToken limit for post-mortem generation

The API key can also be set through Settings → System in the UI without a container restart.

SAML SSO

SAML SSO is free and included in the Community edition.

VariableDefaultRequiredDescription
SAML_IDP_METADATA_URLYes (SSO)Your IdP metadata URL — SSO is disabled when not set
SAML_BASE_URLhttp://localhost:8080Yes (SSO)Externally reachable base URL of this instance (e.g. https://incidents.yourcompany.com)
SAML_ENTITY_IDNoSP EntityID — defaults to <SAML_BASE_URL>/saml/metadata
SAML_CERT_FILENoPath to SP certificate PEM — auto-generated self-signed cert used if not set
SAML_KEY_FILENoPath to SP private key PEM — auto-generated if not set
SAML_ALLOW_IDP_INITIATEDfalseNoAllow IdP-initiated flows (e.g. Okta tile clicks)

See SAML SSO for setup guides for Okta, Azure AD, and Google Workspace.

CORS

VariableDefaultRequiredDescription
CORS_ALLOWED_ORIGINSNoComma-separated list of allowed origins for API requests (e.g. https://incidents.yourcompany.com). Leave empty when the frontend and API are on the same origin (default with make start).

Example .env file

# Required
DATABASE_URL=postgresql://regen:strongpassword@db:5432/regen?sslmode=disable
REDIS_URL=redis://redis:6379

# Slack
SLACK_BOT_TOKEN=xoxb-...
SLACK_SIGNING_SECRET=...

# AI (optional)
OPENAI_API_KEY=sk-...

# Production
APP_ENV=production
PORT=8080