﻿---
title: Configure download settings for standalone Elastic Agent upgrades
description: Reference for the agent.download settings in elastic-agent.yml that control where standalone Elastic Agent downloads and stores upgrade artifacts, including sources and authentication.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9283/reference/fleet/elastic-agent-standalone-download
products:
  - Elastic Agent
  - Elastic Documentation
  - Fleet
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# 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` <applies-to>Elastic Cloud Serverless: Generally available</applies-to> <applies-to>Elastic Stack: Planned</applies-to>                                                              | (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` <applies-to>Elastic Cloud Serverless: Deprecated</applies-to> <applies-to>Elastic Stack: Planned for deprecation, Elastic Stack: Generally available from 9.0 to 9.5</applies-to> | (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` <applies-to>Elastic Cloud Serverless: Generally available</applies-to> <applies-to>Elastic Stack: Planned</applies-to>                                            | (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` <applies-to>Elastic Stack: Generally available since 9.4</applies-to>                                                                                                         | (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` <applies-to>Elastic Stack: Generally available since 9.4</applies-to>                                                                                                         | (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` <applies-to>Elastic Stack: Generally available since 9.4</applies-to>                                                                                                          | (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` <applies-to>Elastic Stack: Generally available since 9.4</applies-to>                                                                                                          | (list) Custom HTTP headers sent to the artifact registry on every request. Each entry is an object with `key` and `value` fields.                                                                                                                                                                                                                                              |