.env.example to .env and configure the required variables for your environment.
Quick Start
.env file and configure at minimum the required variables marked below.
Authentication
Required for user authentication and session management.GitHub OAuth App client ID. Create an OAuth app at GitHub Settings > Developer Settings.
GitHub OAuth App client secret. Keep this value secure and never commit it to version control.
Random 32-character string used for session encryption. Generate with:This must be kept secret and should be unique per environment.
Base URL where the application is hosted. Used for OAuth callbacks.Development:
http://localhost:3000Production: https://yourdomain.comPublic-facing application URL. Must match
BETTER_AUTH_URL.Development: http://localhost:3000Production: https://yourdomain.comDatabase
PostgreSQL database connection.PostgreSQL connection string in the format:Docker Compose default:Production: Use your managed PostgreSQL instance connection string.
Redis
Required for caching GitHub API responses and session data.Upstash Redis REST API URL. Get this from your Upstash Console.Docker Compose default:Production: Use your Upstash Redis REST URL (format:
https://[endpoint].upstash.io)Upstash Redis REST API token. Get this from your Upstash Console.Docker Compose default:Production: Use your Upstash Redis token.
AI Configuration
Required for Ghost AI assistant and AI-powered features.OpenRouter
OpenRouter API key for accessing multiple AI models. Get your API key at OpenRouter.This is the primary API key used for the Ghost AI assistant.
Model ID for the main Ghost AI assistant. Available models can be found at OpenRouter Models.Default:
moonshotai/kimi-k2.5Recommended alternatives:anthropic/claude-4.5-sonnetgoogle/gemini-2.5-proopenai/gpt-4o
Model ID specifically for merge-related AI operations.Default:
google/gemini-2.5-pro-previewAnthropic
Anthropic API key for Claude models used in specific AI tasks. Get your API key at Anthropic Console.
OpenAI
OpenAI API key for GPT models (optional). Only required if you want to use OpenAI models directly.
Payments (Optional)
Stripe integration for billing and subscriptions.Stripe secret key from your Stripe Dashboard.Use test keys (
sk_test_...) for development and live keys (sk_live_...) for production.Stripe webhook signing secret for verifying webhook events. Get this when setting up webhooks in your Stripe Dashboard.
Stripe Price ID for the base subscription plan (format:
price_xxx).Stripe Price ID for metered usage billing (format:
price_xxx).Code Sandbox (Optional)
E2B integration for sandboxed code execution.Custom E2B template ID. Falls back to default base image if not specified.Build a custom template with:
Background Jobs (Optional)
Inngest for asynchronous task processing.Inngest event key for triggering background jobs. Get this from your Inngest Dashboard.
Inngest signing key for securing webhook events.
Search & Memory (Optional)
AI-powered search and conversation memory.Mixedbread embeddings API key for semantic search. Get your API key at Mixedbread.
SuperMemory API key for AI conversation context and memory.
Integrations (Optional)
Third-party service integrations.Slack
Slack OAuth client ID for Slack notifications integration.
Slack OAuth client secret.
Vercel
Vercel OIDC token for deployment authentication. Automatically set in Vercel deployments.
Monitoring (Optional)
Error tracking and monitoring.Sentry Data Source Name for error tracking. Format:
https://[key]@sentry.io/[project-id]Get this from your Sentry Project Settings.Sentry authentication token for source map uploads and releases.
Environment-Specific Configuration
Development
Minimal configuration for local development:Production
Production configuration checklist:Use managed services
- PostgreSQL: Use managed database (Supabase, Neon, Railway)
- Redis: Use Upstash Redis