What Is a Self-Hosted Runner in GitHub Actions?
A self-hosted runner is your own machine, registered to GitHub, that executes Actions jobs instead of a GitHub-hosted VM.
GitHub-hosted runners are convenient but limited in hardware, software, and network access. Self-hosted runners let you bring your own infrastructure to gain control, special hardware, or private network access.
What it is
A machine, physical or virtual, running the GitHub Actions runner agent and registered to a repository, organization, or enterprise. Jobs target it via the self-hosted label.
jobs:
build:
runs-on: [self-hosted, linux, x64]
steps:
- uses: actions/checkout@v4
- run: makeHow it works
You install and configure the runner agent with a registration token. It polls GitHub for matching jobs, runs them, and reports back, on hardware and an OS you control.
Trade-offs
- Pros: custom hardware, GPUs, private network, no per-minute fee.
- Cons: you maintain, scale, secure, and patch the machines.
- Security: avoid self-hosted runners on public-repo PRs.
Why it matters
Self-hosting can cut cost and unlock capabilities, but the operational burden is real. Managed runners like Latchkey give you self-hosted-style control and cost savings while handling provisioning, scaling, and self-healing for you.
Related concepts
Self-hosted runners use labels and runner groups to control targeting and can be autoscaled with Actions Runner Controller.
Key takeaways
- A self-hosted runner is your own registered machine.
- Target it with the
self-hostedlabel. - You gain control but own maintenance and security.