Bitbucket Pipelines Runner Setup Guide (Ubuntu & Amazon Linux 2)
Self-hosted Bitbucket Pipelines Runner allows you to run builds on your own infrastructure. This guide covers installation, registration, and setup as a systemd service.1. System Requirements
- OS: Ubuntu 20.04+ / Amazon Linux 2
- Packages:
git,curl,unzip,wget,java - User with
sudoprivileges - Open outbound HTTPS (443) access to Atlassian domains
2. Install Java (required for runner)
Ubuntu
Amazon Linux 2
3. Download the Bitbucket Runner
Switch to the runner’s home directory:Check Atlassian docs for the latest runner version.
4. Register the Runner
Run interactive setup:- Authenticate with Bitbucket.
- After registration, you’ll receive a startup command like:
Save this command; it will be used in the systemd service.
5. Create Systemd Service
Create the service file:6. Reload & Enable Service
7. Verify Runner in Bitbucket
- Go to Repository → Repository Settings → Runners.
- The runner should be listed and online.
8. Logs & Troubleshooting
- View logs in real-time:
- If Java is missing, systemd will fail — check with:
- If the runner doesn’t appear online, verify your network/firewall allows outbound connections to Atlassian.
✅ Your self-hosted Bitbucket runner is now installed, registered, and running automatically on boot for both Ubuntu and Amazon Linux 2.
