Use this when running GitHub Actions on your own machines.
Self-hosted Runner
Self-hosted runners are your own machines running the GitHub Actions runner agent, used for special hardware, private network access or cost. Do not use them for public repositories' untrusted pull requests.
1. Self-hosted runners run in your network.
2. Never use for public repos (untrusted code).
3. Ephemeral runners to avoid persistence.
4. Least-privilege host and network.
5. Keep runner software updated.
job → self-hosted runner → internal resources
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as event filter surprises, unpinned actions, secret/permission overreach, runner drift, matrix partial failure, artifact confusion and assuming conclusion=success shows external convergence, choosing the cases most relevant to runner registration/group/labels, persistent host state, patch/tool drift, network/credential boundary and cleanup between jobs.
Step 2 Example Narrow the fault
./config.sh --url https://github.com/org/repo --token <reg-token>
./run.sh # or install as a service: ./svc.sh install
Step 3 Common mistakes Narrow the fault
- Self-hosted runners on public repositories (untrusted PRs can run code).
- Runners with broad credentials and no isolation.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Access to private networks.
- Don't use for public repos' untrusted PRs.
- Keep runners patched.
gh api repos/<o>/<r>/actions/runners— registered runnerssystemctl status actions.runner.*— runner service- Ephemeral/JIT runners (actions-runner-controller) — isolation
ReferenceWhy it matters1 section · depth on demand
What it is
A self-hosted runner executes GitHub Actions jobs on your own machine, giving access to internal networks and tools.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
A self-hosted runner is a machine you operate that executes GitHub Actions jobs. It is needed when jobs must reach internal networks (device management, on-premises APIs), require special hardware or licensed tools, or must stay inside your environment.
Security is the main concern: a runner executes whatever workflow code it receives.
| Measure | Why |
|---|---|
| Use only with private repositories | Public repo PRs could run code on your runner |
Ephemeral runners (--ephemeral, Actions Runner Controller) | Fresh environment per job |
| Runner groups restricted to specific repos | Limit who can use it |
| Minimal network access | Only what jobs need |
| No long-lived secrets on the host | Secrets come from GitHub/OIDC per job |
./config.sh --url https://github.com/org/repo --token <reg-token> --labels linux,network --ephemeral
Mechanics
The linked authority for bounded mechanics is GitHub Docs — Self-hosted runners; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in GitHub Actions > Self-hosted Runner. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For runner registration/group/labels, persistent host state, patch/tool drift, network/credential boundary and cleanup between jobs, prefer typed fields and stable IDs over human presentation text.