Overview
DecipherIt uses environment variables to configure both the frontend and backend. This page provides a complete reference for all available variables.Variables marked with ⚠️ are required. Variables marked with ℹ️ are optional.
Frontend Environment Variables
These variables are configured inclient/.env.local.
Database
⚠️ PostgreSQL connection string for Prisma ORMFormat: Docker:
postgresql://[user]:[password]@[host]:[port]/[database]Example:Authentication
⚠️ Secret key for signing authentication tokensRequirements:Example:
- Minimum 32 characters
- Cryptographically secure random string
- Must be kept secret
⚠️ Base URL where your application is hostedDevelopment:Production:
Application URLs
⚠️ Public base URL (accessible from client-side code)Development:Production:
⚠️ URL of the backend API serverDevelopment:Production:Docker:
Cloud Storage (Cloudflare R2)
⚠️ Cloudflare R2 endpoint URLFormat: Find your account ID in the Cloudflare dashboard under R2.
https://[account-id].r2.cloudflarestorage.comExample:⚠️ R2 access key ID for authenticationExample:Create R2 API tokens in the Cloudflare dashboard.
⚠️ R2 secret access key for authenticationExample:
⚠️ Name of your R2 bucket for file storageExample:Create the bucket in the Cloudflare R2 dashboard before deploying.
⚠️ Public CDN URL for accessing stored filesExample:Configure a custom domain in the Cloudflare R2 dashboard.
Backend Environment Variables
These variables are configured inbackend/.env.
Database
⚠️ PostgreSQL connection string (same as frontend)Example:
AI Services
Bright Data
⚠️ Bright Data API token for web scrapingExample:How to get:
- Sign up at brightdata.com
- Navigate to user settings
- Copy your API token
⚠️ Browser authentication credentials for Bright DataFormat: Find this in your Bright Data Web Unlocker zone settings.
username:passwordExample:OpenRouter
⚠️ OpenRouter API key for Google Gemini modelsExample:How to get:
- Sign up at openrouter.ai
- Navigate to API Keys
- Create a new API key
OpenAI
⚠️ OpenAI API key for embeddingsExample:How to get:
- Sign up at platform.openai.com
- Navigate to API Keys
- Create a new API key
LemonFox AI
⚠️ LemonFox API key for text-to-speechExample:How to get:
- Sign up at lemonfox.ai
- Navigate to API settings
- Generate an API key
Vector Database
⚠️ Qdrant API endpoint URLLocal Installation:Docker:Qdrant Cloud:
ℹ️ API key for Qdrant Cloud authenticationExample:Not required for local Qdrant installations. Only needed for Qdrant Cloud.
Cloud Storage
⚠️ Cloudflare account IDExample:Find in the Cloudflare dashboard URL or account settings.
⚠️ R2 access key ID (same as frontend
R2_ACCESS_KEY_ID)Example:⚠️ R2 secret access key (same as frontend
R2_SECRET_ACCESS_KEY)Example:Optional Services
ℹ️ LangTrace API key for observability and tracingExample:How to get:
- Sign up at langtrace.ai
- Create a new project
- Copy the API key
Complete Configuration Examples
Frontend (.env.local)
Backend (.env)
Docker (.env)
Security Best Practices
Secret Management
-
Generate Strong Secrets:
-
Use Environment-Specific Values:
- Development:
http://localhost - Production:
https://yourdomain.com
- Development:
-
Rotate Credentials Regularly:
- Change API keys every 90 days
- Rotate auth secrets on security incidents
-
Use Secret Managers in Production:
- AWS Secrets Manager
- HashiCorp Vault
- Google Secret Manager
- Azure Key Vault
Validation
Validate your environment configuration before deployment:Troubleshooting
Missing Variables
If you see errors about missing environment variables:- Check the variable name matches exactly (case-sensitive)
- Ensure the
.envor.env.localfile is in the correct directory - Restart the development server after changing variables
Database Connection Fails
Check yourDATABASE_URL format:
API Key Errors
If API calls fail:- Verify the API key is valid and active
- Check for extra spaces or newlines in the
.envfile - Ensure you have sufficient credits/quota
- Check the service status page
Next Steps
Installation
Complete installation guide
Configuration
Detailed configuration guide
Docker Deployment
Deploy using Docker
Integrations
Set up Bright Data and AI models