Skip to main content

USP Client Environment Variables

USP Client 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 Client 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-client.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-client\Environment

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

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

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

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

Environment Variables Mapping

The following table lists the environment variables supported by USP Client 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
nameUSP_CLIENT_NAME
keyUSP_CLIENT_KEY
tunnel.hostUSP_CLIENT_TUNNEL_HOST
tunnel.portUSP_CLIENT_TUNNEL_PORT
tunnel.host_keyUSP_CLIENT_TUNNEL_HOST_KEY
log.levelUSP_CLIENT_LOG_LEVEL
log.pathUSP_CLIENT_LOG_PATH
log.max_sizeUSP_CLIENT_LOG_MAX_SIZE
log.max_backupsUSP_CLIENT_LOG_MAX_BACKUPS
log.max_ageUSP_CLIENT_LOG_MAX_AGE