This repository contains all the files needed to create a Forgejo runner.
Find a file
2025-12-12 11:31:30 +01:00
runner Initial commit 2025-12-12 11:31:30 +01:00
README.md Initial commit 2025-12-12 11:31:30 +01:00

Forgejo runner

Installation

Prerequisites

  • git
  • working Forgejo server
  • working docker installation

Setup

Clone the repository

git clone ssh://git@git.burcusel.nl:2222/public/forgejo-runner.git

Customize docker_compose.yml

Edit docker_compose.yml and change following keys

  • services.runner
    • image // Set the version to the latest
    • container_name // Give the container a meaningful name
    • cpus, cpuset // Optional if you want to control how many cpus are used
vim runner/docker-compose.yml

Up we go!

docker compose up -d

Register your runner

In your newly created container run forgejo-runner register and follow on screen instruction. You can get more info in the documentation.

After successfully register edit .runner file and modify labels section with the values from .runner.example

docker exec -it ${YOUR-CONTAINER-NAME} /bin/sh
forgejo-runner register

Finalize setup

Edit docker_compose.yml and comment the current active command line and un-comment the next one. It should look like this:

services:
  runner:
    ...
    # command: '/bin/sh -c "while : ; do sleep 1 ; done ;"'
    command: '/bin/sh -c "sleep 5; forgejo-runner daemon --config /data/config.yml"'
    ...

After changes are made, rebuild the container.

docker compose down
docker compose up -d