Install a Local Delegate on Windows
Learn how to install and configure the Harness Delegate on a Windows machine
CLOSED BETA
Delegate 3.x is currently in closed beta and available only to select users. Access is determined by the product team. See Feature Parity for current supported use cases.
This guide walks you through installing the Harness Delegate on a Windows machine. The delegate runs under the LocalSystem account. Skip to the End-to-End Demo to watch video instructions instead. For supported connectors, CI steps, secret managers, and module support by deployment type, see the Feature Parity page — that's the single source of truth, kept up to date as support expands.
Quick Reference
.\delegate install
Install and register the service
.\delegate start
Start the delegate service
.\delegate stop
Stop the service gracefully
.\delegate status
Show delegate status and details
.\delegate uninstall
Uninstall service (preserves config/logs)
Important file locations:
Config File
C:\HarnessDelegate\config.env
Logs
C:\HarnessDelegate\logs\
Service Definition
Windows Service Control Manager
Get Harness Credentials
Before installation, obtain your Account ID, Delegate Token, and Harness URL.
Open Delegate settings: In the left nav, go to Resources and select Delegates.
Create a new delegate: Click + New Delegate and choose Docker as your delegate type.
Copy the credentials from the
docker runcommand:ACCOUNT_ID→ Your Account IDDELEGATE_TOKEN→ Your Delegate TokenMANAGER_HOST_AND_PORT→ Your Harness URL
Download and Install the Delegate
Step 1: Download the Binary
Open PowerShell as Administrator:
Press Windows Key + X
Select "Windows PowerShell (Admin)" or "Terminal (Admin)"
Replace <VERSION> with the latest version (e.g., 3.5.0):
Step 2: Install with Credentials
Run the install command with the credentials you obtained from the previous step:
Optional: Add tags for delegate selection
Tags are useful for routing specific pipelines to this delegate:
What this command creates:
Workspace directory:
C:\HarnessDelegateConfiguration file:
C:\HarnessDelegate\config.envWindows service: Registered in Service Control Manager
Step 3: Start the Service
You should see a success message with the config location and log file path.
Step 4: Verify Installation
Check the delegate status:
Or use Windows native commands:
View logs in real time:
Navigate to Resources > Delegates in the Harness UI. You should see your delegate with a Connected status.
Additional Configuration
Update Delegate Settings
Stop the service:
.\delegate stopEdit the config:
notepad C:\HarnessDelegate\config.envStart the service:
.\delegate start
Proxy Configuration
The delegate inherits system-level proxies by default, but you can set a custom proxy through the delegate config. There are several ways to configure this:
1. Delegate Config (Recommended)
Edit C:\HarnessDelegate\config.env and add:
2. Per-session (current PowerShell only)
3. Persistent (system-wide) for all processes
Run in elevated PowerShell:
4. Optional (WinHTTP stack for some Windows services)
POWERSHELL VERSION COMPATIBILITY
PowerShell versions below 7 do not support environment proxy configurations such as http_proxy, which the delegate sets, and only work with WinHTTP proxy configurations. Windows 2019 and 2022 ship with PowerShell 5.1, which means the Run step will not work until the WinHTTP proxy is manually configured or PowerShell is upgraded to 7+.
For more information, see Configure Delegate Proxy Settings.
Certificate Configuration
The delegate and containerless steps use the system-level trust store for HTTPS connectivity. Import the CA to the system store using this command:
Git Operations with Custom Certificates
For Git operations, two different SSL channels can be used:
1. SChannel (Recommended)
The native Windows provider integrates with the Windows Certificate Store. Windows performs a revocation check on certificates, so it fails if the cert lacks a CRL/OSCP URL. The check is best-effort — even if the URL is not working it may succeed, but a missing URL always throws an error.
Import your corporate CA into the Windows "Trusted Root Certification Authorities":
You can also use certmgr.msc or certlm.msc to manage certificates manually. Git trusts what Windows trusts — no file path is needed.
2. OpenSSL
This is the standard Git SSL backend. It uses its own CA bundle stored at C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt.
If using the OpenSSL channel, append your CA certificate to C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt.
Manual Plugin Installation
Some CI steps can run directly on the host. Harness automatically downloads required plugins, but manual installation is needed when your infrastructure lacks internet connectivity (e.g., behind a proxy or firewall).
Download the plugin from its source (e.g., drone-git v1.7.6).
Decompress:
zstd.exe -d plugin-windows-amd64.zst -o plugin-windows-amd64.exeMove to the plugins directory:
Manage the Delegate
Stop:
.\delegate stop— The service auto-starts on system reboot.Uninstall:
.\delegate uninstall— Removes service registration (preserves config, logs, and binary).Upgrade:
Download the new binary: Replace the existing
delegatefile.Stop the delegate:
.\delegate stopStart the delegate:
.\delegate start
Configure Pipeline Delegate
For the CI stages that you want to use Delegate 3.x with, define the stage variable HARNESS_CI_INTERNAL_ROUTE_TO_RUNNER and set it to true.
Then, set your pipeline's build infrastructure as usual. Ensure that you have set Local as the Infrastructure and that the Operating System and Architecture match the delegate you installed.
Delegate Configuration
The config.env file location:
Default:
C:\HarnessDelegate\config.envCustom workdir:
{workdir}\config.env
For configuration options that apply across all platforms — including stage capacity limits, graceful shutdown, containerless steps, init scripts, log rotation, metrics, and token management — see the Delegate Configuration Reference.
Configure Custom Working Directory
By default, the delegate stores its configuration files, logs, and cache in C:\HarnessDelegate.
Use the --workdir flag during installation:
Or set the HARNESS_WORKDIR environment variable before running the binary directly:
The delegate automatically creates the directory and subdirectories. Ensure the delegate process has read/write permissions for this directory.
Debugging
Logs
You can find the delegate logs in the following locations:
Default:
C:\HarnessDelegate\logs\delegate.logCustom workdir:
{workdir}\logs\delegate.log
View logs in real time:
Upgrading the Delegate
There is currently no automated upgrade mechanism for Delegate 3.x. The upgrade process involves stopping the delegate, downloading the latest binary, and starting it again.
Stop the delegate:
.\delegate stopDownload the latest binary from the installation step, replacing the existing
delegatefile.Start the delegate:
.\delegate start
Last updated
Was this helpful?