Environment Variables
Complete reference for all environment variables.
Required Variables
Frontend (Vite)
Backend (Convex)
Optional Variables
OpenAI (for semantic search)
Variable Reference
Setting Variables
Convex
Netlify
- Go to Site settings > Environment variables
- Click Add a variable
- Enter key and value
Vercel
- Go to Settings > Environment Variables
- Add variables for Production/Preview/Development
Local Development
Create a .env.local file in the project root:
Add .env.local to .gitignore to prevent committing secrets.
Generating Secrets
For WORKOS_COOKIE_PASSWORD:
Troubleshooting
”VITE_CONVEX_URL is undefined”
- Ensure the variable starts with
VITE_ for Vite to expose it
- Restart the dev server after adding variables
”WorkOS authentication failed”
- Verify
WORKOS_API_KEY and WORKOS_CLIENT_ID match your WorkOS dashboard
- Check that redirect URIs are configured
”Cookie not set”
WORKOS_COOKIE_PASSWORD must be at least 32 characters