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.
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 Name | Environment Variable Name |
|---|---|
name | USP_CLIENT_NAME |
key | USP_CLIENT_KEY |
tunnel.host | USP_CLIENT_TUNNEL_HOST |
tunnel.port | USP_CLIENT_TUNNEL_PORT |
tunnel.host_key | USP_CLIENT_TUNNEL_HOST_KEY |
log.level | USP_CLIENT_LOG_LEVEL |
log.path | USP_CLIENT_LOG_PATH |
log.max_size | USP_CLIENT_LOG_MAX_SIZE |
log.max_backups | USP_CLIENT_LOG_MAX_BACKUPS |
log.max_age | USP_CLIENT_LOG_MAX_AGE |