Skip to content

Saving costs with self-hosted runners for GitHub Actions

Self-hosting GitHub Actions runners can provide more control over the environment and potentially reduce costs compared to using GitHub-hosted runners. Here are some solutions for setting up self-hosted runners.

Action Runner Controller

The Action Runner Controller β†— is a Kubernetes operator that automates the deployment and management of GitHub Actions self-hosted runners within a Kubernetes cluster. It handles the scaling and automatic updates of runners, making it a robust choice for teams already using Kubernetes. You can deploy it using Helm charts, and it supports both organization and enterprise runners.

Philipps Terraform module

Philips Terraform module β†— is another approach, leveraging the infrastructure-as-code methodology to manage GitHub Actions runners. This module allows you to provision self-hosted runners on cloud platforms like AWS, using Terraform. It’s a good option if you want to integrate your runner setup into a broader Terraform-managed infrastructure.

Rolling your own

For those who need a highly customized setup, rolling your own runners might be the best approach. This involves setting up a virtual machine or a physical server, installing the necessary software, and configuring it to connect with GitHub Actions. This method offers maximum control over the runner environment but requires more maintenance and setup effort.

RunsOn

RunsOn (this site) is a newer and more streamlined solution for running GitHub Actions runners. It focuses on reducing costs and simplifying the setup process. RunsOn manages the infrastructure for you, providing a hassle-free way to deploy self-hosted runners without the need to manage servers or complex configurations. It’s an excellent choice for teams looking to save on costs while avoiding the complexities of managing their infrastructure.

Each of these solutions has its strengths and is suited to different organizational needs and technical environments. Whether you choose a Kubernetes-based solution, a Terraform module, a custom setup, or a managed service like RunsOn, you can achieve greater flexibility and potentially lower costs by self-hosting your GitHub Actions runners.