Where Does the GitHub Actions Runner Store Data?
The self-hosted runner lives in one folder: credentials, _diag logs, and _work checkouts beside run.sh. Back up credentials, clean the rest.
Last updated
The GitHub Actions self-hosted runner installs into a single directory (~/actions-runner, /opt/actions-runner, or C:\actions-runner on Windows are the conventions). Registration writes .credentials alongside config.sh and run.sh. Job checkouts land in _work, diagnostics in _diag (Runner_ and Worker_ logs plus SelfUpdate logs), dependencies in externals.
Only credentials matter for backup. Logs and checkouts are disposable by design, and update debris accumulates enough that admins prune it periodically. Service registration differs per OS (systemd unit on Linux, LaunchAgent on macOS, Windows service), so reinstall the service wrapper on the new host rather than copying it.
Where GitHub Actions Runner stores this, by platform
~/actions-runner (install dir)
.credentials plus run.sh/config.sh, _diag logs, and _work checkouts. Credentials are the backup; logs and checkouts regenerate. Service unit lives in /etc/systemd/system, not in this folder.
C:\actions-runner (install dir)
Same layout; Microsoft recommends the drive root (C:\actions-runner) to dodge service identity and path length issues. Windows service name follows the org-repo.runner pattern.
Frequently asked questions
how do i move a github runner to a new machine
Save .credentials and .runner (or .service) files plus any custom env; reinstall the binaries fresh with config.sh --unattended. _work checkouts and _diag logs regenerate. Never copy a live _work folder between machines mid-job.
why does my runner folder keep growing
Update leftovers: versioned bin.NN and externals.NN folders plus _work/_update accumulate per upgrade. Old versioned pairs are safe to delete once the current symlink targets resolve. _work/__externals__ cleans itself between jobs; leave it alone.
Notice an outdated path? Let us know.