Files
infra-scripts/gitea-runner
Damien 9d9ffd6449 gitea-runner: wait for Tailscale MagicDNS before starting act_runner
OpenRC's `tailscale [started]` dependency only guarantees the tailscaled
process is up, not that MagicDNS is operational. At boot this creates a
race condition where act_runner starts before gitea.taila5ad8.ts.net is
resolvable, causing the runner to fail to connect to Gitea.

Add an active DNS poll in start_pre() using getent, with a 30-second
timeout and an explicit eerror on expiry. depend() is unchanged.
2026-06-20 10:44:13 +02:00
..

Gitea Act Runner

Automated installation script for a Gitea Actions runner in an Alpine LXC on Proxmox.

Features

Single script, three automatic modes:

Context Action
From Proxmox host Creates Alpine LXC + installs everything
From empty LXC Installs Docker + act_runner + OpenRC service
From LXC with act_runner installed Updates binary to latest version

Usage

Full install (from Proxmox shell)

bash -c "$(curl -fsSL https://gitea.arnodo.fr/Damien/infra-scripts/raw/branch/main/gitea-runner/install.sh)"

The script automatically creates an Alpine 3.23 LXC with Docker and act_runner.

Customization

Environment variables to override defaults:

CTID=120 HOSTNAME=runner-02 CORES=4 RAM=4096 bash -c "$(curl -fsSL https://gitea.arnodo.fr/Damien/infra-scripts/raw/branch/main/gitea-runner/install.sh)"
Variable Default Description
CTID auto Container ID
RUNNER_HOSTNAME gitea-runner LXC Hostname
CORES 2 CPU cores
RAM 2048 RAM in MiB
DISK 8 Disk in GB
STORAGE local-lvm Proxmox storage for the LXC
BRIDGE vmbr0 Network bridge

Runner registration

After installation, enter the LXC and register the runner:

pct enter <CTID>
cd /var/lib/gitea-runner
su -s /bin/bash gitea-runner -c "act_runner register"
rc-service gitea-runner start

Update

From inside the LXC:

curl -fsSL https://gitea.arnodo.fr/Damien/infra-scripts/raw/branch/main/gitea-runner/install.sh | bash

The script detects that act_runner is already installed and switches to update mode automatically.

Architecture

  • OS: Alpine 3.23 (LXC non-privileged, nesting active)
  • Docker: installed via apk, OpenRC service
  • act_runner: official binary from gitea.com/gitea/act_runner
  • Service: OpenRC with logs in /var/log/gitea-runner.log
  • User: gitea-runner (group docker)