Skip to main content

Overview

Vaani uses environment variables for all configuration. Variables are loaded via pydantic-settings with optional .env file support. .env file loading: Automatic in local, dev, and development environments. Disabled in production (use Docker env_file or system env vars).

Backend Variables

VariableRequiredExampleDescription
ENVlocalEnvironment: local, dev, stage, prod
LOAD_DOTENV1Enable .env file loading
FRONTEND_URLhttp://localhost:3000CORS allowed origin
LOG_DIR/var/log/vaaniLog file directory
LOG_LEVELINFOLogging level
LOG_RETENTION_DAYS30Log file retention
MAX_AGENT_SESSIONS10Max concurrent voice calls
CELERY_TIMEZONEUTCTimezone for Celery Beat

UI Variables

VariableRequiredExampleDescription
NEXT_PUBLIC_ML_BACKEND_URLhttp://localhost:8000Backend API URL
JWT_API_SECRETSame as backendJWT secret (must match)
ALLOWED_BOT_ORIGINShttp://localhost:5173Allowed widget origins

Security Notes

  • All SecretStr fields are masked in logs and debug output
  • Never commit .env files to version control
  • In production, use Docker env_file directive or platform-native secrets management
  • The JWT_API_SECRET must be identical across backend and UI