Skip to content

Instantly share code, notes, and snippets.

@fdstevex
Created May 31, 2016 13:05
Show Gist options
  • Save fdstevex/52da0d7e5892fe2965eae105b8cf3883 to your computer and use it in GitHub Desktop.
Save fdstevex/52da0d7e5892fe2965eae105b8cf3883 to your computer and use it in GitHub Desktop.
Running buildkite-agent as a Windows service
1. Download the Windows Service Wrapper binary from this project: https://github.com/kohsuke/winsw
2. Copy to your Buildkite directory and rename to "buildkite-service.exe"
3. Create buildkite-service.xml:
<service>
<id>buildkite-service</id>
<name>buildkite-service</name>
<description>The BuildKite build agent.</description>
<executable>buildkite-agent</executable>
<arguments>start</arguments>
<logmode>rotate</logmode>
</service>
4. Invoke "buildkite-service install" to register the service.
(This may show a dialog indicating that you need to install the .NET Framework 3.5 - you can do this in the Control Panel, search for Turn Windows Features On and Off and install it through the wizard).
5. Use the Services control panel to change the user that buildkite-service runs as, to an appropriate user.
6. "net start buildkite-agent"
@lankaapura
Copy link

Awesome thanks both of you!! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment