# Sketch — Environment Configuration # # Copy this file to .env and edit as needed. # LLM credentials, Slack tokens, and WhatsApp pairing are configured # through the web UI during onboarding — not in this file. # Database # Supported: sqlite (default), postgres DB_TYPE=sqlite SQLITE_PATH=./data/sketch.db # DATABASE_URL=postgres://user:pass@localhost:5432/sketch # Server DATA_DIR=./data # CLAUDE_CONFIG_DIR and SKETCH_CONFIG_DIR default to ~/.claude and ~/.sketch. # Only override for custom deployments (must be absolute paths, ~ is not expanded). # CLAUDE_CONFIG_DIR=/data/.claude # SKETCH_CONFIG_DIR=/data/.sketch PORT=3000 LOG_LEVEL=info # debug | info | warn | error # In dev, the Vite server proxies /api to http://localhost:${PORT} by default. # Override the full target if your API runs elsewhere (e.g. a remote host): # VITE_API_PROXY_TARGET=http://localhost:3000 # Public-facing base URL (required for OAuth redirects) # e.g. https://sketch.yourcompany.com — no trailing slash # BASE_URL=http://localhost:3000 # Slack mode # socket (default): uses WebSocket via App-Level Token (self-hosted) # http: receives events via HTTP POST (required for Marketplace apps) # SLACK_MODE=socket # SLACK_SIGNING_SECRET= # Required when SLACK_MODE=http # Encryption (optional, recommended for shared Postgres deployments) # 64 hex chars = 32 bytes for AES-256-GCM # ENCRYPTION_KEY= # System API (optional, enables PUT /api/system/slack/tokens) # SYSTEM_SECRET= # Managed mode (set by the management plane, not by self-hosted users) # MANAGED_URL=https://app.getsketch.ai # MANAGED_AUTH_SECRET= # PostHog LLM Analytics (optional, sends gen_ai spans to PostHog) # POSTHOG_API_KEY=phc_... # POSTHOG_HOST=https://us.i.posthog.com # Feature flags # EXPERIMENTAL_FLAG=false # Set to true to enable Files & Connections UI # Bootstrap (managed seed, first boot only) # BOOTSTRAP_ADMIN_EMAIL= # BOOTSTRAP_ADMIN_PASSWORD_HASH= # BOOTSTRAP_SLACK_BOT_TOKEN=