Install a Local Delegate on Linux
Learn how to install and configure the Harness Delegate on a Linux 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 Delegate 3.x on a Linux machine. 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 server --env-file config.env
Start the delegate
nohup ./delegate server --env-file config.env > nohup-delegate.out 2>&1 &
Start in the background
Important file locations:
Config File
./config.env (where you created it)
Logs
./nohup-delegate.out
Get Harness Credentials
Before installation, obtain your Account ID, Delegate Token, and Harness URL.
Open Delegate settings: In the left navigation, 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
For arm64:
For amd64:
Step 2: Create Configuration File
Create a config.env file with the credentials you obtained from the previous step:
Optional: Add tags
Tags are useful for routing specific pipelines to this delegate:
Step 3: Start the Delegate
Run in the background:
Step 4: Verify Installation
Check the logs:
Navigate to Resources > Delegates in the Harness UI. You should see your delegate with a Connected status.
Additional Configuration
Proxy Configuration
The delegate inherits system-level proxies by default, but you can set a custom proxy through the delegate config. Edit config.env and add:
Alternatively, set environment variables:
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 -d plugin-linux-arm64.zst(orplugin-linux-amd64.zst).Move to the plugins directory:
Manage the Delegate
Stop: Find and kill the process using
psandkillcommands.Upgrade:
Download the new binary: Replace the existing
delegatefile.Kill the existing process.
Start with the command from Step 3.
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: Location where you created it
Custom 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 the current working directory.
Set the HARNESS_WORKDIR environment variable before running the binary:
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:
nohup-delegate.outCustom 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 restarting it.
Stop the running delegate (kill the process).
Download the latest binary from the installation step, replacing the existing
delegatefile.Start the delegate using the command from Step 3.
Last updated
Was this helpful?