Skip to main content

Environment Variables

Configuration Methods

For Docker and Docker Compose setup instructions, see the Docker Compose Guide.

Environment variables can be configured using:

  • Docker Compose: environment section in docker-compose.yml
  • Docker: -e flags or --env-file parameter
  • .env file: For Node.js setups with pm2, nodemon, or direct execution
warning

For environment variable changes to take effect, your FDM Monster server must be restarted.

Environment Variables Reference

Main Variables

Commonly used configuration options for typical deployments.

VariableDefaultDescription
SERVER_PORT4000The port the server listens on
NODE_ENVproductionEnvironment mode: development or production
OVERRIDE_LOGIN_REQUIREDtrueRequire login to access the application
OVERRIDE_REGISTRATION_ENABLEDfalseAllow new user registration
OVERRIDE_IS_DEMO_MODEfalseEnable demo mode (completes wizard automatically)
OVERRIDE_DEMO_USERNAMEdemoDemo mode username
OVERRIDE_DEMO_PASSWORDdemo2023Demo mode password
DATABASE_PATH./databasePath to SQLite database directory
DATABASE_FILEfdm-monster.sqliteSQLite database filename
MEDIA_PATH./mediaPath to media storage (logs, files, uploads)

Advanced Variables

Technical configuration options for advanced use cases, debugging, and integrations.

VariableDefaultDescription
ENABLE_COLORED_LOGSfalseEnable colored console logs
OVERRIDE_JWT_SECRETfdm-monster-jwt-secret-2023JWT secret key (changing invalidates logins)
OVERRIDE_JWT_EXPIRES_IN3600JWT expiration in seconds (minimum: 120)
OVERRIDE_JWT_ISSUERfdm-monster-server-2023JWT issuer (changing invalidates logins)
OVERRIDE_JWT_AUDIENCEfdm-monster-client-next-2026JWT audience (changing invalidates logins)
OVERRIDE_DEMO_ROLEADMINDemo user role: ADMIN or OPERATOR
GITHUB_PAT-GitHub Personal Access Token for client bundle downloads
DEBUG_SOCKET_STATESfalseEnable socket state debugging
ENABLE_PROMETHEUS_METRICSfalseEnable Prometheus metrics endpoint
ENABLE_LOKIfalseEnable Loki logging
LOKI_ADDRESS-Loki server address
SENTRY_CUSTOM_DSNFDM Monster defaultCustom Sentry DSN for bug tracking
DISABLE_SWAGGER_OPENAPIfalseDisable Swagger UI and OpenAPI endpoints
GENERATE_SWAGGER_JSONfalseGenerate swagger.json file in media folder

Common Configuration Examples

Production Setup

SERVER_PORT=4000
NODE_ENV=production
OVERRIDE_LOGIN_REQUIRED=true
OVERRIDE_REGISTRATION_ENABLED=false
ENABLE_COLORED_LOGS=false

Development Setup

SERVER_PORT=4000
NODE_ENV=development
ENABLE_COLORED_LOGS=true
DEBUG_SOCKET_STATES=true
OVERRIDE_LOGIN_REQUIRED=false
OVERRIDE_JWT_SECRET=your-secure-secret-here
OVERRIDE_JWT_EXPIRES_IN=7200