Echo Environment Variables Template
Copy this file to .env.local and fill in your actual values
=============================================================================
=============================================================================
MONGODB_URI=mongodb://localhost:27017/echo
=============================================================================
AUTHENTICATION & SECURITY
=============================================================================
Signs session cookies. NEXTAUTH_SECRET is still read as a legacy fallback.
JWT_SECRET=at-least-32-random-bytes
Encrypts journal content at rest. BACK THIS UP β losing it loses the entries.
ENCRYPTION_SECRET_KEY=at-least-32-random-bytes
Authorizes the internal /api/cron/* scheduler endpoints.
CRON_SECRET=at-least-32-random-bytes
=============================================================================
=============================================================================
Hosted default: OpenRouter.
OPENROUTER_API_KEY=sk-or-your-openrouter-api-key
Or any other OpenAI-compatible endpoint, including local inference.
Per-user daily cap on AI endpoints; 0 disables it (typical for local inference).
=============================================================================
=============================================================================
RESEND_API_KEY=re_your-resend-api-key
=============================================================================
=============================================================================
GOOGLE_CLIENT_ID=your-google-oauth-client-id
GOOGLE_CLIENT_SECRET=your-google-oauth-client-secret
=============================================================================
=============================================================================
NEXT_PUBLIC_BASEURL=http://localhost:3000
BASEURL=http://localhost:3000
=============================================================================
PUSH NOTIFICATIONS (Optional)
=============================================================================
NEXT_PUBLIC_VAPID_PUBLIC_KEY=your-vapid-public-key
VAPID_PRIVATE_KEY=your-vapid-private-key
NEXT_PUBLIC_MAILADDRESS=your-email@example.com
=============================================================================
=============================================================================
NODE_ENV=development
Encryption key (generated automatically if not provided)
ENCRYPTION_KEY=your-32-character-encryption-key
=============================================================================
=============================================================================
3. Get connection string from "Connect" button
2. Go to API Keys section
GOOGLE_CLIENT_ID & GOOGLE_CLIENT_SECRET:
2. Create new project or select existing
4. Create OAuth 2.0 credentials
5. Add authorized redirect URIs:
=============================================================================
=============================================================================
π IMPORTANT SECURITY REMINDERS:
- Never commit .env.local to version control
- Use strong, unique secrets for production
- Rotate API keys regularly
- Use environment-specific configurations
- Keep production secrets secure and backed up
π PRODUCTION CHECKLIST:
- Set NODE_ENV=production
- Use production database URL
- Update NEXT_PUBLIC_BASEURL and BASEURL to the production domain
- Configure secure CORS settings
- Set up monitoring and logging