GitHub Actions self-hosted runner setup on Linux

Run GitHub Actions jobs on a Linux server, a home lab box or a Linux desktop, on x64 or ARM64.

Run one command on any 64-bit Linux with systemd, open the setup link, sign in with GitHub and pick repositories. Then set runs-on: [self-hosted, Linux, codemany]. Codemany runs as a systemd user service, so it keeps running without a screen and after you log out, and each job gets a fresh single-use runner.

What you need

  • Any 64-bit Linux with systemd and glibc, on x86-64 or ARM64: Ubuntu 22.04 or 24.04, Debian 12 or newer, Fedora, and others.
  • A GitHub account that can add runners to the repo: a repo admin, or an organization owner.
  • Room for the jobs: each job gets 4 threads and 4 GB, so 8 threads and 16 GB run 2 jobs at once; 16 threads and 32 GB run 4; 32 threads and 64 GB run 8. We run ours on this mini PC (Ryzen 7, 32 GB, 1 TB).

Install with one command

  1. Install

    Run this on the machine:

    curl --proto '=https' --tlsv1.2 -fsSL https://codemany.com/install.sh | sh
  2. Print the setup link

    Run codemany setup-link and open the link in a browser on any computer on your network.

  3. Sign in and pick repositories

    Sign in with GitHub and pick repositories, as on a Mac. Your 14-day free trial starts with no card.

  4. Done

    Codemany's background service starts by itself.

On a Linux desktop, you can install the app instead from the download page (Codemany for Linux).

Install from the apt repository

On Debian and Ubuntu, the apt repository keeps Codemany updated with apt upgrade. Check that the key's fingerprint is 92EA E8F4 E140 E71F E883 C291 DBC1 D871 7AE5 E521:

curl --proto '=https' --tlsv1.2 -fsSLo codemany.gpg \
  https://codemany.com/download/linux/apt/codemany-archive-keyring.gpg
gpg --show-keys --with-colons codemany.gpg | grep -qx 'fpr:::::::::92EAE8F4E140E71FE883C291DBC1D8717AE5E521:' \
  && sudo install -m 644 codemany.gpg /usr/share/keyrings/codemany-archive-keyring.gpg \
  || echo "codemany.gpg is not Codemany's key: stop" >&2
echo "deb [signed-by=/usr/share/keyrings/codemany-archive-keyring.gpg] https://codemany.com/download/linux/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/codemany.list
sudo apt update && sudo apt install codemany   # and codemany-desktop on a desktop

Set up a headless server

  • Over SSH: forward the port with ssh -L 18825:127.0.0.1:8825 you@server, then run codemany setup-link --port 18825 on the server and open the link on your computer.
  • In a terminal only: codemany setup --target your-org/your-repo --token-from-gh, then codemany install-service.
  • A plan without a screen: codemany license activate --owner ID takes a slot on an account's plan.

Codemany runs as a systemd user service and keeps running after you log out.

No svc.sh install or svc.sh status

GitHub's runner on its own asks you to run config.sh, then svc.sh install and svc.sh status. With Codemany you skip those. On a server, the one-command install and the .deb run codemany install-service, which writes a systemd user service (~/.config/systemd/user/codemany.service), enables and starts it. systemd restarts it if it exits, and Codemany starts each job's runner itself.

Check on it with codemany status or systemctl --user status codemany.

Send a workflow to Linux

Add Linux so the job doesn't land on a Mac you also run Codemany on:

name: test
on: [push]
jobs:
  test:
    runs-on: [self-hosted, Linux, codemany]
    steps:
      - uses: actions/checkout@v4
      - run: make test

Linux runners also carry X64 or ARM64. Jobs use the tools installed on the machine; docker appears only when Docker is installed. Every label: Advanced › Runner labels.

Cache and disk cleanup

Each job's runner folder is wiped after the job, so build leftovers don't pile up. Each runner budgets 15 GB of disk, and 20 GB stay free for the system.

Downloads from actions/setup-* steps stay in a shared tool cache at ~/.codemany/toolcache. Codemany prunes it past 20 GB, oldest first, only while no job runs. Pre-warm fills it with Linux builds of the Go, Node and Python versions your workflows ask for (Tools and caching).

Run and maintain it

  • Logs: journalctl --user -u codemany. Health: codemany doctor.
  • Restart without cutting a job short: codemany pause --wait && systemctl --user restart codemany && codemany resume.
  • Uninstall: codemany uninstall-service, remove /usr/local/bin/codemany (or sudo apt remove codemany), then rm -rf ~/.codemany ~/.local/share/com.codemany.cli.

More: Machines › Add a Linux server and Advanced › Linux setup details.

Questions

How do I set up a GitHub Actions self-hosted runner on Linux?

Run the one-line install, open the link codemany setup-link prints, sign in with GitHub and pick repositories. Then set runs-on: [self-hosted, Linux, codemany] in your workflow.

Do I need to run svc.sh install or svc.sh status?

No. Codemany installs and starts its own systemd user service, and that service starts a fresh runner for each job. Check it with systemctl --user status codemany or codemany doctor.

Does it run on Linux ARM64, like a Raspberry Pi 5 with Ubuntu?

Yes. Codemany runs on any 64-bit Linux with systemd and glibc, x86-64 or ARM64, so a Raspberry Pi 5 with 64-bit Ubuntu qualifies. Runners there carry the ARM64 label, and codemany capacity prints how many jobs fit at once.

How does it clean up caches and disk?

Each job's runner folder is wiped after the job. The shared tool cache for actions/setup-* downloads is pruned past 20 GB, oldest first, while no job runs.

Does it keep running after I log out?

Yes. Codemany runs as a systemd user service that keeps running after you log out.

Can I use a Linux desktop instead of a server?

Yes. Install the desktop app from the download page. It has one window with Overview, Runs, Machines, Repositories, Plan & Billing, This machine and Account.

What does a self-hosted runner cost with Codemany?

$20/month includes 2 machines, Mac or Linux; each extra machine is $10/month. The first 14 days are free, with no card (Pricing).

Is a GitHub Actions self-hosted runner on my server secure?

A self-hosted runner is not a sandbox. Public repos are off unless you turn one on, and each job gets a fresh runner. Read Runner security.

Read next: self-hosted runner on a Mac, single-use runners and cutting GitHub Actions costs.

Also see: Linux runners, a VM per job and a full runner disk.