Skip to content

Environment Variables

If you are self-hosting Plan AI, you will need to configure environment variables for all three of the core backend applications (The Node API, the React Frontend, and the Python Voice API).

Global Configuration

Plan AI uses a master script to generate .env templates across the entire monorepo. From the root of the repository, run:

bash
yarn setup:env

Backend Variables (plan-ai/backend/.env)

This is the most critical environment file. It handles database connections, API keys, integrations, and internal service discovery.

VariableDescriptionExample
Core & Services
ENVThe environment you are running in.local
PORTThe port the Express API runs on.8080
FRONTEND_URLThe public URL of the frontend app (for CORS).http://localhost:3000
BACKEND_URLThe public URL of this API (for webhooks).https://api.plan-ai.com
APP_URLThe main URL of the app (used in emails).https://plan-ai.blueberrybytes.com
API_ADMIN_KEYSecret key for cron jobs or admin overrides.test123
LOG_LEVELLogging verbosity (info, debug, error).info
Databases
DATABASE_URLPostgreSQL connection string.postgresql://planai:planai123@localhost/planai_db
REDIS_URLRedis connection for BullMQ jobs.redis://localhost:6379
QDRANT_URLVector Database connection.http://127.0.0.1:6333
QDRANT_CONTEXT_COLLECTIONThe name of the collection for contexts.context_files
BullMQ Dashboard
BULL_BOARD_USERBasic auth username for the queue dashboard.admin
BULL_BOARD_PASSWORDBasic auth password for the queue dashboard.admin
AI Providers
OPENROUTER_API_KEYSystem-level OpenRouter fallback key.sk-or-v1-xxxx
DEEPGRAM_API_KEYSystem-level Deepgram fallback key.xxxx
OPENAI_API_KEYOptional OpenAI key.sk-proj-xxxx
GROQ_API_KEYOptional Groq key.gsk_xxxx
VOICE_AI_URLInternal URL for the Python Voice API.http://localhost:8001
Integrations
JIRA_CLIENT_IDOAuth Client ID for Jira integration.xxxx
JIRA_CLIENT_SECRETOAuth Client Secret for Jira integration.xxxx
GITHUB_APP_IDGitHub App ID for codebase connection.xxxx
GITHUB_WEBHOOK_SECRETSecret for GitHub webhooks.xxxx
GITHUB_PRIVATE_KEYThe private key for the GitHub App.-----BEGIN RSA PRIVATE KEY-----...
USE_GITNEXUSEnable local GitNexus MCP indexing.false
GITNEXUS_MCP_URLURL for the GitNexus MCP Server.http://localhost:4747/api/mcp
GOOGLE_CLIENT_IDGoogle OAuth ID (Drive integration).xxxx
GOOGLE_CLIENT_SECRETGoogle OAuth Secret.xxxx
GOOGLE_REDIRECT_URIGoogle OAuth callback URL.http://localhost:8080/api/integrations/google/callback
MICROSOFT_CLIENT_IDMS Teams / Office365 Client ID.xxxx
MICROSOFT_CLIENT_SECRETMS Teams / Office365 Client Secret.xxxx
MICROSOFT_TENANT_IDMS Teams Tenant ID.xxxx
Auth & Email
FIREBASE_SERVICE_KEYBase64 encoded Firebase Service Account JSON.=
FIREBASE_STORAGE_BUCKETFirebase Storage bucket name.plan-ai.appspot.com
RESEND_API_KEYResend API key for transactional emails.re_xxxx
FROM_EMAILSender address for system emails.noreply@plan-ai.blueberrybytes.com

Frontend Variables (plan-ai/frontend/.env)

These variables are exposed to the React frontend application using Create React App (REACT_APP_ prefix).

VariableDescriptionExample
PORTLocal dev port for React.3000
REACT_APP_API_BACKEND_URLThe URL of your Node Backend API.http://localhost:8080
REACT_APP_ENVEnvironment context for the UI.local
REACT_APP_ENABLE_REMOTE_LOGSEnable/disable sending logs remotely.false
Firebase Auth
REACT_APP_FIREBASE_API_KEYPublic Firebase API Key.AIzaSy...
REACT_APP_FIREBASE_APP_IDPublic Firebase App ID.1:1234:web:abcd
REACT_APP_FIREBASE_AUTH_DOMAINFirebase Auth Domain.plan-ai-1234.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_IDFirebase Project ID.plan-ai-1234
REACT_APP_FIREBASE_STORAGE_BUCKETFirebase Storage bucket.plan-ai-1234.appspot.com
REACT_APP_FIREBASE_MEASUREMENT_IDFirebase Analytics ID.G-1234
REACT_APP_FIREBASE_MESSAGING_SENDER_IDFirebase Messaging ID.12345
Google Integrations
REACT_APP_GOOGLE_CLIENT_IDFor Google Drive / Docs picker.xxxx.apps.googleusercontent.com
REACT_APP_GOOGLE_API_KEYFor Google Drive API access.AIzaSy...
REACT_APP_GOOGLE_APP_IDGoogle App ID.1234567890

Voice Service Variables (plan-ai/voice-ai/.env)

This powers the deep-learning speaker identification system.

VariableDescriptionExample
PORTThe port the FastAPI service runs on.8001
HOSTThe binding host.0.0.0.0
HF_HOMEDirectory for caching HuggingFace models../.cache/huggingface

Desktop Recorder Variables (plan-ai-recorder/.env)

The Electron desktop application uses Vite, so all public variables are prefixed with VITE_.

VariableDescriptionExample
VITE_PLAN_AI_API_URLThe URL of the Node Backend API.http://localhost:8080
VITE_PLAN_AI_WEB_URLThe URL of the Web Dashboard.http://localhost:3000
VITE_APP_PROTOCOLThe deep-linking protocol scheme.blueberrybytes-recorder
VITE_LOGIN_BUGDev flag for debugging the auth flow.false
Firebase Auth
VITE_FIREBASE_API_KEYPublic Firebase API Key.AIzaSy...
VITE_FIREBASE_AUTH_DOMAINFirebase Auth Domain.plan-ai-1234.firebaseapp.com
VITE_FIREBASE_PROJECT_IDFirebase Project ID.plan-ai-1234
VITE_FIREBASE_STORAGE_BUCKETFirebase Storage bucket.plan-ai-1234.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_IDFirebase Messaging ID.12345
VITE_FIREBASE_APP_IDPublic Firebase App ID.1:1234:web:abcd
VITE_FIREBASE_MEASUREMENT_IDFirebase Analytics ID.G-1234
VITE_SENTRY_DSNSentry DSN for error tracking.https://xxxx@sentry.io/xxx

Mobile App Variables (plan-ai-mobile/.env.local)

The React Native (Expo) app uses EXPO_PUBLIC_ prefixes so variables are securely bundled into the native IPA/APK.

VariableDescriptionExample
APP_ENVModifies app.config.ts bundle identities.development
EXPO_PUBLIC_PLAN_AI_API_URLThe URL of the Node Backend API.http://localhost:8080 or http://192.168.1.44:8080
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_IDGoogle Client ID for mobile auth.xxxx.apps.googleusercontent.com
SENTRY_AUTH_TOKENSecret token for uploading source maps to Sentry.sntrys_xxxx