Skip to main content

USP Manager Environment Variables

USP Manager supports configuring its runtime settings through environment variables.

This page explains how to define those variables on Linux and Windows, and provides a reference table that maps each USP Manager HCL argument to its corresponding environment variable name.

Setting Environment Variables

When running on a Linux host with the package-provided service configuration, the environment variables can be defined and are loaded from /opt/udmg/etc/usp-manager.env via the systemd unit.

When running on a Windows host with the recommended service configuration, the environment variables can be defined either globally in the System Properties or only for the service with the Registry Multi-String value:

HKLM:\SYSTEM\CurrentControlSet\Services\usp-manager\Environment

Here is an example on how to set two environment variables VAR1 and VAR2 for the usp-manager service with PowerShell commands:

PS> Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\usp-manager" -Name 'Environment' -Type MultiString -Value ('VAR1=value1', 'VAR2=value2') 

PS> Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\usp-manager" -Name 'Environment'

Environment : {VAR1=value1, VAR2=value2}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usp-manager
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
PSChildName : usp-manager
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

Environment Variables Mapping

The following table lists the environment variables supported by USP Manager and the HCL arguments they map to. Use these variables to override the corresponding HCL values at runtime.

tip

While environment variables take precedence over HCL arguments when both are provided, it is generally recommended to configure settings using HCL files to maintain clarity, consistency, and ease of management. Overriding with environment variables should be used sparingly, typically for temporary adjustments or in containerized deployment scenarios.

HCL Argument NameEnvironment Variable Name
encryption.kek_sourceUSP_MANAGER_ENCRYPTION_KEK_SOURCE
encryption.kekUSP_MANAGER_ENCRYPTION_KEK
encryption.rotation.kek_sourceUSP_MANAGER_ENCRYPTION_ROTATION_KEK_SOURCE
encryption.rotation.kekUSP_MANAGER_ENCRYPTION_ROTATION_KEK
database.dsnUSP_MANAGER_DATABASE_DSN
database.engineUSP_MANAGER_DATABASE_ENGINE
database.hostnameUSP_MANAGER_DATABASE_HOSTNAME
database.portUSP_MANAGER_DATABASE_PORT
database.usernameUSP_MANAGER_DATABASE_USERNAME
database.passwordUSP_MANAGER_DATABASE_PASSWORD
database.nameUSP_MANAGER_DATABASE_NAME
database.schemaUSP_MANAGER_DATABASE_SCHEMA
database.options.max_connectionsUSP_MANAGER_DATABASE_OPTIONS_MAX_CONNECTIONS
database.options.idle_connectionsUSP_MANAGER_DATABASE_OPTIONS_IDLE_CONNECTIONS
database.options.connection_lifetimeUSP_MANAGER_DATABASE_OPTIONS_CONNECTION_LIFETIME
database.options.connection_idle_timeUSP_MANAGER_DATABASE_OPTIONS_CONNECTION_IDLE_TIME
database.paramsUSP_MANAGER_DATABASE_PARAMS
web.read_timeoutUSP_MANAGER_WEB_READ_TIMEOUT
web.write_timeoutUSP_MANAGER_WEB_WRITE_TIMEOUT
web.idle_timeoutUSP_MANAGER_WEB_IDLE_TIMEOUT
web.shutdown_timeoutUSP_MANAGER_WEB_SHUTDOWN_TIMEOUT
web.cors_allowed_originsUSP_MANAGER_WEB_CORS_ALLOWED_ORIGINS
web.hostUSP_MANAGER_WEB_HOST
web.tls.enableUSP_MANAGER_WEB_TLS_ENABLE
web.tls.certUSP_MANAGER_WEB_TLS_CERT
web.tls.keyUSP_MANAGER_WEB_TLS_KEY
auth.keyUSP_MANAGER_AUTH_KEY
auth.access_token.durationUSP_MANAGER_AUTH_ACCESS_TOKEN_DURATION
auth.refresh_token.durationUSP_MANAGER_AUTH_REFRESH_TOKEN_DURATION
web.ui.system_identifierUSP_MANAGER_WEB_UI_SYSTEM_IDENTIFIER
web.ui.banner_logoUSP_MANAGER_WEB_UI_BANNER_LOGO
server_monitoring_job.intervalUSP_MANAGER_SERVER_MONITORING_JOB_INTERVAL
server_monitoring_job.workersUSP_MANAGER_SERVER_MONITORING_JOB_WORKERS
server_monitoring_job.worker_timeoutUSP_MANAGER_SERVER_MONITORING_JOB_WORKER_TIMEOUT
log.levelUSP_MANAGER_LOG_LEVEL
log.pathUSP_MANAGER_LOG_PATH
log.max_sizeUSP_MANAGER_LOG_MAX_SIZE
log.max_backupsUSP_MANAGER_LOG_MAX_BACKUPS
log.max_ageUSP_MANAGER_LOG_MAX_AGE