Self-hosted GitHub Actions runner on Linux

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

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: 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: 4 threads and 16 GB run 2 jobs at once; 8 threads and 32 GB run 4; 16 threads and 64 GB run 8.

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.

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.

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

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.

Can one plan cover a Mac and a Linux machine?

Yes. Each machine takes one slot on your plan. $20/month includes 2 machines; each extra machine is $10/month (Pricing).

Is a self-hosted runner on my server safe?

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.

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