Skip to main content

Environment Variables

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_PASSWORD-NoRedis password (used in both single and Sentinel mode)
REDIS_SENTINEL_ADDRS-NoComma-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_TOKEN-Yes (Slack)Bot token starting with xoxb-
SLACK_SIGNING_SECRET-Yes (Slack)Signing secret from your Slack app
SLACK_APP_TOKEN-Yes (Slack)App-level token starting with xapp- - required for interactive buttons (Make me Lead, Add Note)

See Connecting Slack for how to obtain these values.

Microsoft Teams​

VariableDefaultRequiredDescription
TEAMS_APP_ID-Yes (Teams)Azure App Registration Application ID
TEAMS_APP_PASSWORD-Yes (Teams)Azure App Registration client secret
TEAMS_TENANT_ID-Yes (Teams)Azure AD Tenant ID
TEAMS_TEAM_ID-Yes (Teams)ID of the Team where incident channels are created
TEAMS_BOT_USER_ID-Yes (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_KEY-NoYour 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_URL-Yes (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_ID-NoSP EntityID - defaults to <SAML_BASE_URL>/saml/metadata
SAML_CERT_FILE-NoPath to SP certificate PEM - auto-generated self-signed cert used if not set
SAML_KEY_FILE-NoPath 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_ORIGINS-NoComma-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=...
SLACK_APP_TOKEN=xapp-...

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

# Production
APP_ENV=production
PORT=8080