Self Hosted Docs
Environment variables
This is the full list of environment variables used in the project
Environment Variables Configuration Guide
This document provides a comprehensive guide to all environment variables used across the Intervo application stack.
Overview
The Intervo application uses environment variables across three main packages:
- Backend (
packages/intervo-backend/
) - Node.js API server - Frontend (
packages/intervo-frontend/
) - Next.js web application - Widget (
packages/intervo-widget/
) - Embeddable widget component
Backend Environment Variables
Based on packages/intervo-backend/env.example
, create .env
file:
Core Application Settings
Database
Twilio Communication
AI Services
Speech Services
Cloud Storage
Google Services
Frontend Environment Variables
Create .env.local
in packages/intervo-frontend/
:
Widget Environment Variables
Create .env
in packages/intervo-widget/
:
Quick Development Setup
1. Backend Setup
2. Frontend Setup
3. Widget Setup
Service Integration Guides
Twilio Setup
- Create account at Twilio
- Get Account SID and Auth Token from Console
- Create API Key and Secret
- Purchase phone number
- Create TwiML Application
OpenAI Setup
- Create account at OpenAI
- Generate API key from dashboard
- Set usage limits and billing
Stripe Setup
- Create account at Stripe
- Get publishable and secret keys
- Set up webhook endpoints
- Configure test/production modes
Speech Services
- AssemblyAI: Get API key from AssemblyAI
- Azure Speech: Create Speech service in Azure portal
- ElevenLabs: Get API key from ElevenLabs
Environment-Specific Configuration
Development
- Use test/sandbox API keys
- Local database connection
- HTTP URLs acceptable
Production
- Production API keys only
- Secure database connection
- HTTPS URLs required
- Strong secrets (32+ characters)
Security Best Practices
- Never commit .env files to version control
- Use different API keys per environment
- Rotate secrets regularly
- Use secure secret management in production
Troubleshooting
Common Issues
- Missing environment variables: Check server logs for undefined errors
- Frontend API connection: Verify NEXT_PUBLIC_API_URL_DEVELOPMENT
- Database connection: Check MONGO_URI format and MongoDB status
- Widget not loading: Rebuild after environment changes
Debugging
Complete Variable Reference
Backend Variables (23 total from env.example)
Variable | Required | Purpose |
---|---|---|
TWILIO_ACCOUNT_SID | ✅ | Twilio account identifier |
TWILIO_AUTH_TOKEN | ✅ | Twilio authentication |
TWILIO_API_KEY | ✅ | Twilio API access |
TWILIO_API_SECRET | ✅ | Twilio API security |
TWILIO_APP_SID | ✅ | Twilio application ID |
TWILIO_PHONE_NUMBER | ✅ | Twilio phone number |
OPENAI_API_KEY | ✅ | OpenAI API access |
AWS_ACCESS_KEY_ID | ✅ | AWS access credentials |
AWS_SECRET_ACCESS_KEY | ✅ | AWS secret credentials |
AWS_REGION | ✅ | AWS region setting |
MONGO_URI | ✅ | MongoDB connection |
GOOGLE_CLIENT_ID | ✅ | Google OAuth ID |
GOOGLE_CLIENT_SECRET | ✅ | Google OAuth secret |
SESSION_SECRET | ✅ | Session encryption |
NEXTAUTH_SECRET | ✅ | JWT token secret |
NODE_ENV | ✅ | Environment mode |
ASSEMBLYAI_API_KEY | ✅ | Speech recognition |
AI_FLOW_API_KEY | ❌ | AI workflow service |
GROQ_API_KEY | ✅ | Groq AI service |
ELEVENLABS_API_KEY | ✅ | Text-to-speech |
ELEVENLABS_VOICE_ID | ❌ | Default voice |
AZURE_SPEECH_KEY | ✅ | Azure speech service |
AZURE_SPEECH_REGION | ✅ | Azure region |
Additional Backend Variables (Found in codebase)
STRIPE_SECRET_KEY
- Stripe payment processingSTRIPE_WEBHOOK_SECRET
- Stripe webhook validationBASE_URL
- Application base domainENCRYPTION_KEY
- Data encryption keyHETZNER_STORAGE_*
- Hetzner cloud storageDEEPGRAM_API_KEY
- Deepgram speech serviceVOYAGE_API_KEY
- Voyage embeddingsMAILCOACH_TOKEN
- Email marketing
Frontend Variables
NEXT_PUBLIC_API_URL_DEVELOPMENT
- Dev API endpointNEXT_PUBLIC_API_URL_PRODUCTION
- Prod API endpointNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
- Stripe public key
Widget Variables
VITE_API_URL_DEVELOPMENT
- Dev API endpointVITE_API_URL_PRODUCTION
- Prod API endpoint
This configuration enables the complete Intervo application stack with all integrations. Adjust API keys and endpoints based on your specific deployment requirements.