> 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/deployr-enterprise/service-startup-processes.md).

# Service Startup Processes

How DeployR synchronizes runtime packages and generated content when the service starts.

### Sync Process

Each time the DeployR service starts, its sync process refreshes prerequisite packages and generated content. It writes progress to the Sync.log file in the DeployR content location.

The scripts are in the DeployR installation folder at `WebServer\Scripts`. Sync.ps1 runs the following scripts in order:

1. **Download.ps1** obtains prerequisite packages. It requires internet access.
2. **SyncRuntimes.ps1** creates runtime content items.
3. **SyncClient.ps1** creates DeployR client content items.

### Downloaded packages

Download.ps1 refreshes .NET, PowerShell 7, and DotNetBrowser packages for each supported platform.

When disconnected mode is disabled, the script first copies an existing package from `Downloads` to `Downloads.temp`. This preserves the previous package while the current package is obtained. After the download completes, it updates the `Downloads` folder.

{% hint style="info" %}
The “Copying old file” entries show that a previous package was available for reuse. They do not indicate a failed download.
{% endhint %}

* **Supported platforms and packages:**
  * **x64 Windows**
    * Used for WinPE:
      * dotnet-runtime-$DotNetVersion-win-x64.zip
      * aspnetcore-runtime-$DotNetVersion-win-x64.zip
      * windowsdesktop-runtime-$DotNetVersion-win-x64.zip
      * PowerShell-$PwshVersion-win-x64.zip
    * Used for tranistion to full OS
      * dotnet-runtime-$DotNetVersion-win-x64.exe
      * aspnetcore-runtime-$DotNetVersion-win-x64.exe
      * windowsdesktop-runtime-$DotNetVersion-win-x64.exe
      * PowerShell-$PwshVersion-win-x64.msi
  * **ARM64 Windows**
    * Used for WinPE:
      * dotnet-runtime-$DotNetVersion-win-arm64.zip
      * aspnetcore-runtime-$DotNetVersion-win-arm64.zip
      * windowsdesktop-runtime-$DotNetVersion-win-arm64.zip
      * PowerShell-$PwshVersion-win-arm64.zip
    * Used for transition to full OS:
      * dotnet-runtime-$DotNetVersion-win-arm64.exe
      * aspnetcore-runtime-$DotNetVersion-win-arm64.exe
      * windowsdesktop-runtime-$DotNetVersion-win-arm64.exe
      * PowerShell-$PwshVersion-win-arm64.msi
  * **x64 Linux** (Enterprise only)
    * Used for Linux boot images:
      * dotnet-runtime-$DotNetVersion-linux-x64.tar.gz
      * aspnetcore-runtime-$DotNetVersion-linux-x64.tar.gz
      * powershell-$PwshVersion-linux-x64.tar.gz
  * **ARM64 Linux** (Enterprise only)
    * Used for Linux boot images:
      * dotnet-runtime-$DotNetVersion-linux-arm64.tar.gz
      * aspnetcore-runtime-$DotNetVersion-linux-arm64.tar.gz
      * powershell-$PwshVersion-linux-arm64.tar.gz

### Generated content items

After the packages are available, the sync process assembles the required files in a temporary folder. It creates a WIM file, uploads a content version, and removes the temporary files.

#### Runtime content items

SyncRuntimes.ps1 creates four runtime content items. Boot images use these items to provide the required .NET and PowerShell runtime files.

* **Windows x64 runtime** — content item `00000000-0000-0000-0001-000000000011`.
* **Windows ARM64 runtime** — content item `00000000-0000-0000-0001-000000000012`.
* **Linux x64 runtime** — content item `00000000-0000-0000-0001-000000000013`.
* **Linux ARM64 runtime** — content item `00000000-0000-0000-0001-000000000014`.

Linux content items require DeployR Enterprise. The log identifies every runtime item by its operating system and architecture. For example, `Arch = arm64, OS = linux` identifies the Linux ARM64 runtime item.

#### DeployR client content items

SyncClient.ps1 creates four DeployR client content items. These items package the DeployR client and its platform-specific dependencies.

* **Windows x64 client** — content item `00000000-0000-0000-0001-000000000001`.
* **Windows ARM64 client** — content item `00000000-0000-0000-0001-000000000002`.
* **Linux x64 client** — content item `00000000-0000-0000-0001-000000000003`.
* **Linux ARM64 client** — content item `00000000-0000-0000-0001-000000000004`.

For every client item, the script includes the common DeployR client files, platform runtime files, client content, PowerShell modules, certificate tooling, BootstrapPE.ps1, and Debug.ps1. It then adds the matching DotNetBrowser Chromium library.

Windows client items contain the shared `win` runtime files and either `win-x64` or `win-arm64` files. Linux client items contain the shared `unix` runtime files and either `linux-x64` or `linux-arm64` files.

### Confirming a successful sync

For each item, confirm that the log shows **Uploading client files** followed by an active content version. The version record includes the WIM relative path, content size, and SHA-256 hash.

The final **Cleaning up** entry confirms that the temporary staging folder was removed. Confirm all four runtime items and all four client items after a service restart.


---

# 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/deployr-enterprise/service-startup-processes.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.
