GitHub Actions Self-Hosted Runner on macOS and Linux: Install, config.sh, Ephemeral and JIT Runners (November 2026)

ยท by Sengi

Short answer: To install a GitHub Actions self-hosted runner on macOS 11.0 or later, or on Linux such as Ubuntu 20.04 or later, open Settings, then Actions, then Runners, then New self-hosted runner, run the download commands shown, then ./config.sh --url REPO_URL --token TOKEN and ./run.sh. The registration token expires after one hour (GitHub Docs, "Adding self-hosted runners"). For a single-use runner, add --ephemeral to config.sh or create a just-in-time (JIT) runner through the REST API; GitHub de-registers it after one job, and your own automation wipes the machine. A matched runner has 60 seconds to pick up a job, and a job with no runner fails after 24 hours (GitHub Docs, "Self-hosted runners reference"). On a Mac, clean-per-job means a macOS VM per job, and Apple's licence allows up to two macOS VMs per Mac you own. Potluck, an early open-source project, runs that VM-per-job step on machines you already own.

Each fact below names the GitHub Docs page it comes from, as read in November 2026.

Requirements for a self-hosted runner machine

The GitHub Docs page "Self-hosted runners reference" lists:

  • macOS: macOS 11.0 (Big Sur) or later.
  • Linux: among others, Ubuntu 20.04 or later, Debian 10 or later, Red Hat Enterprise Linux 8 or later, Fedora 29 or later.
  • Architectures: x64 on Linux, macOS and Windows; ARM64 is listed for the same systems and marked as public preview on that page.
  • Network: outbound HTTPS on port 443 to the GitHub domains the page lists, and at least 70 kilobits per second upload and download.
  • Docker container actions and service containers: these need a Linux runner with Docker installed. They do not run on a macOS runner.

The runner application itself needs few resources, so size the machine for your builds.

One warning from "Adding self-hosted runners": GitHub recommends self-hosted runners only for private repositories, because a pull request from a fork of a public repository can run code on your machine.

Install a self-hosted runner on macOS

These steps follow "Adding self-hosted runners".

  1. Open the repository, then Settings, then Actions, then Runners, then New self-hosted runner. For an organization, open the organization Settings and choose New runner, then New self-hosted runner. Only an organization owner can add an organization runner.
  2. Select macOS and your architecture. On an Apple silicon Mac mini, that is ARM64.
  3. Run the download and extract commands exactly as the page shows them. They carry the current runner version, so copy them from that page.
  4. Register the runner with the URL and token from the same page:
./config.sh --url REPO_URL --token TOKEN
  1. Start it:
./run.sh

When connected, the terminal prints "Connected to GitHub" and "Listening for Jobs", and the runner appears under Runners. On macOS and Linux you install it as a background service after adding it; GitHub covers that on "Configuring the self-hosted runner application as a service".

Target the runner by its labels:

jobs:
  build:
    runs-on: [self-hosted, macOS, ARM64]

Install a self-hosted runner on Linux with config.sh and a registration token

The Linux steps are the same: choose Linux on the New self-hosted runner page, run its download commands, then ./config.sh --url REPO_URL --token TOKEN and ./run.sh. Because the token expires after one hour, a script that registers runners later has to fetch a fresh token through the REST API. "Self-hosted runners reference" lists the credentials that can do that: an access token with repo scope for private repositories, public_repo for public ones, admin:org for organizations, or a GitHub App with the administration or organization_self_hosted_runners permission.

If workflows use Docker container actions or service containers, install Docker on the Linux runner.

Ephemeral self-hosted runners: the single-use lifecycle

The GitHub Docs concept page "Self-hosted runners" notes that self-hosted runners do not need a clean instance for every job. That also means nothing cleans up for you. An ephemeral runner is registered once and takes one job:

./config.sh --url ORG_URL --token TOKEN --ephemeral

Per "Self-hosted runners reference", the lifecycle is:

  1. Register with --ephemeral.
  2. GitHub assigns one job to that runner.
  3. After the job, the GitHub Actions service de-registers the runner.
  4. Your automation wipes the machine, or discards the VM or container, and registers a new runner with a new token.

GitHub recommends ephemeral runners for autoscaling and advises against autoscaling persistent runners, because in some cases a job can be sent to a persistent runner while it is shutting down. A clean environment per job also limits what one job leaves behind for the next. The same page asks you to forward ephemeral runner logs to external storage, since the machine and its logs are gone after the job.

Just-in-time (JIT) runners through the REST API

Instead of config.sh --ephemeral, you can create ephemeral, just-in-time runners with the REST API, described on "REST API endpoints for self-hosted runners". The generate-jitconfig endpoint returns an encoded configuration that you pass to the runner at start with ./run.sh --jitconfig. A JIT runner is single-use and skips the separate token and config step, which suits a script that boots a VM and starts one runner inside it.

Routing, queueing and runner updates

From "Self-hosted runners reference":

  • GitHub sends a job to an online, idle runner that matches its runs-on labels and groups. If that runner does not pick it up within 60 seconds, the job is re-queued.
  • If no matching runner is online, the job waits, and fails after 24 hours in the queue.
  • Runners update themselves by default, so every fresh VM or container image starts by updating. Register with --disableupdate and update the image on your own schedule.
  • With updates off, update within 63 days of a new runner version, or GitHub stops assigning jobs to that runner.

Ways to get a clean environment per job

The autoscaling routes below come from "Self-hosted runners reference", plus Potluck. All pair with ephemeral or JIT runners.

OptionWhat it does wellWhat it needs from you
Persistent runner (config.sh, run.sh)Simplest install, warm cachesManual cleanup; jobs share one disk
--ephemeral with your own scriptsOne job per registrationWipe and re-register logic, token fetching, log forwarding
JIT runner via REST APISingle-use, no separate token stepCode that calls the API and boots a fresh machine
Actions Runner Controller (ARC)GitHub's reference implementation, full lifecycleA Kubernetes cluster and people to run it
Runner Scale Set Client (actions/scaleset)Go module for VMs, containers and macOSYou write the provisioning
workflow_job webhookScaling built exactly as you wantYour own service; depends on timely webhook delivery
Potluck runner brokerFresh Tart VM on a Mac, or gVisor or Kata sandbox on Linux, on machines you ownEarly; run by hand so far, not yet daily in its makers' CI

Potluck is made by Sengi, Inc., which sells hosted GitHub Actions runners. Potluck is a separate free project and runs without a Sengi account.

Self-hosted macOS runners with an ephemeral VM per job

ARC targets Kubernetes, which does not run macOS. On a Mac, the clean-per-job pattern is: boot a macOS VM from an image, start one ephemeral or JIT runner inside it, delete the VM after the job. Tart is a common way to run those VMs on Apple silicon. Apple's licence allows up to two macOS VMs on a Mac you own, so plan for two concurrent macOS jobs per Mac. Lending those VMs to your team is fine; selling Mac time to the public is not, and neither is pooling iOS Simulator time. This is not legal advice. See our Tart page and self-hosted GitHub Actions runner on your Mac.

Where Potluck fits

Potluck is free, open-source (Apache-2.0) software that runs GitHub Actions jobs and coding agents on machines a team already owns, each in a fresh VM or sandbox. It drives Tart on an Apple silicon Mac and Docker or Podman with Kata or gVisor on Linux. It is not a sandbox runtime of its own, not a hosted cloud and not a cluster scheduler.

What works today: a real Actions job has been run through Potluck's runner broker, by hand, on a Mac with Tart and on a Linux box on another machine with gVisor. It is not yet in daily use in its makers' own CI. Potluck caps macOS guests at two per Mac. A Mac sandbox ends when its owner touches the keyboard or pointer; on Linux, hand-back to a returning owner works only as a time window today.

The machine that runs a VM can read everything in it, including repository secrets, and the machine that runs a pool can read commands and output passing through it. Join only a pool whose owner you trust, and use it at your own risk. More on the GitHub Actions runner page and in pool spare Macs and Linux boxes.

How to start with Potluck

Install on macOS or Linux (no Go needed) and start the daemon:

curl -fsSL https://raw.githubusercontent.com/sengirunners/potluck/main/install.sh | sh
potluck daemon --detach

On the machine that runs the pool (the first create prints a Tailscale login URL):

potluck create friends
potluck invite carl --host

On the Mac mini or Linux box that will share:

potluck doctor
potluck host --dry-run
potluck host '<code>'

potluck host checks the machine, pulls the image, runs a conformance check per size and joins only when a size passes. --share (default 0.5) sets the fraction of cores and RAM shared, and potluck host stop stops sharing. potluck isolation test <size> checks that a box cannot reach the host, its LAN or its tailnet.

Try it early

Potluck is early. Its makers want people with a spare Mac or Linux box to try it and say what breaks. Start a thread at https://github.com/sengirunners/potluck/discussions. To contribute, the good first issues are at https://github.com/sengirunners/potluck/issues.

Questions people ask

How long is a self-hosted runner registration token valid?

One hour, according to the GitHub Docs page "Adding self-hosted runners". Automation that registers runners later should fetch a fresh token through the REST API.

What is the difference between --ephemeral and a JIT runner?

Both take one job and are then removed. --ephemeral is a config.sh flag used with a registration token; a JIT runner gets an encoded config from the REST API and starts with ./run.sh --jitconfig.

Can a macOS self-hosted runner run Docker container actions?

No. "Self-hosted runners reference" says Docker container actions and service containers need a Linux machine with Docker installed.

What happens if no self-hosted runner is online?

The job stays queued and fails after 24 hours, per "Self-hosted runners reference".

How many macOS VMs can I run per Mac for ephemeral runners?

Apple's licence allows up to two macOS VMs on a Mac you own, and Potluck caps macOS guests at two per Mac. This is not legal advice.

Is Potluck ready to replace my CI runners?

Not yet. A real Actions job has run through its runner broker by hand on a Mac and on Linux, but it is not in daily use in its makers' CI, and it is early software.

Do I need a Sengi account to use Potluck?

No. Potluck is made by Sengi, which sells hosted runners, but it runs without Sengi and without a Sengi account.

This post as Markdown