Installing Buildkite Agent on FreeBSD

You can install Buildkite Agent on most FreeBSD systems.


You first need to ensure that both git and bash are installed on your server:

sudo pkg install bash git
sudo sh -c 'echo "fdesc /dev/fd fdescfs rw 0 0" >> /etc/fstab'
sudo mount -a

# The agent requires a version of bash to be available at: /bin/bash
sudo ln -s /usr/local/bin/bash /bin/bash

# If you want to change your default shell to bash
sudo chsh -s /usr/local/bin/bash `whoami`

# You now switch to bash

Once they have been installed, you can run the following script (view the source), which will download and install the correct binary for your system and architecture (you will need your agent token):


Then, start the agent:

~/.buildkite-agent/bin/buildkite-agent start

Alternatively you can follow the manual installation instructions.

SSH key configuration

SSH keys should be copied to (or generated into) ~/.ssh/ for the user the agent is running as. For example, to generate a new private key which you can add to your source code host:

$ mkdir -p ~/.ssh && cd ~/.ssh
$ ssh-keygen -t rsa -b 4096 -C ""

See the Agent SSH keys documentation for more details.

File locations

  • Configuration: ~/.buildkite-agent/buildkite-agent.cfg
  • Agent Hooks: ~/.buildkite-agent/hooks
  • Builds: ~/.buildkite-agent/builds
  • SSH keys: ~/.ssh


The configuration file is located at ~/.buildkite-agent/buildkite-agent.cfg. See the configuration documentation for an explanation of each configuration setting.


Rerun the install script.