Appearance

Language

Mastering AI agents

GitHub Actions Self-Hosted Runner on Oracle Cloud Free ARM (2026): arm64 CI Setup Guide

Register an Oracle Cloud Always Free Ampere A1 instance (Ubuntu 24.04 ARM) as a GitHub Actions self-hosted runner: download the linux-arm64 runner, register it with config.sh, install it as a service with svc.sh, target it with runs-on labels, and limit access with a private repo, a dedicated user and file permissions.

Kelvin Wang · · 10 min read

Key points

  1. GitHub doesn't charge for self-hosted runner usage and it doesn't draw from your plan's included compute; the machine and its upkeep are yours.
  2. GitHub recommends self-hosted runners only for private repositories: on a public repo, anyone can open a pull request that runs code on your machine.
  3. Run the runner as a dedicated Linux user and restrict the files and credentials it can read. The runner application updates itself; the OS and other software need your attention.
  4. On ARM, Docker images need a linux/arm64 variant; otherwise you are stuck with slow emulation.

I have an Oracle A1 instance in Tokyo (ap-tokyo-1) running Claude Code Remote Control under systemd, with a fine-grained token for GitHub access. An always-on ARM machine can also run GitHub Actions jobs, but sharing it with existing services brings risks to consider first.

The steps below follow official documentation and use Ubuntu 24.04 ARM as the example. They have not been tested on this instance. Replace every <...> with your own value.

Why turn an Oracle A1 instance into a GitHub Actions runner?

Two reasons: CI for private repos that doesn’t eat into your allowance, and a native arm64 environment.

  • Self-hosted runners don’t draw from GitHub’s allowance. GitHub’s billing docs say self-hosted runner usage is free and doesn’t reduce your plan’s included compute usage9. GitHub-hosted runners on private repos draw from that included usage and are then billed per minute10. The trade-off: you pay for and maintain the machine yourself2.
  • Native arm64, no emulation. A1 is an ARM machine, so what you build is arm64 to begin with. Docker’s docs warn that emulating arm64 with QEMU on an x64 machine can be much slower than a native build13.

Public repos are a different story. GitHub’s standard hosted runners are free and unlimited for public repos, including arm64 Linux labels such as ubuntu-24.04-arm10. This setup is mainly for private repos.

GitHub-hosted arm64 runnerSelf-hosted runner on Oracle A1
Public repoFree and unlimitedGitHub advises against it
Private repoDraws from included compute, then billed per minuteFree on GitHub's side, no allowance used
Environment per jobA fresh VM for each jobReused by default; ephemeral de-registers the runner but needs separate cleanup
Software and updatesGitHub maintains the imageThe runner app self-updates; everything else is yours

What do you need before you start?

  1. An A1 instance with outbound internet access. GitHub’s network requirements are outbound HTTPS on port 443 and at least 70 kbps up and down; the runner connects to GitHub to receive jobs3. For getting the instance and its network set up, see the further reading at the end.

  2. Admin rights on the repo. For a personal repo you must be the owner; for an organization repo, an organization owner or someone with admin access to the repo1.

  3. A supported OS. GitHub’s Linux list includes Ubuntu 20.04 or later. On architecture, the docs mark ARM64 on Linux as public preview3.

  4. A dedicated Linux user. Not the account you log in with or that runs other services; the security section explains why:

    sudo useradd -m -s /bin/bash gha-runner
    sudo chmod 700 /home/gha-runner
    sudo -l -U gha-runner

    The last command should report that this user cannot run sudo. Also check that it is not in the docker group or another group that grants host administration privileges. You still need to check whether it can read other services’ home directories and credentials.

How do you download and register the linux-arm64 runner?

  1. Open the new-runner page on GitHub. Repo main page → Settings → Actions in the left sidebar → Runners → New self-hosted runner1.

  2. Pick Linux and ARM64. The page lists the full download, checksum, extract and register commands for the OS and architecture you choose.

  3. Switch to the dedicated user, download and verify the file. Copy the runner version and SHA-256 from the page. If verification fails, stop before extracting:

    sudo -iu gha-runner
    mkdir actions-runner && cd actions-runner
    curl -fL -o "actions-runner-linux-arm64-<VERSION>.tar.gz" "<DOWNLOAD_URL_FROM_THE_PAGE>" && \
    echo "<SHA256>  actions-runner-linux-arm64-<VERSION>.tar.gz" | sha256sum -c - && \
    tar xzf "./actions-runner-linux-arm64-<VERSION>.tar.gz"
  4. Run config.sh with the registration token. The page generates the token, and it expires after one hour1. You can add custom labels with --labels, comma-separated6:

    ./config.sh --url https://github.com/<OWNER>/<REPO> --token <RUNNER_TOKEN> --labels oracle-a1
  5. Run it once by hand to check the connection. When you see Connected to GitHub and Listening for Jobs, it worked, and the runner shows up in the repo’s Runners list1. Stop it with Ctrl+C:

    ./run.sh

How do you keep the runner running after a reboot?

run.sh stops when you close the terminal. Registration leaves an svc.sh script in the folder; use it to install the runner as a systemd service4.

  1. Leave the runner account and open a root shell from your admin account. The runner’s home directory has mode 700, so your admin account needs sudo to enter it:

    exit
    sudo -i
    cd /home/gha-runner/actions-runner
  2. Install and start the service, then leave the root shell. The user name after install is the account the service runs as4:

    ./svc.sh install gha-runner
    ./svc.sh start
    ./svc.sh status
    exit
  3. Stop needrestart from restarting the runner mid-job. On Debian-based systems such as Ubuntu with needrestart enabled, a package upgrade can restart the runner service. GitHub gives a one-line config to make it skip the runner4:

    echo '$nrconf{override_rc}{qr(^actions\.runner\..+\.service$)} = 0;' | sudo tee /etc/needrestart/conf.d/actions_runner_services.conf

To stop or remove the service, open a root shell, enter the runner directory, then use ./svc.sh stop and ./svc.sh uninstall. Stop it before uninstalling, and leave the root shell when you are done4.

How does a workflow target this runner?

Self-hosted runners get three kinds of labels automatically: self-hosted, the OS (linux) and the architecture (ARM64)5. List labels in runs-on and only a runner that has all of them takes the job. Labels are case-insensitive56.

# .github/workflows/arm64-build.yml
name: arm64 build

on:
  push:
    branches: [main]
  workflow_dispatch:

permissions:
  contents: read

jobs:
  build:
    runs-on: [self-hosted, linux, ARM64]
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false
      - name: Check architecture
        run: uname -m
      - name: Build
        run: make build

On A1, uname -m prints aarch64. Replace make build with your project’s build command. This job only needs to read the repo, so it gives GITHUB_TOKEN read-only access and does not retain Git credentials after checkout716. If you registered with oracle-a1, use [self-hosted, linux, ARM64, oracle-a1]; this targets only your machine if no other runner has that label.

If no online, idle runner matches the labels, the job stays queued, and fails after 24 hours in the queue3. So when the instance is down or the service has died, jobs don’t error right away; they sit in Queued.

What are the security risks of a self-hosted runner?

The GitHub-hosted arm64 runners compared above use a fresh VM for each job. Self-hosted runners reuse their environment by default: untrusted workflow code can persist on the machine and affect later jobs710.

Private repos aren’t fully safe either: anyone who can fork and open a pull request (usually anyone with read access) can run code on the runner and reach secrets and the GITHUB_TOKEN7. What you can do is limit the damage:

  • Run the runner as a dedicated user. If gh stores a token in the Claude Code user’s home directory, a workflow running as that user may be able to read it. Separate accounts also need restrictive home directory and credential permissions, with no sudo or other path to elevated privileges for the runner. Creating a user does not automatically make other services’ files unreadable.
  • Limit the credentials the runner can reach. Check private SSH keys, API tokens and access to sensitive services, and give workflows only the permissions they need7. You can store deployment credentials in Actions secrets and expose them only to the jobs that need them. A compromised persistent runner may still steal those secrets when a later job uses them; secret storage does not replace execution isolation.
  • Don’t casually add the runner user to the docker group. Docker’s docs state that the docker group grants root-level privileges15. Adding the runner user to that group gives workflows access to root privileges on the host.
  • Ephemeral runners still need cleanup. Register with --ephemeral and GitHub de-registers the runner after one job. That does not remove programs or data from disk: clean or rebuild the environment separately before registering again37.

How do you update and remove the runner?

  • The runner application updates itself. By default it updates when a job is assigned, or within a week of a release if it gets no jobs3.
  • The OS and everything else is on you. GitHub only updates the runner application2; Ubuntu packages, Docker and build tools need your own sudo apt update && sudo apt upgrade.
  • If you disable auto-update, upgrade within 63 days. A runner registered with --disableupdate stops getting jobs if it isn’t updated within 63 days of a newer version becoming available for updates, and immediately when a critical security update is required3. Leave auto-update on unless you need to manage versions yourself.
  • Runners offline for 14 days are removed. A runner that hasn’t connected to GitHub Actions for more than 14 days is removed automatically; for ephemeral runners it’s 1 day8. After a long outage, register again.
  • Start removal on GitHub. Repo Settings → Actions → Runners → click the runner → Remove. The page gives a removal command with a time-limited token; running it on the machine also deletes the config files and the service8.

What’s different about running CI on ARM?

  • Docker images need an arm64 variant. With a multi-platform image, Docker picks the variant that matches the host; a linux/amd64-only image won’t run on an arm64 host without emulation13. Check that your base images and service containers ship linux/arm64.
  • Docker container actions too. They only run on Linux runners, and a self-hosted runner needs Docker installed11. The image runs on your A1, so it needs an arm64 variant as well. Docker Engine itself supports Ubuntu 24.04 on arm6414.
  • Read an action’s docs before you rely on it. Not every action is tested on ARM64 Linux, especially ones that download prebuilt binaries. If the README doesn’t mention it, try it once through workflow_dispatch.
  • Nothing is preinstalled. GitHub-hosted runner images come with a long list of languages and tools; a self-hosted runner has only what you install2. Install what your workflows need on the machine, or install it in a step.

What should you watch on a 2 OCPU / 12 GB instance?

  • One job per runner process at a time. GitHub only assigns jobs to online, idle runners3. Multiple runner processes on one machine may run jobs at the same time, sharing CPU and memory with each other and with services such as Claude Code.
  • Disk fills up over time. Docker images and build caches stay on the machine. Always Free includes 200 GB of boot and block volume storage combined12, so you can add space when a 50 GB boot volume runs out.
  • Running CI doesn’t protect the instance from reclamation. Oracle may reclaim an Always Free instance when all its idle conditions hold over 7 days: 95th-percentile CPU utilization under 20%, network utilization under 20% and, for A1, memory utilization under 20%12. Occasional CI jobs do not guarantee that the instance stays above those thresholds.

FAQ

Can one machine serve several repos?

A repository-level runner serves one repo; an organization-level runner can serve several repos in the organization2. Repos under a personal account each need a separate runner installation directory, registration and service. These services can accept jobs at the same time, so assess both resource use and permissions.

Does the runner need a static IP or open firewall ports?

GitHub only lists outbound requirements: the runner connects to GitHub for jobs and the host must reach port 443 outbound; the docs don’t ask for inbound ports3. You only need to add the instance’s IP somewhere if your organization uses an IP allow list3.

What if Oracle reclaims the instance?

Remove the old runner on GitHub (Force remove if the machine is gone), install the required tools on the new instance, and register it with the labels your workflows use8. With matching labels and build tools, workflows usually need no changes. Keep any artifacts or data you need somewhere other than the runner’s local disk.

Go deeper How to Get an Oracle Cloud Free ARM Instance in 2026: Claude Code 24/7 and a Git Repo Workflow The A1 grab script, networking, a reserved IP, and connecting the instance to GitHub.

Sources

  1. 1. Adding self-hosted runners · GitHub Docs · checked 2026-11-13
  2. 2. Self-hosted runners · GitHub Docs · checked 2026-11-13
  3. 3. Self-hosted runners reference · GitHub Docs · checked 2026-11-13
  4. 4. Configuring the self-hosted runner application as a service · GitHub Docs · checked 2026-11-13
  5. 5. Using self-hosted runners in a workflow · GitHub Docs · checked 2026-11-13
  6. 6. Using labels with self-hosted runners · GitHub Docs · checked 2026-11-13
  7. 7. Secure use reference · GitHub Docs · checked 2026-11-13
  8. 8. Removing self-hosted runners · GitHub Docs · checked 2026-11-13
  9. 9. GitHub Actions billing · GitHub Docs · checked 2026-11-13
  10. 10. Choosing the runner for a job · GitHub Docs · checked 2026-11-13
  11. 11. About custom actions · GitHub Docs · checked 2026-11-13
  12. 12. Always Free Resources · Oracle Cloud Infrastructure Documentation · checked 2026-11-13
  13. 13. Multi-platform builds · Docker Docs · checked 2026-11-13
  14. 14. Install Docker Engine on Ubuntu · Docker Docs · checked 2026-11-13
  15. 15. Linux post-installation steps for Docker Engine · Docker Docs · checked 2026-11-13
  16. 16. actions/checkout · GitHub · checked 2026-11-13

About the author

Kelvin Wang

Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.

More about me