Configure download settings for standalone Elastic Agent upgrades

The agent.download section of the elastic-agent.yml config file contains settings for where to download and store artifacts used for Elastic Agent upgrades.

Setting Description

sources
(list) Ordered list of locations of artifacts used during Elastic Agent upgrade. If the download from one location fails, Elastic Agent tries the next one. If you set both sources and sourceURI, only sources is used. The auth, TLS, and proxy settings of the agent.download section apply to all locations. Default: https://artifacts.elastic.co/downloads/.

sourceURI
(string) Path to the location of artifacts used during Elastic Agent upgrade. Starting with version 9.6, use sources instead.

target_directory
(string) Path to the directory where download artifacts are stored.

timeout
(string) The HTTP request timeout in seconds for the download package attempt.

install_path
(string) The location of installed packages and programs, as well as program specifications.

retry_sleep_init_duration
(string) The duration in seconds to sleep for before the first retry attempt.

reserve_diskspace.enabled
(bool) If true, Elastic Agent reserves disk space for the new agent package before an upgrade, so the upgrade fails early if there isn't enough space. Set to false to turn off the reservation. Default: true.

auth.username
(string) Username for HTTP Basic authentication to the artifact registry. Must be set together with auth.password, and is mutually exclusive with auth.api_key.

auth.password
(string) Password for HTTP Basic authentication to the artifact registry. Must be set together with auth.username, and is mutually exclusive with auth.api_key.

auth.api_key
(string) API key sent in the Authorization: ApiKey <api-key> header. Mutually exclusive with auth.username and auth.password. If both are configured, auth.api_key takes precedence.

auth.headers
(list) Custom HTTP headers sent to the artifact registry on every request. Each entry is an object with key and value fields.