Skip to main content
With self-hosted runners, you can create custom hardware configurations that meet your needs with processing power or memory to run larger jobs, install software available on your local network, and choose an operating system not offered by GitHub-hosted runners. — GitHub Docs
1
Open your repository settings
2
Go to your repository on GitHub, then navigate to Settings > Actions > Runners and click New self-hosted runner.
3
Choose your Runner Image and Architecture
4
Select the operating system and architecture that matches your device. Note that the architecture depends on your device specifications (e.g., x64).
5
Download the runner files
6
All required commands are shown on the same page where you selected the Runner Image and Architecture.
7
Linux Runner
# Create a folder under drive root
mkdir actions-runner && cd actions-runner

# Download the latest runner installer file
curl -o actions-runner-linux-x64-2.311.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.311.0/actions-runner-linux-x64-2.311.0.tar.gz

# Extract the installer
tar xzf ./actions-runner-linux-x64-2.311.0.tar.gz
Windows Runner
# Create a folder under the drive root
mkdir actions-runner; cd actions-runner

# Download the latest runner installer file
Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.311.0/actions-runner-win-x64-2.311.0.zip -OutFile actions-runner-win-x64-2.311.0.zip

# Extract the installer
Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/actions-runner-win-x64-2.311.0.zip", "$PWD")
8
Configure and start the runner
9
Linux Runner
# Configure the runner
./config.sh --url <github-repo-url> --token <token> --labels <lists-of-label>

# Start the runner
./run.sh
Windows Runner
# Configure the runner
./config.cmd --url <github-repo-url> --token <token> --labels <lists-of-label>

# Start the runner
./run.cmd
10
Programmatically assigning labels to a self-hosted runner is optional.
11
Use your self-hosted runner in a workflow
12
Create a new file at .github/workflows/test.yaml:
13
name: Test runner
on:
  push:
jobs:
  build:
    runs-on: ["self-hosted"]
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: List directory
        run: ls
14
(Optional) Run as a service
15
You can configure the self-hosted runner application as a service so it starts automatically on boot.

Build docs developers (and LLMs) love