> For the complete documentation index, see [llms.txt](https://documentation.2pintsoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.2pintsoftware.com/deployr/reference/task-sequence-variables/download-and-peering-variables.md).

# Download and peering variables

Task sequence variables that control how the DeployR client downloads content, including proxy, timeout, retry, and BranchCache peering settings.

{% hint style="info" %}
Applies to: DeployR 1.4 and later.
{% endhint %}

Starting with DeployR 1.4, content is downloaded by the 2Pint download engine (BCMon), which handles both HTTP downloads from the DeployR server or the cloud and BranchCache peering. The variables below change how it behaves. Every one of them is optional; when a variable is not set, the default shown is used.

Most of these settings need to be in place before the first download, so set them in the `Variables` section of `Bootstrap.json` or in a `preinit.ps1` script. See [Preinit, Postinit, Postauth ps1](/deployr/customization/preinit-postinit-postauth-ps1.md). You can also change them with a **Set variable** step; the new values apply to later downloads.

To choose whether peering is used at all, use the `PEERING` variable (`true`, `false`, or `NoCache`), described on the [Task Sequence variables](/deployr/reference/task-sequence-variables.md) page.

### Proxy and authentication

| Variable             | Description                                                                                                                                                              |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| DEPLOYRPROXYUSER     | User name for an authenticated proxy server set with `DEPLOYRPROXY`. Used together with `DEPLOYRPROXYPASSWORD`. When not set, the device's default credentials are used. |
| DEPLOYRPROXYPASSWORD | Password for the user in `DEPLOYRPROXYUSER`.                                                                                                                             |
| DEPLOYRUSERNAME      | User name sent to the web server when downloading content that requires HTTP authentication. Used together with `DEPLOYRPASSWORD`.                                       |
| DEPLOYRPASSWORD      | Password for the user in `DEPLOYRUSERNAME`.                                                                                                                              |
| DEPLOYREXTRAHEADERS  | Additional HTTP headers to send with each download, as a JSON object. Example: `{"X-Custom-Header":"value"}`                                                             |

In Windows PE, when the StifleR client is running and has MOM servers configured for the current network, downloads go through the first MOM server instead of `DEPLOYRPROXY`.

{% hint style="warning" %}
Avoid storing passwords in `Bootstrap.json` where possible, because anyone with the boot media can read the file.
{% endhint %}

### Retries, timeouts, and connections

| Variable                                  | Description                                                                                                                                                                                           | Default        |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| DEPLOYRDOWNLOADRETRYCOUNT                 | Number of times a failed download is retried.                                                                                                                                                         | 5              |
| DEPLOYRDOWNLOADRETRYDELAY                 | Delay between download retries, in seconds.                                                                                                                                                           | 15             |
| DEPLOYRHTTPTIMEOUT                        | HTTP request timeout, in milliseconds.                                                                                                                                                                | Engine default |
| DEPLOYRTCPCONNECTTIMEOUT                  | Timeout for opening a TCP connection, in milliseconds.                                                                                                                                                | Engine default |
| DEPLOYRPARALELLHTTPSTREAMS                | Number of parallel HTTP streams used to download a single file. (The variable name is spelled this way.)                                                                                              | Engine default |
| DEPLOYRPARALLELLOWTHROUGHPUTTHRESHOLDMBPS | Throughput, in megabits per second, below which the engine uses parallel HTTP streams.                                                                                                                | Engine default |
| DEPLOYRDISABLETLSVALIDATION               | Set to `true` to skip validating the web server's TLS certificate. Validation is skipped automatically when downloading through a proxy server or MOM server, unless this variable is set to `false`. | false          |
| DEPLOYRWEBSERVICETIMEOUT                  | Timeout, in seconds, for REST calls from the DeployR client to the DeployR server. Increase it if a heavily loaded server causes timeouts.                                                            | 300            |

### BranchCache peering

These settings tune peer-to-peer downloads. The defaults are suitable for most environments; change them only when 2Pint Software support recommends it.

| Variable                       | Description                                                                                                                                                                                                                    | Default                           |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------- |
| DEPLOYR\_DLPEERRANDOMSTART     | Each client starts peering at its own random point in the file, which spreads the load when many clients download the same content at once.                                                                                    | true                              |
| DEPLOYR\_DLFASTACCESSPROTOCOL  | Turns on the fast access protocol, which downloads quickly from a small number of peers that already have the complete file.                                                                                                   | false                             |
| DEPLOYR\_DLPRECACHE            | Pre-cache mode: the client downloads content to make it available to peers. When `DEPLOYR_DLCACHEMAXCOPIES` is also set and enough copies already exist, the download stops without error.                                     | false                             |
| DEPLOYR\_DLCACHEMAXCOPIES      | Number of copies on the local network above which the client does not add the content to its own cache.                                                                                                                        | No limit                          |
| DEPLOYR\_DLAGGRESSIVENESS      | Advanced download tuning, as JSON. Only use values supplied by 2Pint Software support.                                                                                                                                         | Not set                           |
| DEPLOYR\_DLFOREGROUND          | Set to `false` to download at background priority. Downloads run in the foreground by default, because nothing else on the device needs the bandwidth during a task sequence. StifleR bandwidth policy overrides this setting. | true                              |
| DEPLOYR\_DLMAXCONNECTIONS      | Maximum number of parallel connections used for a download.                                                                                                                                                                    | 23                                |
| DEPLOYR\_DLMAXPARALLELPCCRR    | Maximum number of parallel peer content requests (PCCRR).                                                                                                                                                                      | Half the processor count, up to 3 |
| DEPLOYR\_DLPCCRRTIMEOUT        | Timeout for a peer content request, in milliseconds.                                                                                                                                                                           | 15000                             |
| DEPLOYR\_DLHTTPTIMEOUT         | HTTP timeout used when downloading from the source, in milliseconds.                                                                                                                                                           | 30000                             |
| DEPLOYR\_DLPEERBLOCKMINTIMEOUT | Minimum time, in milliseconds, to stop using a peer that could not be reached. A random time between the minimum and maximum is used.                                                                                          | 300000 (5 minutes)                |
| DEPLOYR\_DLPEERBLOCKMAXTIMEOUT | Maximum time, in milliseconds, to stop using a peer that could not be reached.                                                                                                                                                 | 600000 (10 minutes)               |

### StifleR variables

When the StifleR client is running on the device, DeployR reads its current settings from the registry and keeps these read-only variables up to date during the task sequence. The download engine uses them to apply StifleR's bandwidth policy.

| Variable                    | Description                                                                                                                                        |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_STIFLERAGENTID            | The StifleR agent ID of the device.                                                                                                                |
| \_STIFLERNETWORKID          | The ID of the StifleR network (location) the device is on.                                                                                         |
| \_STIFLERMOMSERVERS         | Comma-separated list of MOM servers for the current network. Downloads use the first one as a proxy server.                                        |
| \_STIFLERREDLEADERBANDWIDTH | Bandwidth allowed when this device is the red leader, in Kbps. When set, downloads run in the foreground at this rate; `0` means unlimited.        |
| \_STIFLERBITSBANDWIDTH      | BITS bandwidth allowed by StifleR policy, in Kbps. Added to `_STIFLERDOBANDWIDTH` to set the download rate (at least 2 Mbps); `0` means unlimited. |
| \_STIFLERDOBANDWIDTH        | Delivery Optimization bandwidth allowed by StifleR policy, in Kbps.                                                                                |
| \_STIFLERINTERNETBANDWIDTH  | Internet bandwidth reported by StifleR, in Kbps.                                                                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.2pintsoftware.com/deployr/reference/task-sequence-variables/download-and-peering-variables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
