Brainboard's documentation
Go to the app ↗
  • Welcome
  • Getting started
    • Fast track
    • Start with a template
    • Start with AI
    • Use cases videos
    • Brainboard philosophy
  • Cloud design
    • Left bar
      • Cloud resources
      • Input & output
    • Design area
      • Node
      • ID card
      • Connectors
      • Versioning
      • Graphical options
    • One action
    • Code Edition
  • Data
    • Data structure
      • Project
      • Environment
      • Cloud architecture
        • Terraform files
        • Readme file
        • Architecture Synchronization
        • Remote backend
      • Template
    • Cloud providers
      • Supported cloud providers
      • Customize provider configuration
      • Unsupported cloud providers
    • Terraform / OpenTofu
      • Modules
        • Module
        • Import modules
        • Manage module
        • Terraform registry credentials
        • Use modules
    • Disaster recovery
  • Automation
    • CI/CD engine
    • Supported plugins
      • Terraform
      • Security
        • Trivy
        • Tfsec
        • Terrascan
        • OPA
        • Checkov
      • Infracost
      • Notifications
        • Email
        • Slack
        • Microsoft Teams
      • Webhooks
    • Pipelines
    • Workflow templates
    • Drift detection
      • Types of drift
      • Remediation
    • Self-Hosted Runner
      • Deploy runner with Kubernetes
      • Deploy runner with docker-compose
  • Settings
    • Overview
    • Authentication
      • Login into Brainboard
      • Single sign-on (SSO)
    • Account management
    • Organization
    • Members
    • Teams
    • Roles & Permissions (RBAC)
      • Level of access
      • Organization RBAC
      • Project RBAC
    • Integrations
      • Git configuration
        • GitHub
        • Azure DevOps (ADO)
        • Bitbucket
        • GitLab
        • How to use
      • Cloud providers
        • AWS
        • Azure
        • GCP
        • OCI
  • Security
    • Data managed by Brainboard
    • SOC 2 Type II
    • Role Based Access Control
  • Help & FAQ
    • Shortcuts
    • FAQ
    • Migration
      • Import from cloud provider
    • Support
    • Glossary
  • Changelog
Powered by GitBook
On this page
  • Pre-requisites
  • Configuration
  • Starting the runner
  • Usage

Was this helpful?

Edit on GitHub
  1. Automation
  2. Self-Hosted Runner

Deploy runner with docker-compose

PreviousDeploy runner with KubernetesNextOverview

Last updated 6 months ago

Was this helpful?

Pre-requisites

First, you need to have Docker installed on your server. If not already installed, please follow instructions from .

After installing Docker, you need the following files in a directory:

docker-compose.yml
version: '3'

services:
  runner:
    image: ghcr.io/brainboard/runner:latest
    restart: unless-stopped
    command: /brainboard-runner run
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "./runner-config.yaml:/etc/brainboard-runner/config.yaml:ro"
runner-config.yaml
level: warn

runner:
  concurrency: 4
  name: "self-hosted runner"
  token: "your-runner-token"

api:
  endpoint: "https://api.us1.brainboard.co"

docker:
  registry: "ghcr.io/brainboard/plugins"
  ecr_auth: false

Configuration

The runner-config.yaml file contains Brainboard runner configuration. You can modify this file to change the configuration of the runner. It's important to note that the runner-config.yaml file should be in the same directory as the docker-compose.yml file.

Before starting the runner for the first time, it is mandatory to update the runner.token configuration value in the runner-config.yaml file. Update this value with the private self-hosted runner token you generated from the Brainboard settings page.

...
runner:
  token: "your-runner-token"
...

This token should be unique and cannot be shared across multiple runners. If you use the same token on multiple runners, you will encounter issues when running CI/CD jobs.

Starting the runner

To start the runner, open a terminal and navigate to the directory where you downloaded the docker-compose and runner-config files. The following command will start the runner in the background:

docker compose up -d

Register runner with your organization

/brainboard-runner register

This operation only needs to be done once, when the runner is started for the first time.

Usage

To open a terminal inside the runner container, use the following command:

docker compose exec runner sh

If you want to see the logs, you can run this command:

docker compose logs -f

To stop the Brainboard runner, execute the following command:

docker compose down

Once the runner is started, you will need to register it with your organization. To do so, open a terminal inside the runner container () and run the following command:

this page
see below