Skip to main content

Environment Variables

All configuration is provided to OpenCLM via environment variables. Copy .env.example to .env and fill in your values before starting the stack.

API Server Variables

VariableRequiredDefaultDescription
DATABASE_URLPostgreSQL connection string: postgresql://user:pass@host:5432/dbname
JWT_SECRETAt least 32 random characters. Used to sign access tokens
APP_URLThe public URL of your OpenCLM instance (e.g. https://openclm.yourcompany.com)
PORT4000API server listen port
NODE_ENVproductionSet to development to enable verbose logging
LOG_LEVELinfoLog verbosity: error, warn, info, debug
CORS_ORIGINSAPP_URLComma-separated list of allowed CORS origins
MAX_FILE_SIZE_MB25Maximum file upload size in megabytes
SESSION_TIMEOUT_MINUTES60Minutes of inactivity before session expires

Database Variables

VariableRequiredDefaultDescription
POSTGRES_USERPostgreSQL username
POSTGRES_PASSWORDPostgreSQL password
POSTGRES_DBPostgreSQL database name
POSTGRES_HOSTdbPostgreSQL host (Docker service name or IP)
POSTGRES_PORT5432PostgreSQL port

Keycloak / Auth Variables

VariableRequiredDefaultDescription
KEYCLOAK_URLKeycloak server URL (e.g. https://openclm.yourcompany.com/auth)
KEYCLOAK_REALMopenclmKeycloak realm name
KEYCLOAK_CLIENT_IDopenclm-appKeycloak OIDC client ID
KEYCLOAK_CLIENT_SECRETKeycloak OIDC client secret
KC_ADMIN_USERKeycloak admin console username
KC_ADMIN_PASSWORDKeycloak admin console password

SMTP / Email Variables

VariableRequiredDefaultDescription
SMTP_HOSTSMTP server hostname
SMTP_PORT587SMTP port
SMTP_USERSMTP username
SMTP_PASSSMTP password
SMTP_FROM_NAMEOpenCLMFrom display name in emails
SMTP_FROM_EMAILFrom email address
SMTP_SECUREtrueUse TLS/STARTTLS

If SMTP is not configured, email notifications are disabled and only in-app notifications are sent.

OpenSign Variables

VariableRequiredDefaultDescription
OPENSIGN_API_URLOpenSign API base URL
OPENSIGN_API_KEYOpenSign API key

OpenSign can also be configured via the UI at Settings → Integrations.

Frontend Variables (set at build time)

VariableRequiredDefaultDescription
VITE_API_URLThe public URL of the API (e.g. https://openclm.yourcompany.com/api)
VITE_KEYCLOAK_URLThe public URL of Keycloak auth endpoint
VITE_KEYCLOAK_REALMopenclmKeycloak realm name
VITE_KEYCLOAK_CLIENT_IDopenclm-appKeycloak client ID

Security Recommendations

  • Store secrets in a secrets manager (HashiCorp Vault, AWS Secrets Manager, Docker Secrets) rather than plain text .env files.
  • Never commit .env to version control — it is already in .gitignore.
  • Rotate JWT_SECRET and API keys periodically.
  • Use strong, randomly generated passwords for POSTGRES_PASSWORD and KC_ADMIN_PASSWORD.