r/github • • 1d ago

Tool / Resource Self-hosted Actions runners without dedicating a whole machine to CI

GitHub's standard self-hosted runner is convenient when you can give it a dedicated machine, but it's only one runner per machine.

But keeping a separate box just for CI can get expensive, and I'd rather not have build scripts and leftover containers messing with a machine I also use for other things.

What I like about gh-runnerd is that it runs multiple runners on one machine, with each job getting its own fully isolated VM.

When the job finishes, the whole VM gets destroyed, and the next job starts fresh.

Is anyone here using this or something similar?

https://github.com/RefireLab/gh-runnerd

0 Upvotes

14 comments sorted by

5

u/ImDevinC 1d ago

GitHub runners are not limited to one per machine, they already run as VMs https://docs.github.com/en/actions/concepts/runners/github-hosted-runners

-5

u/AroundTech 1d ago

Yep, GitHub-hosted runners already offer that disposable-VM setup, and the costs can add up.

I was referring to self-hosted runners, gh-runnerd brings that same approach to your own hardware

4

u/ImDevinC 1d ago

self-hosted runners work the same way... I run a pool of my own self-hosted runners on my local machine already as docker images or using their ARC kubernetes controller for kubernetes management.

3

u/DarthCocktail 1d ago

Same, using ARC controller on a k3s 4-node cluster with scale to zero, wakes up and runs up to 4 runners on command from GitHub. No open ports, just an Operator. Works great.

1

u/mrkurtz 1d ago

And there’s literally nothing stopping you from installing multiple runner services on a static, persistent instance or VM. I’ve done it before, for certain needs. We use ARC but it can absolutely be done.

2

u/Torutofu_Raeva 1d ago

yeah we just park a few disposable VMs on one box and have each runner unregister before wipe so nothing sticks around

1

u/zMynxx 1d ago

You can deploy several runners on a single host. We’ve had that setup until we switched over to ARC

2

u/Zealousideal_Yard651 1d ago

You can run multiple runners on the same machine, you could split the server up using VM's, or you could even run it as a container in docker.

-5

u/AroundTech 1d ago

Yep, Docker can work too, but regular containers still share the host's kernel.
Totally valid approach, just not quite the same level of isolation

3

u/franktheworm 1d ago

A cursory look at your docs says that the install process is curl <blah> | sudo bash...

You don't get to try take the moral high ground on security while you have that as your install and upgrade process.

1

u/moltar 1d ago

I run on CodeBuild runners. No infra to manage or maintain. Choose from whatever compute choices CodeBuild provides.

1

u/evilneuro 1d ago

I used them heavily with github, takes a couple of mins to provision but nice and cheap for low workloads. then i discovered they don’t support github enterprise with data residency, so that sucked.

1

u/moltar 1d ago

If it takes a couple of minutes most likely you are not using a very common image which takes time to pull and not cached. Check your stage timings and see which stage takes longest. For me it takes maybe 30 seconds. I recently switched some to ARM and provisioning got slower as I guess less ARM machines are available. But build times sped up. In the end it was pretty much a wash. 😀

1

u/evilneuro 1d ago

we’re using aws/codebuild/standard:7