CICD-201 · Register a self-hosted runner
Encyclopedia · Runner administration and execution infrastructure · All snippets
Previous · CICD-200 · Next · CICD-202
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites lab host, trusted repositories, installed act_runner or GitHub runner when named.
- Platforms gitea-actions.
- Parameters
GITEA_RUNNER_TOKEN,GITEA_URL.
2. Copy the snippet
bash
act_runner register --no-interactive --instance "${GITEA_URL:?}" --token "${GITEA_RUNNER_TOKEN:?}" --name lab-runner --labels 'ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest'3. How it works
Registration connects the runner instance to Gitea and advertises a label mapped to its Docker executor image. Restrict the token's scope and check daemon health after registration.
4. Verify the result
Register on the trusted runner host, protect its registration credentials and expect one idle runner in the admin UI. Never run this command with shell tracing.
Watch for. Use the intended trusted execution context. Keep secret values out of traces, artifacts and debug output.
Validation syntax-validated (Bash parse). Status definitions.