act_runner registration token expired in CI
Gitea registration tokens are time-limited. Registering an act_runner with a token that has already expired is rejected even when the instance URL is correct. Generate a fresh token and register immediately.
What this error means
act_runner register fails with an invalid or expired token error. The instance URL is reachable, but the token no longer authorizes registration.
act_runner
level=fatal msg="failed to register runner: received status code 400
(runner registration token has expired or is invalid)"Common causes
The token expired before registration ran
Registration tokens have a short lifetime; a token copied and left unused past its window is no longer valid.
The token was rotated or revoked
Regenerating a token in the UI invalidates the previous one, so an old copy stops working.
How to fix it
Generate a fresh token and register right away
- Open the instance, org, or repo Runners settings and copy a new token.
- Run
act_runner registerwith that token without delay. - Confirm the runner appears Idle.
Terminal
act_runner register --no-interactive \
--instance https://gitea.example.com \
--token <FRESH_TOKEN> --name ci-runner-1Automate token retrieval for provisioning
When provisioning runners programmatically, fetch a token from the API at register time so it is never stale.
Terminal
# fetch a fresh token, then register in the same script run
act_runner register --no-interactive --instance "$URL" --token "$TOKEN"How to prevent it
- Register runners immediately after generating a token.
- Fetch tokens at provisioning time, not ahead of use.
- Re-run registration if a token was rotated.
Related guides
act_runner "failed to connect to instance" (URL / token) in CIFix act_runner "failed to connect to Gitea instance" in CI - the runner cannot reach the configured instance…
act_runner self-signed instance TLS (certificate) in CIFix act_runner failing on a self-signed Gitea instance certificate in CI - the runner rejects an untrusted TL…
Gitea Actions "no runner available" / no runner registered in CIFix Gitea Actions jobs stuck with no runner available in CI - no act_runner is registered against the instanc…