> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archil.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CI runners

> Run GitHub Actions jobs on Archil sandboxes: connect a GitHub organization, change runs-on, and every job gets a fresh microVM in your workspace.

Archil CI runners run your GitHub Actions jobs on Archil sandboxes. Connect a GitHub organization from the console,
change one line in a workflow, and each job runs in its own fresh [Firecracker](https://firecracker-microvm.github.io/)
microVM in your Archil workspace:

```yaml theme={null}
jobs:
  test:
    runs-on: archil-ubuntu-24.04-4cpu # was: ubuntu-latest
```

On six open-source builds, a 2 vCPU Archil runner finished 1.2–1.9× faster than GitHub's standard 2-core runner, at
1.8–3.8× lower cost per job. See the [CI runner benchmark](https://docs.archil.com/reference/benchmarks/ci-runners.md).

> [!NOTE]
>
> CI runners are in preview. Open **CI Runners** in the [console](https://console.archil.com/ci-runners) and click
> **Request access**, or email [support@archil.com](mailto:support@archil.com) with your GitHub organization.

## Connect a GitHub organization

1. In the [console](https://console.archil.com/ci-runners), open **CI Runners** in the workspace that should run and
   pay for the jobs, and click **Connect GitHub organization**.
2. GitHub asks you to install the **Archil GitHub App** on an organization. You need to be an owner of that
   organization. If the app is already installed, GitHub shows its settings; click **Save**.
3. GitHub sends you back to the console, which sets up the organization's dispatcher in about a minute. The
   organization then shows as **Online**.

Change `runs-on` in any workflow in that organization to one of the [runner labels](#runner-labels), and push. The
**CI Runners** page shows jobs running now, jobs per day, busy runners over the last 24 hours, recent jobs, and
estimated spend.

### What connecting creates

Everything that runs your jobs lives in your workspace:

* **An API key** named `GitHub Actions dispatcher (<org>)`, limited to sandboxes. It's listed on the
  [API keys](https://console.archil.com/api-keys) page. Deleting it stops CI runners for that organization.
* **A dispatcher**: a small sandbox named `ci-dispatcher-<org>-…` (1 vCPU, 512 MiB) that listens for jobs from GitHub
  and creates a sandbox for each one. It's the open-source `archil-actions-runner` adapter.
* **A sandbox per job**, created when GitHub assigns the job and deleted when it finishes.

## Runner labels

| Label | vCPU | Memory | Compute at list price |
| - | - | - | - |
| `archil-ubuntu-24.04-2cpu` | 2 | 8 GiB | \$0.27 / hour |
| `archil-ubuntu-24.04-4cpu` | 4 | 16 GiB | \$0.54 / hour |
| `archil-ubuntu-24.04-8cpu` | 8 | 32 GiB | \$1.08 / hour |
| `archil-ubuntu-24.04-16cpu` | 16 | 64 GiB | \$2.16 / hour |

For builds that parallelize, a larger size costs only a little more per job, because the job finishes sooner. In the
[benchmark](https://docs.archil.com/reference/benchmarks/ci-runners.md#a-larger-runner), 4 vCPU cut Node, Rust, and Go build times by 30–45%
compared with 2 vCPU.

## What a job runs on

* **A fresh microVM per job:** nothing carries over between jobs, and jobs can't see each other.
* **Ubuntu 24.04, x86\_64,** with a large root disk.
* **The `runner` user, with passwordless `sudo`.**
* **A running Docker daemon:** `docker build`, `docker compose`, and `services:` containers work.
* **Preinstalled tools:** the GitHub Actions runner, Docker with buildx and compose, `gh`, AWS CLI v2, `git`, `curl`,
  `jq`, `build-essential` (gcc, make), `cmake`, `pkg-config`, Python 3 with `pip`, `venv` and `pipx`, `gpg`, `fuse3`,
  `iproute2`, `zip`/`unzip`, `xz` and `zstd`.

Language toolchains aren't preinstalled the way they are on GitHub-hosted runners. Use the standard setup actions
(`actions/setup-node`, `actions/setup-python`, `actions/setup-go`, `dtolnay/rust-toolchain`, and so on), which
download them in a few seconds. Install anything else in a step:

```yaml theme={null}
- run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
```

## Limits

| Limit | Value |
| - | - |
| Max job duration | 6 hours |
| Concurrent jobs per size, per organization | 20 |
| Architecture | x86\_64 |
| Operating systems | Linux (Ubuntu 24.04) |

* **No nested virtualization.** Jobs can't use `/dev/kvm`, so they can't run Firecracker, QEMU with KVM, or the
  Android emulator with hardware acceleration. Keep those jobs on a runner with KVM.
* **No Windows, macOS, or arm64 runners yet.**
* **Free plan:** runner sandboxes follow your plan's [sandbox limits](https://docs.archil.com/reference/limits.md). On Free, a sandbox session
  lasts at most 30 minutes and reaches only the [managed allowlist](https://docs.archil.com/compute/sandboxes/firewall.md#free-plan-allowlist),
  so longer jobs, and jobs that reach other hosts, fail. Use Developer or above for CI.

## Billing

Each job is billed as [sandbox compute](https://docs.archil.com/administration/billing.md) at your plan's rates, from when its sandbox starts
until it stops, metered the same way as any other sandbox. There's no separate CI charge.

Uploads from a job count as [data transfer out of Archil](https://docs.archil.com/administration/billing.md#data-transfer): `actions/cache`
saves, `upload-artifact`, and `docker push` to an outside registry. Downloads aren't charged. To keep cache uploads
down, save caches only from your default branch. For example, with `Swatinem/rust-cache`:

```yaml theme={null}
- uses: Swatinem/rust-cache@v2
  with:
    save-if: ${{ github.ref == 'refs/heads/main' }}
```

## Security

* **The GitHub App can only manage self-hosted runners.** Its single permission is the organization's self-hosted
  runners (read and write). It can't read code, issues, or secrets.
* **Archil's runner service holds no Archil credentials.** It hands your dispatcher short-lived GitHub runner tokens.
  Only your dispatcher holds the sandbox-scoped API key, and it runs in your workspace.
* **Linking needs both sides:** the GitHub user who installs the app must be able to access the installation, and the
  console session that finishes the link must own the API key it started with. A link started from another Archil
  account can't be completed into yours.
* **Public repositories:** if your organization's **Default** runner group allows public repositories, pull requests
  from forks can run jobs on your runners, and the console warns you. Turn off **Allow public repositories** for that
  group in your organization's **Settings → Actions → Runner groups**, unless you want that.

## Disconnect

On the **CI Runners** page, click **Disconnect** next to the organization. This deletes the dispatcher's API key
and its sandbox. Running jobs finish, and new jobs that target Archil labels wait in GitHub's queue until you connect
again. To remove the app itself, uninstall **Archil GitHub App** in your organization's **Settings → GitHub Apps**.

## Troubleshooting

**Jobs stay queued.** Check the organization on the **CI Runners** page:

* If the dispatcher shows **Offline** or **Not running**, click **Repair** or **Set up** to replace it.
* Check the label for typos. GitHub queues a job that names a label no runner has for up to 24 hours, with no error.
* If you use runner groups, make sure the repository can use the **Default** group.

**A command isn't found.** Add a setup action or an `apt-get install` step. See [What a job runs on](#what-a-job-runs-on).

**A job needs `/dev/kvm`.** Run it on a runner with hardware virtualization. Archil sandboxes don't support nested
virtualization.

For anything else, email [support@archil.com](mailto:support@archil.com) with the workflow run URL.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.