Self-hosted CI runners

A self-hosted runner gives you a fixed monthly price for unlimited build minutes. Plan about 2 vCPU and 4 GB per parallel job: S8 runs one or two jobs, D16 runs two heavy jobs on dedicated threads.

Recommended start: S8, $6.35/mo

How do I size a CI runner?

Size by how many jobs run at the same time and what one job needs. A typical web project build (install dependencies, compile, run unit tests) uses 2 vCPU and 2~4 GB; a large TypeScript monorepo, a Rust workspace or a Java build with Gradle can use 4 vCPU and 6~8 GB.

WorkloadParallel jobsPlan
Small team, lint and unit tests2S8
Native Arm64 builds and images2A8
Compiled languages, busy every hour1~2D8
Team of 10~20 with Docker image builds2~4D16
Monorepo with many parallel test shards4~8D32

Set concurrency to what the memory allows, not to the core count. A runner that swaps during a build is slower than one that queues the next job.

Why are dedicated threads better for builds?

Compilers and test suites hold every core at full load for minutes at a time, which is exactly the pattern shared cores are not built for. On Dedicated CPU plans every vCPU is reserved for you, so build times are repeatable and a slow build means a slow change, not a busy neighbour.

The Shared vCPU family is still good value for light pipelines: linting, small test suites and deploy jobs that spend most of their time waiting on the network. The Arm family gives a full core per vCPU and builds linux/arm64 images natively, which is many times faster than emulating Arm with QEMU on an x86 runner.

Place the runner in the same region as your Git server and container registry; incoming clones and image pulls are free, but distance still adds time to every job.

Plans that fit

Sizes picked for this project, smallest first. Prices are per month; the order total is the shortest term that reaches $40.

PlanWhySizePer monthOrder from
S8Two light jobs: lint, unit tests, deploys4 vCPU, 8 GB RAM, 80 GB NVMe$6.35$76.20 for 12 months
A8Native Arm64 builds and multi-arch images4 vCPU, 8 GB RAM, 80 GB NVMe$7.85$47.10 for 6 months
D8One or two compile-heavy jobs with steady timing2 vCPU, 8 GB RAM, 80 GB NVMe$25.85$77.55 for 3 months
D16Two to four parallel jobs for a team of 10~204 vCPU, 16 GB RAM, 160 GB NVMe$51.95$51.95 for 1 month
D32Monorepos with many parallel test shards8 vCPU, 32 GB RAM, 240 GB NVMe$83.45$83.45 for 1 month

How do I install a GitLab runner?

On Ubuntu 24.04, add the official repository and register the runner with the token from your project or group settings:

curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | bash
apt -y install gitlab-runner docker.io
gitlab-runner register --url https://gitlab.example.com --token glrt-XXXX --executor docker --docker-image alpine:3.20

Then set concurrency in /etc/gitlab-runner/config.toml:

concurrent = 2
[[runners]]
  [runners.docker]
    memory = "3g"
    cpus = "2"
    pull_policy = ["if-not-present"]

Restart with gitlab-runner restart. If you also want to host the Git server itself, the GitLab CE image sets it up, but keep the runner on a separate server so builds never slow down the web interface.

How do I set up runners for other Git platforms?

Every major platform has a self-hosted runner that works the same way: a small agent polls for jobs and runs them in containers or directly on the host.

  • GitHub Actions: download the runner from the repository or organisation settings into /home/runner/actions-runner, run ./config.sh with the token, then ./svc.sh install to create a systemd service. Add a label such as cheapvps-arm64 and target it with runs-on.
  • Forgejo and Gitea: use forgejo-runner or act_runner, register with register --instance and set capacity in its config file.
  • Woodpecker CI: run the agent as a container with WOODPECKER_MAX_WORKFLOWS set to your concurrency.

Install Docker first on all of them: the Docker CE image saves that step.

How do I keep a runner disk from filling up?

Build caches and old images are the reason most runners stop. Clean them on a schedule and the disk stays stable.

  • Add a daily cron: docker system prune -af --filter "until=48h" and docker builder prune -af --filter "until=48h".
  • Keep dependency caches (npm, pip, Cargo, Gradle) in the CI cache feature, not in ever-growing host folders.
  • Watch free space with df -h /var/lib/docker; alert at 80% (see monitoring basics).

Disk sizes are fixed per plan, so choose it with the cache in mind: D16 has 4 vCPU, 16 GB RAM, 160 GB NVMe, which holds several large images plus caches.

How do I keep runners secure?

A CI runner executes whatever code the pipeline gives it, so treat it as a machine that runs untrusted input.

  • Do not attach a persistent runner to public repositories that accept pull requests from forks. A malicious pull request could run commands on your server and read cached secrets.
  • Use the Docker executor, not the shell executor, so each job starts in a clean container. Avoid privileged = true unless a job really needs Docker-in-Docker.
  • Store deploy keys and registry passwords in the CI secret store, scoped to protected branches.
  • Rotate the runner registration token if the server is rebuilt or a team member leaves.
  • Keep SSH key-only and the firewall closed; runners poll outward and need no open inbound ports.

What traffic does a CI runner use?

Runners mostly download: Git clones, package installs and base images all arrive as incoming traffic, which is free. Outgoing traffic comes from pushing built images and artefacts.

A team pushing a 300 MB image 30 times a day uploads about 270 GB a month, well inside 20 TB on D16 in Europe. In North America and Asia-Pacific the same plan includes 2 TB, still plenty for most teams; push only changed layers and keep images small with multi-stage builds.

What does a self-hosted runner cost?

D16 is $51.95 a month, can be paid one month at a time, and runs as many build minutes as you can fit in a month. S8 costs $6.35 a month as $76.20 for 12 months for teams with light pipelines. Arm builds on A8 cost $7.85 a month. Runners usually do not need the backup add-on: their state lives in Git and the registry, and a rebuild plus re-registration restores one in minutes.

CI runners, answered

Can one runner serve several projects?

Yes. Register it at group or organisation level, or register several runner entries on the same server, and control the total with the concurrent or capacity setting.

Can I build Docker images inside CI jobs?

Yes. Mount the host Docker socket for trusted projects, or use Docker-in-Docker or rootless BuildKit for stronger isolation.

Does an Arm runner build x86 images?

It can through QEMU emulation, but slowly. Run one x86 runner and one Arm runner and let each build its own architecture natively.

Can runners scale up and down on demand?

Servers are ordered for prepaid terms from the console, without an API, so autoscaling is not available. A fixed runner sized for normal load, with jobs queueing at peaks, is the cost-effective pattern here.

Which OS should a runner use?

Ubuntu 24.04 is the best documented for GitLab Runner and GitHub Actions runners, and the Docker CE image adds Docker on top.

Build it on CheapVPS

Pick the plan, a city near your users and the image, then pay the order in crypto.