Skip to main content

Environment Variables (.env)

The agent reads its install-time configuration from a .env file next to the binary (or from real process environment variables, which take priority). These are set once at install — via the MSI/RPM installer GUI/arguments, or by editing the file directly — and require an agent restart to take effect.

For settings you can change at runtime without restarting, see Runtime Settings (config.yaml).

Source of truth

This reflects agent/.env.dev, the canonical commented reference shipped in the agent repository. If the two ever disagree, .env.dev wins.

Agent service​

VariableDefaultDescription
AGENT_IP0.0.0.0The IP that the GetApp service listens on
AGENT_PORT2221The internal port the GetApp service runs on
GATEWAY_PORT2220The external gateway port the service is accessible from
PROXYfalseEnable proxy mode
AGENT_URL—URL of the getapp service for the GetApp CLI; if set, overrides hostname:port

DDS configuration​

VariableDefaultDescription
DDS_MACHINE_TYPEAgentMachine type: Agent | IM | Disabled

GetApp server​

VariableDefaultDescription
BASE_URL—URL of the GetApp server, e.g. https://api-getapp-dev.apps.getapp.sh

Agent identity​

VariableDefaultDescription
DEVICE_IDautoUnique device ID for agent authentication. If unset, derived from system info or generated randomly
DEVICE_TYPE_TOKENagentDevice type token used for agent authentication
PLATFORM_TYPE_TOKEN—Platform name of the agent (optional)
PLATFORM_TYPE_ID—The platform's unique ID

Network​

VariableDefaultDescription
NETWORK_AVAILABILITY_URL—URL used to check network availability (connected state); point it at a "disconnected" mock to simulate offline testing
TCP_STREAM_TIMEOUT5Timeout for the TCP stream, in seconds

API documentation​

VariableDefaultDescription
SWAGGER_ACTIVEtrueIf false, disables the Swagger UI — reduces memory usage

Matomo analytics​

VariableDefaultDescription
MATOMO_URL—URL to send Matomo events to (optional)
MATOMO_SITE_ID3The site ID in Matomo
MATOMO_DIMENSION_IDmap_name=1;role=2Matomo dimension IDs, key=value;key=value
MATOMO_MAX_RETENTION_HOURS24Max retention of buffered Matomo events, in hours
MATOMO_MAX_BUFFER_SIZE_MB20Max buffer size, in MB

Storage and asset paths​

VariableDefaultDescription
DATA_PATHplatform defaultAbsolute path to the data directory (use / or \\ as separator)
MAP_ASSETS_DIR_PATH—Path where map assets (GPKG files, data JSON) are located
COMP_ASSETS_DIR_PATH<data_dir>/downloadsFolder to store downloaded components

Query and status​

VariableDefaultDescription
QUERY_STATUS_INTERVAL2Seconds to wait when polling import/prepared status

Security and authentication​

VariableDefaultDescription
SECURE_TLStrueEnable TLS security
AUTH_TYPEsecretAuthentication type: password | CC (client certificates) | secret | token
DEVICE_SECRET—Encrypted key agreed upon by client and server (for AUTH_TYPE=secret)
TOKEN—Constant refresh token to request a new access token (for AUTH_TYPE=token)
AGENT_PASSWORD—Password for the GetApp server (for AUTH_TYPE=password)
AGENT_USERNAME—Username for the GetApp server (for AUTH_TYPE=password)
AGENT_KEY_PATH—Client key path (for AUTH_TYPE=CC)
AGENT_CERT_PATH—Client certificate path (for AUTH_TYPE=CC)
AGENT_CERT_KEY_PATH—Client certificate key path (for AUTH_TYPE=CC)
CA_CERT_PATH—CA certificate path (for AUTH_TYPE=CC)

Background jobs and automation​

VariableDefaultDescription
RUN_LOG_DISPATCH_JOBtrueEnable the log dispatch job
AUTO_DEPLOY_ON_PULLtrueAutomatically trigger deployment after a successful pull/download
HEALTH_CHECK_TIMEOUT_SECS5Timeout for each individual health check probe
HEALTH_CHECK_INTERVAL_MINS1Interval between health check scheduling runs
LOCAL_CONFIG_PRIORITYfalseWhen true, existing local config.yaml values take priority over server-pushed values on conflict. Server values still fill in keys with no local value

Policy enforcement​

VariableDefaultDescription
ALLOW_NO_POLICIEStrueWhen true, components with no policies are offered
ENFORCE_POLICIEStrueGlobally enable/disable policy enforcement. When false, all policy checks are skipped regardless of POLICY_ENFORCEMENT_MODE
POLICY_ENFORCEMENT_MODEofferingWhere in the lifecycle policies are enforced: offering (hide non-compliant releases from the store), delivery (allow browsing, block download), or deploy (allow download, block install — for transfer-mode agents). Restrictions and device-type offering gating are always enforced regardless of this setting

Storage limits​

VariableDefaultDescription
STORAGE_DELIVERY_BUFFER_BYTES0 (disabled)Extra storage buffer, in bytes, reserved beyond the component's required size before a delivery is allowed to start
USE_ONLY_ARTIFACTS_SIZE_FOR_STORAGE_CALCfalseWhen true, ignores component metadata's totalSize and calculates storage requirements only from raw artifact size fields — useful for CDN scenarios where the agent doesn't install components, only downloads them

Delivery​

VariableDefaultDescription
DELIVERY_SOURCERemoteDelivery source: Remote | Cache
MAX_PARALLEL_DELIVERIES1Maximum number of parallel deliveries allowed at once
DELIVERY_TIMEOUT_MINS30Timeout, in minutes, before a single delivery is considered failed
DOWNLOAD_RETRY_COUNT2Number of download retry attempts on failure

CDN​

VariableDefaultDescription
CDN_INACTIVE_DEVICE_HOURS24Hours of inactivity after which a device is considered stale
CDN_DEVICE_DELETE_AFTER_DAYS30Days after which a stale row is hard-deleted from the DB
CDN_PLATFORM_MANAGEMENTall platformsComma-separated platform filter list; uncomment to restrict

See also​