Skip to content

Configuration reference

All configuration is via environment variables, set in docker-compose.yml or your platform’s equivalent. The backend runs as either ./server (web) or ./server worker (background analytics). Which mode each variable applies to is noted per section.

See backend/.env.example for a copy-paste-ready template.

Applies to: web server

VariableDefaultRequiredDescription
PORT8080NoHTTP server port
BACKEND_URLhttp://localhost:8080NoPublic URL of the backend; used for CLI device-code authorization flow
FRONTEND_URLhttp://localhost:5173YesPublic URL of the frontend; used for OAuth redirects, email links, and CORS
ALLOWED_ORIGINShttp://localhost:5173YesComma-separated list of allowed CORS origins
STATIC_FILES_DIR/app/staticNoDirectory for serving the built frontend
CSRF_SECRET_KEY(none)YesCSRF protection secret; must be at least 32 characters
INSECURE_DEV_MODEfalseNoSet to true to disable secure-cookie requirements (local dev without HTTPS)
TRUSTED_PROXY_HEADERS(all)NoComma-separated list of proxy header names to honor for client-IP extraction (e.g. Fly-Client-IP,CF-Connecting-IP). When unset, all known proxy headers are trusted. Set this to only the header your edge proxy sets so attackers can’t spoof other headers to bypass IP rate limits.

Applies to: web server and worker

VariableDefaultRequiredDescription
DATABASE_URL(none)YesPostgreSQL connection string (e.g. postgres://user:pass@host:5432/confab?sslmode=disable)
MIGRATE_DATABASE_URLFalls back to DATABASE_URLNoSeparate connection string for running migrations with an elevated database user

Applies to: web server and worker

VariableDefaultRequiredDescription
S3_ENDPOINT(none)YesS3/MinIO endpoint (e.g. localhost:9000)
AWS_ACCESS_KEY_ID(none)YesS3/MinIO access key
AWS_SECRET_ACCESS_KEY(none)YesS3/MinIO secret key
BUCKET_NAME(none)YesS3/MinIO bucket name
S3_USE_SSLtrueNoUse SSL for S3 connections; set to false for local MinIO

Applies to: web server

At least one method must be enabled. All four can be used simultaneously.

Recommended for self-hosted deployments.

VariableDefaultRequiredDescription
AUTH_PASSWORD_ENABLEDfalseNoSet to true to enable username/password login
ADMIN_BOOTSTRAP_EMAIL(none)If password auth enabledEmail for the initial admin user (created on first startup if no users exist)
ADMIN_BOOTSTRAP_PASSWORD(none)If password auth enabledPassword for the initial admin user; remove after setup

Create an OAuth app at github.com/settings/developers.

VariableDefaultRequiredDescription
GITHUB_CLIENT_ID(none)If GitHub OAuth enabledGitHub OAuth app client ID
GITHUB_CLIENT_SECRET(none)If GitHub OAuth enabledGitHub OAuth app client secret
GITHUB_REDIRECT_URL(none)If GitHub OAuth enabledOAuth callback URL (e.g. https://your-domain/auth/github/callback)

Create OAuth credentials at console.cloud.google.com/apis/credentials.

VariableDefaultRequiredDescription
GOOGLE_CLIENT_ID(none)If Google OAuth enabledGoogle OAuth client ID
GOOGLE_CLIENT_SECRET(none)If Google OAuth enabledGoogle OAuth client secret
GOOGLE_REDIRECT_URL(none)If Google OAuth enabledOAuth callback URL (e.g. https://your-domain/auth/google/callback)

Works with Okta, Auth0, Azure AD, Keycloak, etc. All four variables must be set.

VariableDefaultRequiredDescription
OIDC_ISSUER_URL(none)If OIDC enabledOIDC issuer URL (e.g. https://dev-12345.okta.com)
OIDC_CLIENT_ID(none)If OIDC enabledOIDC client ID
OIDC_CLIENT_SECRET(none)If OIDC enabledOIDC client secret
OIDC_REDIRECT_URL(none)If OIDC enabledOAuth callback URL (e.g. https://your-domain/auth/oidc/callback)
OIDC_DISPLAY_NAMESSONoControls the login button text (“Continue with …”)
VariableDefaultRequiredDescription
ALLOWED_EMAIL_DOMAINS(all domains)NoComma-separated list of allowed email domains; applies to all auth methods
OAUTH_AUTO_LINK_EMAILfalseNoWhen true, a first-time OAuth login whose email matches an existing account (password or another provider) is automatically linked to it. Default false rejects the login (/login?error=account_exists) instead, preventing account takeover via an attacker-controlled IdP email. Only enable if you trust every configured IdP to strictly verify email ownership. Returning users and brand-new emails are unaffected.
VariableDefaultRequiredDescription
DEMO_IDENTITY_EMAIL(none)NoWhen set, designates a single user as the read-only demo identity. On startup the named user is provisioned with read_only=true, name "Demo", is_admin=false, and any password identity is stripped (login disabled). Anonymous web visitors on auth-required routes are auto-impersonated as the demo identity via a single shared session cookie (HMAC-derived from CSRF_SECRET_KEY). Mutating requests from the demo identity return 403 {"error":"read_only_user", ...}. The login handler and all OAuth callbacks reject this email. Real users (with their own password / OAuth) continue to authenticate and write normally. Unset = zero behavior change anywhere — safe to leave off in regular deployments.

See Demo mode for a deeper guide.

Applies to: web server

Email is enabled when both RESEND_API_KEY and EMAIL_FROM_ADDRESS are set.

VariableDefaultRequiredDescription
RESEND_API_KEY(none)If email enabledResend API key (resend.com)
EMAIL_FROM_ADDRESS(none)If email enabledSender email address
EMAIL_FROM_NAMEConfabNoSender display name
EMAIL_RATE_LIMIT_PER_HOUR100NoPer-user email rate limit
SUPPORT_EMAIL(none)NoSupport email shown in UI

Applies to: web server and worker

AI-powered session summaries. Requires an Anthropic API key.

VariableDefaultRequiredDescription
SMART_RECAP_ENABLEDfalseNoSet to true to enable smart recaps
ANTHROPIC_API_KEY(none)If smart recaps enabledAnthropic API key
SMART_RECAP_MODEL(none)If smart recaps enabledModel to use (e.g. claude-haiku-4-5-20251001)
SMART_RECAP_QUOTA_LIMIT0 (unlimited)NoPer-user monthly generation cap. Positive integer enforces a limit; 0 or omitted means unlimited.
SMART_RECAP_MAX_OUTPUT_TOKENS1000NoMaximum LLM output tokens per recap
SMART_RECAP_MAX_TRANSCRIPT_TOKENS50000NoMaximum input tokens per transcript (~chars/4)

Applies to: web server

VariableDefaultRequiredDescription
SUPER_ADMIN_EMAILS(none)NoComma-separated email addresses with admin panel access. Admin authorization is the union of this list and the per-user is_admin column (5k4v) — env super-admins are always admins (recovery path); other admins can be granted/revoked at runtime from the admin UI without an env edit + restart. Validated at startup: malformed/duplicate entries are logged as warnings and the normalized list is logged. Keep any demo identity’s email out of this list.
MAX_USERS50NoMaximum number of registered users; set to 0 to block new registrations
SESSION_IDLE_TIMEOUT48hNoSliding idle timeout for web sessions (time.ParseDuration format, e.g. 48h, 30m). A session inactive longer than this is rejected even within the 7-day absolute cap. Invalid/empty/non-positive values fall back to the default.

Applies to: web server

Sharing behavior and UI customization.

VariableDefaultRequiredDescription
SHARE_ALL_SESSIONS_TO_AUTHENTICATEDfalseNoMake every session visible to every authenticated user; useful for small teams that want full transparency
ENABLE_SHARE_CREATIONfalseNoEnable share link creation
SHARE_DAILY_QUOTA100NoPer-user cap on shares created in a rolling 24h window; the creation endpoint returns 429 once a user exceeds it. Set to 0 to disable the cap.
ENABLE_ORG_ANALYTICSfalseNoEnable the Organization Analytics view — per-user aggregated cost and usage across the whole org. Every authenticated user can see every other user’s totals, so only enable for trusted-team deployments.
ENABLE_SAAS_FOOTERfalseNoShow the SaaS footer (GitHub, Discord, Help links, copyright); off by default for self-hosted
ENABLE_SAAS_TERMLYfalseNoEnable the Termly cookie-consent banner (SaaS only); off by default for self-hosted
DISABLE_UPDATE_CHECKfalseNoSuppress the in-product “Update available” badge (skips the periodic GitHub release check). Useful for air-gapped deployments. Implicitly true when ENABLE_SAAS_FOOTER=true, since SaaS users can’t self-upgrade.

Applies to: web server, worker

Model token prices are no longer baked into the build — the backend pulls the latest price table from confabulous.dev so a self-hosted instance picks up new prices (and new models within an existing provider) without a redeploy. The fetch is best-effort: if the source is unreachable, invalid, or older than the build’s embedded table, the embedded table is used. The managed instance auto-disables this (it is the source).

VariableDefaultRequiredDescription
PRICING_SOURCE_URLhttps://confabulous.dev/api/v1/pricingNoWhere to pull the latest model price table from. Set to empty (PRICING_SOURCE_URL=) to disable fetching and use the embedded table only (air-gapped deployments).
PRICING_REFRESH_INTERVAL2hNoHow often to refresh the price table (Go duration, e.g. 2h, 90m). Failures are retried after 15 minutes.

Applies to: worker only

Precomputes analytics and smart recaps in the background.

VariableDefaultRequiredDescription
WORKER_POLL_INTERVAL30mNoHow often to check for stale sessions
WORKER_MAX_SESSIONS20NoMaximum sessions to process per cycle
WORKER_MAX_SEARCH_INDEX_SESSIONS200NoMaximum sessions to (re)build the search index for per cycle (search indexing is cheap, so this is higher than WORKER_MAX_SESSIONS)
WORKER_DRY_RUNfalseNoLog what would be done without actually processing

Controls when sessions need recomputation. WORKER_REGULAR_* = analytics cards, WORKER_RECAP_* = smart recaps.

VariableDefaultDescription
WORKER_REGULAR_THRESHOLD_PCT0.20Percentage change (0–1) to trigger analytics recompute
WORKER_REGULAR_BASE_MIN_LINES5Minimum new lines before recompute
WORKER_REGULAR_BASE_MIN_TIME3mMinimum age of new data
WORKER_REGULAR_MIN_INITIAL_LINES10Minimum lines for first computation
WORKER_REGULAR_MIN_SESSION_AGE10mMinimum session age
WORKER_RECAP_THRESHOLD_PCT0.20Percentage change (0–1) to trigger recap recompute
WORKER_RECAP_BASE_MIN_LINES150Minimum new lines before recompute
WORKER_RECAP_BASE_MIN_TIME30mMinimum age of new data
WORKER_RECAP_MIN_INITIAL_LINES25Minimum lines for first computation
WORKER_RECAP_MIN_SESSION_AGE10mMinimum session age

Applies to: web server and worker

VariableDefaultRequiredDescription
LOG_LEVELinfoNoLog level: debug, info, warn, error
OTEL_SERVICE_NAME(none)NoOpenTelemetry service name
OTEL_EXPORTER_OTLP_ENDPOINT(none)NoOTLP exporter endpoint (e.g. https://api.honeycomb.io)
OTEL_EXPORTER_OTLP_HEADERS(none)NoOTLP exporter headers (e.g. x-honeycomb-team=your-api-key)
ENABLE_PPROFfalseNoEnable pprof profiling server on localhost:6060

Applies to: web server

VariableDefaultRequiredDescription
HTTP_READ_TIMEOUT30sNoHTTP read timeout
HTTP_WRITE_TIMEOUT30sNoHTTP write timeout