Skip to content

Environment Variables

Complete list of environment variables for USSO.

Required

Variable Description Example
PROJECT_NAME Project identifier usso
MONGO_URI MongoDB connection mongodb://localhost:27017/usso
REDIS_URI Redis connection redis://localhost:6379/0
SYSTEM_PASSWORD Admin password Generate with openssl rand -base64 32

Optional

Server

Variable Default Description
DOMAIN localhost Primary domain
DEBUG 0 Enable debug mode
LOG_LEVEL INFO Logging level

Security

Variable Default Description
JWT_CONFIG EdDSA JWT configuration
CAPTCHA_KEY Random Captcha secret

Email

Variable Description
SMTP_HOST SMTP server
SMTP_PORT SMTP port (usually 587)
SMTP_USERNAME SMTP username
SMTP_PASSWORD SMTP password
SMTP_SENDER From address
SMTP_USE_TLS Use TLS (true/false)

SMS

Variable Description
KAVENEGAR_API_KEY Kavenegar API key
TWILIO_ACCOUNT_SID Twilio account SID
TWILIO_AUTH_TOKEN Twilio auth token

OAuth

Variable Description
USSO_GOOGLE_CLIENT_ID Google OAuth client ID
USSO_GOOGLE_CLIENT_SECRET Google OAuth secret

Example .env

PROJECT_NAME=usso
DOMAIN=app.mycompany.com

MONGO_URI=mongodb://mongo:27017/usso
REDIS_URI=redis://redis:6379/0

SYSTEM_PASSWORD=super-secret-password

# Email
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=[email protected]
SMTP_PASSWORD=app-specific-password
SMTP_SENDER=MyApp <[email protected]>
SMTP_USE_TLS=true

# OAuth
USSO_GOOGLE_CLIENT_ID=your-client-id
USSO_GOOGLE_CLIENT_SECRET=your-client-secret