Gitea Actions runner setup
Gitea Actions needs a separate program, Gitea Runner, to run your workflow jobs. You get a registration token from Gitea, register the runner with gitea-runner register (or the gitea/runner Docker image), and start it with gitea-runner daemon. Put it on its own machine, run jobs in containers, and treat anything with access to the Docker socket as root on that host.
At a glance
| Item | Current state (checked 2026-12-02) |
|---|---|
| Runner name | Gitea Runner, formerly act_runner (renamed at 1.0.0, 5 May 2026) |
| Binary and image | gitea-runner; docker.io/gitea/runner |
| Latest release | 6.1.0, 27 November 2026 |
| Minimum Gitea | 1.26.2 for runner 6.x (any 28.x qualifies) |
| Actions on the instance | On by default since Gitea 1.21 |
| Actions per repository | Off until you enable it in repository settings |
| Token scopes | Instance, organization, user or repository |
| Recommended Docker image | 6-dind (bundled Docker daemon, needs --privileged) |
If you are still choosing a forge, start with what Gitea is or the Git hosting hub.
Names and versions: what changed in 2026
Older tutorials say act_runner. Gitea’s 1.0.0 announcement on 5 May 2026 renamed the project to Gitea Runner, moved it to gitea.com/gitea/runner (the old address redirects), renamed the binary to gitea-runner and the image to gitea/runner, and reset the version number after the 0.6.x line. For most setups, migrating is a rename in your scripts, unit files and Compose files.
Releases have come quickly since. Version 6.0.0 (11 November 2026) requires Gitea 1.26.2 or newer and removed the builtin:checkout action, so use actions/checkout instead. Gitea itself dropped the “1.” prefix at 28.0.0 (30 September 2026), so a Gitea 28.x server meets that requirement.
One caveat: when checked, the runner pages on docs.gitea.com still described the 5.x series, while the releases page listed 6.1.0. The commands below appear in both the 5.x docs and the current README, but read the release notes before a major upgrade.
Step 1: enable Actions
Since Gitea 1.21, Actions is enabled by default; the example configuration shows ENABLED = true as the default. On an older instance, or one where someone turned it off, add this to app.ini and restart Gitea:
[actions]
ENABLED=true
Repositories still start with Actions disabled. Open the repository’s settings and tick Enable Repository Actions. To turn it on for every new repository, Gitea’s FAQ shows adding repo.actions to DEFAULT_REPO_UNITS in the [repository] section.
Step 2: get a registration token
Pick the narrowest scope that covers the repositories you want to build. A runner only accepts jobs within its token’s scope.
- Instance: site administration, at
/-/admin/actions/runners - Organization:
/<org>/settings/actions/runners - Repository:
/<owner>/<repo>/settings/actions/runners
The registration docs also list user-level tokens. One token can register any number of runners until you reset it, so treat it like a password and reset it if it leaks.
Step 3: register and run the binary
Gitea’s quick start suggests trying the binary first, because it is easier to debug. The download step fetches the binary and its checksum file from dl.gitea.com, checks the checksum, and copies the binary to /usr/local/bin. The docs show 5.2.0; 6.1.0 is the current release with the same file layout:
VERSION=6.1.0
curl -sSLO "https://dl.gitea.com/gitea-runner/$VERSION/gitea-runner-$VERSION-linux-amd64"
curl -sSLO "https://dl.gitea.com/gitea-runner/$VERSION/gitea-runner-$VERSION-linux-amd64.sha256"
sha256sum -c "gitea-runner-$VERSION-linux-amd64.sha256"
sudo install -m 0755 "gitea-runner-$VERSION-linux-amd64" /usr/local/bin/gitea-runner
Register without prompts, then start it:
gitea-runner register --no-interactive \
--instance https://gitea.example.com \
--token <token> \
--name my-runner \
--labels ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest
gitea-runner daemon
Two details trip people up:
- The instance address. Use your Gitea
ROOT_URLor another address that both the runner and its job containers can reach. Neverlocalhostor127.0.0.1: inside a job container, that is the container itself. - The token in your shell history. The docs suggest
--token-file <path>or theGITEA_RUNNER_REGISTRATION_TOKENenvironment variable instead.
Registration writes a .runner file to the working directory. It holds the runner’s credentials: keep it on persistent storage, never edit it, and treat it as a secret. Run daemon from the same directory. The new runner then appears on the runners page in Gitea.
Step 4: run it as a systemd service
The binary install page sets up a system user, a config file and a unit. Create the user, write a minimal config and register as that user:
sudo useradd --system --home-dir /var/lib/gitea-runner --create-home gitea-runner
sudo mkdir -p /etc/gitea-runner
sudo gitea-runner config init -c /etc/gitea-runner/config.yaml
sudo chown gitea-runner /etc/gitea-runner/config.yaml
cd /var/lib/gitea-runner
sudo -u gitea-runner gitea-runner register -c /etc/gitea-runner/config.yaml \
--instance https://gitea.example.com --token <token>
Save the unit as /etc/systemd/system/gitea-runner.service:
[Unit]
Description=Gitea Actions runner
Documentation=https://gitea.com/gitea/runner
After=network-online.target
Wants=network-online.target
# Uncomment when jobs use the local Docker daemon:
# After=docker.service
# Requires=docker.service
[Service]
Type=simple
ExecStart=/usr/local/bin/gitea-runner daemon --config /etc/gitea-runner/config.yaml
WorkingDirectory=/var/lib/gitea-runner
User=gitea-runner
Group=gitea-runner
Restart=on-failure
RestartSec=5s
TimeoutStopSec=3h
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now gitea-runner
Stopping the service cancels running jobs unless runner.shutdown_timeout gives them time; keep it below TimeoutStopSec. For container jobs, the docs tell you to give the gitea-runner user access to the Docker socket, for example through the docker group, and say plainly that this access is equivalent to root on the host.
Alternative: the Docker image
The -dind image runs its own Docker daemon for jobs, so jobs never touch the host’s Docker socket. On first start the container registers itself and then runs. This is the documented command with the tag moved from 5-dind to the current 6-dind:
docker run -d --name gitea-runner --restart always --privileged \
-e GITEA_INSTANCE_URL=https://gitea.example.com \
-e GITEA_RUNNER_REGISTRATION_TOKEN=<token> \
-v ./data:/data \
-v runner-docker:/var/lib/docker \
docker.io/gitea/runner:6-dind
/data keeps the .runner file, so a recreated container does not register as a new runner; the second volume keeps pulled job images. Other variables include GITEA_RUNNER_NAME, GITEA_RUNNER_LABELS, GITEA_RUNNER_REGISTRATION_TOKEN_FILE (for Docker secrets), GITEA_RUNNER_EPHEMERAL and CONFIG_FILE. If Gitea itself runs in Compose, the runner’s Docker example shows the same settings as a runner: service; see Gitea with Docker Compose for the Gitea side.
The image comes in three flavours:
| Tag | Docker daemon for jobs |
|---|---|
6-dind (recommended) |
Bundled; needs --privileged |
6-dind-rootless |
Bundled, runs as UID 1000; needs --privileged and rootless Docker support on the host |
6 |
None; you mount /var/run/docker.sock or set DOCKER_HOST |
Note what --privileged means: the runner container itself has broad access to the host kernel. Docker-in-Docker trades that for keeping jobs off your main Docker daemon. The plain image with the host socket mounted is worse: every job shares that daemon, and the docs say to use it only for trusted repositories.
config.yaml basics
The runner works without a config file. Create one with gitea-runner config init, change keys with gitea-runner config set, and print every option with gitea-runner config generate (older guides use generate-config; the current command reference lists only the config subcommands). Pass the file with -c to register, daemon and cache-server, and restart after each change.
Options worth knowing:
runner.capacity(default 1): jobs that run at once.runner.timeout(default 3h): maximum job length.container.network: empty means a fresh network per job.container.privileged(default false): leave it off unless you need Docker-in-Docker inside jobs.container.valid_volumes(empty by default): host paths and volumes workflows may mount.container.docker_host: set it to"-"to keep the Docker socket out of job containers.
Labels and runs-on
A label maps a name to an environment, in the form name[:schema[:args]]:
ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latestruns the job in that container image.macos:host, or justmacos, runs it directly on the runner’s machine.kubernetes://<image>runs it as a pod.
A workflow’s runs-on: ubuntu-latest goes to a runner with a label named ubuntu-latest. With several labels, such as runs-on: [linux, arm64], the runner needs all of them and uses the environment of the first. If you leave labels blank at registration, current releases use ubuntu-latest, ubuntu-26.04, ubuntu-24.04 and ubuntu-22.04, all mapped to Gitea’s runner images. To change labels later, use gitea-runner config set runner.labels ... and restart; the runner reports its labels to Gitea at startup.
Give host labels distinct names such as macos-arm64. If you label the host ubuntu-latest, workflows written for GitHub will run on your machine with no sandbox.
Cache server
Each runner runs its own cache server for actions/cache, so caching works with no setup, but entries are not shared between runners. To share, run one gitea-runner cache-server with a secret (generate it with openssl rand -hex 32) and point each runner’s cache.external_server at it, or use an S3-compatible bucket. If actions/cache fails with connect ETIMEDOUT, the job cannot reach the runner’s cache server; leave container.network empty rather than setting it to bridge.
Runner security
A runner executes whatever code a workflow tells it to. Forgejo’s docs call its own runner “remote code execution”, and the same is true here.
- Use a separate machine. Not the Gitea server. A small VM or VPS works; see picking a VPS for self-hosting. Keep it patched and upgrade the runner with each release.
- Scope runners tightly. Register at repository or organization level when you can. Gitea’s own rules: don’t use a runner you don’t trust, and don’t provide a runner to repositories you don’t trust.
- Be careful with forks. Gitea’s FAQ says gitea.com requires approval before Actions run for fork pull requests, and Gitea 28.0.0 fixed several issues in that approval gating, so stay current. Fork pull request workflows always get a read-only
GITEA_TOKENfor repository contents. Never run untrusted pull requests on a runner with host labels, a mounted Docker socket orcontainer.privileged. - Mind secrets. The runner masks secrets in logs, but a job can still read and send out any secret you pass to it. Give jobs only what they need.
- Use ephemeral runners for untrusted code.
gitea-runner register --ephemeral(orGITEA_RUNNER_EPHEMERAL=1) accepts exactly one job, then exits, and its credentials are revoked once the job is assigned. Start each one in a fresh VM or container. - Keep the admin side closed. Gitea’s FAQ notes that runners only connect to your Gitea instance, so the runner needs no ports open to the internet. Keep Gitea’s admin pages behind a VPN or IP allowlist, serve Gitea over TLS, and back up Gitea, not the runner: a lost runner is simply registered again.
Forgejo uses a different runner
Forgejo, the community fork of Gitea, ships its own Forgejo Runner from a separate project with separate docs. Use the runner that matches your forge; Gitea’s docs cover only Gitea Runner. The differences in Actions between the two are covered in Gitea vs Forgejo.
Frequently asked questions
- Is act_runner the same thing as Gitea Runner?
- Yes. Gitea renamed act_runner to Gitea Runner with its 1.0.0 release on 5 May 2026. The binary is now gitea-runner, the Docker image is gitea/runner, and the old act_runner repository address redirects to gitea.com/gitea/runner.
- Which Gitea version does the current runner need?
- Gitea Runner 6.0.0 and later need Gitea 1.26.2 or newer. Gitea dropped the 1. prefix at 28.0.0, so any 28.x release qualifies. On an older Gitea, upgrade Gitea first or stay on a 5.x runner.
- Why does my job stay queued with no runner picking it up?
- Usually the job's runs-on value matches none of your runner's label names, Actions is not enabled for that repository, or the runner was registered at a scope (one repository or organization) that does not cover the repository. Check the runner's labels and scope on the runners settings page.
- Can I run the runner on the same server as Gitea?
- It works, but Gitea's quick start recommends a separate machine so jobs do not starve Gitea of resources. It is also safer: a job that escapes its container should not land on the server that holds your repositories and database.
- Do I need Docker on the runner machine?
- Only for jobs that run in containers, Docker actions and docker:// steps. Jobs with a host label run directly on the machine without Docker, as the runner's user and without isolation, so keep those for repositories you trust.
Sources, checked December 2, 2026
- Gitea docs: Actions overview
- Gitea docs: Actions quick start
- Gitea docs: Actions FAQ
- Gitea docs: Design of Gitea Actions (label format)
- Gitea docs: Actions job token permissions
- Gitea Runner docs: overview and requirements (5.x series)
- Gitea Runner docs: install from a binary (systemd unit)
- Gitea Runner docs: install with Docker
- Gitea Runner docs: registration
- Gitea Runner docs: configuration
- Gitea Runner docs: labels
- Gitea Runner docs: jobs (Docker inside jobs, volumes and privileges)
- Gitea Runner docs: caching
- Gitea Runner docs: command line reference
- Gitea Runner repository and README
- Gitea Runner releases (v6.1.0 latest, 27 November 2026)
- Gitea Runner example configuration (config.example.yaml)
- Gitea Runner systemd example unit
- Gitea blog: Gitea Runner 1.0.0 is released (rename from act_runner)
- Gitea blog: Gitea Runner 6.0.0 is released
- Gitea blog: Gitea 28.0.0 is released
- gitea/runner image tags on Docker Hub
- Gitea example configuration (app.example.ini, [actions] section)
- Forgejo docs: Forgejo Actions administrator guide