Skip to main content
In this guide, you’ll learn how to install and configure a self-hosted runner at the repository level. You can also set up runners at the organization or enterprise level—see the GitHub documentation for autoscaling, requirements, and limits.

Step 1: Register a New Runner on GitHub

  1. Open your repository on GitHub.
  2. Navigate to SettingsActionsRunners.
  3. Click New self-hosted runner.
  4. Select Linux and x64, then copy the setup commands provided.

Step 2: Download and Extract the Runner

SSH into your Ubuntu VM (or another Linux host), then run:
You should see:

Step 3: Configure the Runner

Run the interactive configuration script:
Do not run this script as root unless you intentionally bypass the check.
Running GitHub Actions jobs as root can introduce security and reliability risks.
The script enforces:

Bypass the Root Check (Optional)

If you need to run as root:
During setup, you will:
  • Choose a runner group (default: default for repo-level).
  • Name your runner (e.g., prod-ubuntu-runner).
  • Assign labels (default: self-hosted, Linux, X64; you can add prod, main).
  • Confirm or change the working directory (default: _work).

Step 4: Verify Registration (Offline)

Once registration completes, your runner shows as Offline in the Runners list:
The image shows a GitHub settings page for actions, specifically the "Runners" section, displaying a self-hosted runner named "prod-ubuntu-runner" which is currently offline.

Step 5: Start the Runner

Back in your VM, launch the runner process so it connects to GitHub and listens for jobs:
Expected output:

Step 6: Verify Runner Status (Online)

Refresh the Runners page. Your runner should now be Online and idle, ready to accept jobs:
The image shows a GitHub Actions settings page for a self-hosted runner named "prod-ubuntu-runner" with no active jobs running. The configuration is set to Linux x64, and several labels are listed, including "self-hosted," "Linux," "X64," "prod," and "main."

Step 7: Use Your Self-Hosted Runner in Workflows

Add this to any workflow file (.github/workflows/*.yml) to target your runner:
Ensure your self-hosted runner has all required tools and permissions for your workflows.

Watch Video