Installing Buildkite Agent on Windows
The Buildkite Agent can be installed on both 64bit and 32bit editions of Windows XP and later.
On this page:
Automated install with Powershell
You'll need to run the automated installer within Powershell with Administrative Privileges.
To start a Powershell session as an Administrator (in Windows 8):
- Open the Start menu and type "powershell"
- Highlight "Windows Powershell" in the results
- Press CTRL+SHIFT+ENTER (you'll be prompted to allow this app to make changes)
Once you're in an escalated Powershell session, you can run this script to install the latest version of the Agent:
$env:buildkiteAgentToken = "my_token" Set-ExecutionPolicy Bypass -Scope Process -Force iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/buildkite/agent/master/install.ps1'))
- Download the latest Windows release from Buildkite Agent releases on GitHub
- Extract the files to a directory of your choice (we recommend
buildkite-agent.cfgand add your token
buildkite-agent.exe startfrom a command prompt
SSH Key Configuration
SSH keys should be copied to (or generated into) in the user’s
.ssh directory. For example, typing the following into Git Bash will generate a new private key which you can add to your source code host:
$ ssh-keygen -t rsa -b 4096 -C "email@example.com"
See the Agent SSH Keys documentation for more details.
- SSH keys:
The configuration file is located at
C:\buildkite-agent\buildkite-agent.cfg. See the configuration documentation for an explanation of each configuration setting.
Rerun the install script.
Git for Windows
While the agent will work without Git installed, you will require Git for Windows to interact with Git or SSH. Git for Windows also includes Bash and a variety of standard linux tools which are frequently required for plugins.
Running as a service
The simplest way to run buildkite-agent as a service is to use a third-party tool like nssm. Once installed, you can either run the GUI and configure manually, or create via the command-line:
nssm.exe install buildkite-agent "C:\buildkite-agent\bin\buildkite-agent.exe" "start" nssm.exe set buildkite-agent AppStdout "C:\buildkite-agent\buildkite-agent.log" nssm.exe set buildkite-agent AppStderr "C:\buildkite-agent\buildkite-agent.log" nssm.exe status buildkite-agent nssm.exe start buildkite-agent nssm.exe status buildkite-agent