Skip to main content

USP Server Environment Variables

USP Server 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 Server 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-server.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-server\Environment

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

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

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

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

Environment Variables Mapping

The following table lists the environment variables supported by USP Server 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
passphraseUSP_SERVER_PASSPHRASE
nameUSP_SERVER_NAME
database.pathUSP_SERVER_DATABASE_PATH
web.read_timeoutUSP_SERVER_WEB_READ_TIMEOUT
web.write_timeoutUSP_SERVER_WEB_WRITE_TIMEOUT
web.idle_timeoutUSP_SERVER_WEB_IDLE_TIMEOUT
web.shutdown_timeoutUSP_SERVER_WEB_SHUTDOWN_TIMEOUT
web.cors_allowed_originsUSP_SERVER_WEB_CORS_ALLOWED_ORIGINS
web.config_hostUSP_SERVER_WEB_CONFIG_HOST
web.api_hostUSP_SERVER_WEB_API_HOST
web.tls.certUSP_SERVER_WEB_TLS_CERT
web.tls.keyUSP_SERVER_WEB_TLS_KEY
web.tls.caUSP_SERVER_WEB_TLS_CA
icap.timeoutUSP_SERVER_ICAP_TIMEOUT
log.levelUSP_SERVER_LOG_LEVEL
log.pathUSP_SERVER_LOG_PATH
log.max_sizeUSP_SERVER_LOG_MAX_SIZE
log.max_backupsUSP_SERVER_LOG_MAX_BACKUPS
log.max_ageUSP_SERVER_LOG_MAX_AGE