Skip to main content
Comprehensive reference for all environment variables relevant to self-hosting Inbox Zero.

All Environment Variables

VariableRequiredDescriptionDefault
Core
DATABASE_URLYesPostgreSQL connection string
NEXT_PUBLIC_BASE_URLYesPublic URL where app is hosted (e.g., https://yourdomain.com)
INTERNAL_API_KEYYesSecret key for internal API calls. Generate with openssl rand -hex 32
AUTH_SECRETYesbetter-auth secret. Generate with openssl rand -hex 32
NODE_ENVNoEnvironment modedevelopment
Encryption
EMAIL_ENCRYPT_SECRETYesSecret for encrypting OAuth tokens. Generate with openssl rand -hex 32
EMAIL_ENCRYPT_SALTYesSalt for encrypting OAuth tokens. Generate with openssl rand -hex 16
Google OAuth
GOOGLE_CLIENT_IDYesOAuth client ID from Google Cloud Console
GOOGLE_CLIENT_SECRETYesOAuth client secret from Google Cloud Console
Microsoft OAuth
MICROSOFT_CLIENT_IDNoOAuth client ID from Azure Portal
MICROSOFT_CLIENT_SECRETNoOAuth client secret from Azure Portal
MICROSOFT_WEBHOOK_CLIENT_STATENoSecret for Microsoft webhook verification. Generate with openssl rand -hex 32
Google PubSub
GOOGLE_PUBSUB_TOPIC_NAMEYesFull topic name (e.g., projects/my-project/topics/gmail)
GOOGLE_PUBSUB_VERIFICATION_TOKENNoToken for webhook verification
Redis
UPSTASH_REDIS_URLNo*Upstash Redis URL or any Upstash-compatible HTTP Redis endpoint (*required if not using Docker Compose with local Redis)
UPSTASH_REDIS_TOKENNo*Upstash Redis token or serverless-redis-http token (*required if not using Docker Compose)
REDIS_URLNoAlternative Redis URL (for subscriptions)
LLM Provider Selection
DEFAULT_LLM_PROVIDERYesPrimary LLM provider (anthropic, google, openai, bedrock, openrouter, groq, aigateway, ollama)
DEFAULT_LLM_MODELNoModel to use with default providerProvider default
DEFAULT_OPENROUTER_PROVIDERSNoComma-separated list of OpenRouter providers
ECONOMY_LLM_PROVIDERNoProvider for cheaper operations
ECONOMY_LLM_MODELNoModel for economy provider
ECONOMY_OPENROUTER_PROVIDERSNoOpenRouter providers for economy model
CHAT_LLM_PROVIDERNoProvider for chat operationsFalls back to default
CHAT_LLM_MODELNoModel for chat provider
CHAT_OPENROUTER_PROVIDERSNoOpenRouter providers for chat
OPENROUTER_BACKUP_MODELNoFallback model for OpenRoutergoogle/gemini-2.5-flash
USE_BACKUP_MODELNoEnable backup model fallbackfalse
LLM API Keys
ANTHROPIC_API_KEYNoAnthropic API key
OPENAI_API_KEYNoOpenAI API key
GOOGLE_API_KEYNoGoogle Gemini API key
GROQ_API_KEYNoGroq API key
OPENROUTER_API_KEYNoOpenRouter API key
AI_GATEWAY_API_KEYNoAI Gateway API key
PERPLEXITY_API_KEYNoPerplexity API key for guest research for meeting briefs
AWS Bedrock
BEDROCK_ACCESS_KEYNoAWS access key for Bedrock. See AI SDK Bedrock documentation.
BEDROCK_SECRET_KEYNoAWS secret key for Bedrock
BEDROCK_REGIONNoAWS region for Bedrockus-west-2
Ollama (Local LLM)
OLLAMA_BASE_URLNoOllama API endpoint (e.g., http://localhost:11434/api)
OLLAMA_MODELNoModel to use with Ollama (e.g., llama3)
Background Jobs (QStash, optional)
QSTASH_TOKENNoQStash API token (optional; fallback runs jobs via internal API + cron)
QSTASH_CURRENT_SIGNING_KEYNoCurrent signing key for webhooks
QSTASH_NEXT_SIGNING_KEYNoNext signing key for key rotation
Sentry
SENTRY_AUTH_TOKENNoAuth token for source maps
SENTRY_ORGANIZATIONNoOrganization slug
SENTRY_PROJECTNoProject slug
NEXT_PUBLIC_SENTRY_DSNNoClient-side DSN
Resend
RESEND_API_KEYNoAPI key for transactional emails
RESEND_AUDIENCE_IDNoAudience ID for contacts
RESEND_FROM_EMAILNoFrom email addressInbox Zero <[email protected]>
NEXT_PUBLIC_IS_RESEND_CONFIGUREDNoClient-side flag indicating if Resend is configured
Other
CRON_SECRETNoSecret for cron job authentication
HEALTH_API_KEYNoAPI key for health checks
WEBHOOK_URLNoExternal webhook URL
Admin & Access Control
ADMINSNoComma-separated list of admin emails
Feature Flags
NEXT_PUBLIC_CONTACTS_ENABLEDNoEnable contacts featurefalse
NEXT_PUBLIC_EMAIL_SEND_ENABLEDNoEnable email sendingtrue
NEXT_PUBLIC_BYPASS_PREMIUM_CHECKSNoBypass premium checks (recommended for self-hosting)true
NEXT_PUBLIC_DIGEST_ENABLEDNoEnable email digest feature, which sends periodic summaries of emails. Works without QStash (no retries).false
NEXT_PUBLIC_MEETING_BRIEFS_ENABLEDNoEnable meeting briefs, which automatically sends pre-meeting briefings to users. Requires the meeting briefs cron job to be running.false
NEXT_PUBLIC_FOLLOW_UP_REMINDERS_ENABLEDNoEnable follow-up reminders, which allows users to add labels to emails for automatic follow-up tracking. Requires the follow-up reminders cron job to be running.false
NEXT_PUBLIC_INTEGRATIONS_ENABLEDNoEnable the integrations feature, allowing users to connect external services.false
NEXT_PUBLIC_SMART_FILING_ENABLEDNoEnable the Smart Filing feature for automatic document organization from email attachments.false
Debugging
DISABLE_LOG_ZOD_ERRORSNoDisable logging Zod validation errors
ENABLE_DEBUG_LOGSNoEnable debug loggingfalse
NEXT_PUBLIC_LOG_SCOPESNoComma-separated log scopes

Setup Guides

For detailed setup instructions, see the Setup Guides:

Notes

  • If running the app in Docker and Ollama locally, use http://host.docker.internal:11434/api as the OLLAMA_BASE_URL.
  • When using Docker Compose with --profile all, database and Redis URLs are auto-configured. See the Self-Hosting Guide for details.