Environment Variables

Complete reference for all environment variables supported by CamelMind.

CamelMind is configured at runtime via environment variables. Set them in .env.local for local development, or in your hosting platform's environment settings for production.

bash
# Copy the example file to get started
cp .env.example .env.local
Warning

Never commit .env.local or any file containing secrets to version control. The .gitignore in the starter template already excludes .env.local.

Site

VariableDefaultDescription
CAMELMIND_URLhttp://localhost:3000Public-facing URL of your site. Used in auth callbacks and <meta> tags. Must not have a trailing slash.

Authentication

VariableDefaultDescription
CAMELMIND_AUTH_ENABLEDfalseSet "true" to enable the auth layer.
CAMELMIND_AUTH_REQUIRE_LOGINfalseSet "true" to require a valid session on all pages (except publicPaths).
CAMELMIND_AUTH_PROVIDERdev-mockAuth provider: "dev-mock" or "oidc".
SESSION_SECRETRandom string used to sign and encrypt session cookies. Required when auth is enabled. Minimum 32 characters. Generate one with: openssl rand -base64 32

OIDC / SSO

Only needed when CAMELMIND_AUTH_PROVIDER=oidc.

VariableDescription
OIDC_ISSUEROIDC issuer URL — your IdP's realm URL, e.g. https://auth.example.com/realms/my-realm
OIDC_CLIENT_IDClient ID registered in your IdP
OIDC_CLIENT_SECRETClient secret from your IdP (keep this secret)
OIDC_ROLES_CLAIMJWT claim path containing user roles. Default: realm_access.roles (Keycloak format).

Build flags

VariableDescription
OFFLINE_MODESet "true" to enable static export mode (output: export). Bypasses auth and hides server-only UI. Used by build-offline.sh.

Feedback

VariableDefaultDescription
RESEND_API_KEYAPI key for Resend. When set (along with FEEDBACK_EMAIL_TO), the feedback widget emails submissions. If unset, the feedback API returns a 503 and submissions are not recorded.
FEEDBACK_EMAIL_TOAddress that receives feedback submissions.
FEEDBACK_EMAIL_FROMDoc Feedback <onboarding@resend.dev>The From address used when sending feedback emails. Must be a verified domain/sender in your Resend account for anything other than the default onboarding@resend.dev.

Example .env.local

bash
# Site
CAMELMIND_URL=http://localhost:3000

# Auth — disabled by default
CAMELMIND_AUTH_ENABLED=false
CAMELMIND_AUTH_REQUIRE_LOGIN=false
CAMELMIND_AUTH_PROVIDER=dev-mock
SESSION_SECRET=change-me-to-a-random-32-char-string

# OIDC — only needed when AUTH_PROVIDER=oidc
# OIDC_ISSUER=https://auth.example.com/realms/my-realm
# OIDC_CLIENT_ID=my-docs
# OIDC_CLIENT_SECRET=
# OIDC_ROLES_CLAIM=realm_access.roles

Production .env example

bash
CAMELMIND_URL=https://docs.example.com
CAMELMIND_AUTH_ENABLED=true
CAMELMIND_AUTH_REQUIRE_LOGIN=true
CAMELMIND_AUTH_PROVIDER=oidc
SESSION_SECRET=a-truly-random-32-character-secret
OIDC_ISSUER=https://auth.example.com/realms/prod
OIDC_CLIENT_ID=docs-prod
OIDC_CLIENT_SECRET=prod-secret-from-your-idp
OIDC_ROLES_CLAIM=realm_access.roles
Tip

On Vercel, set environment variables in Project Settings → Environment Variables. They are injected at build and runtime automatically — no .env file needed.

July 25, 2026
Was this page helpful?