How I Set Up GitLab Runner on My Raspberry Pi 4 (And You Can Too)
Created at 2025-01-07 Updated at 2025-02-07 - 3 min. read
How I Set Up GitLab Runner on My Raspberry Pi 4 (And You Can Too!)
I was setting up GitLab Runner on my DigitalOcean (DO) instance when it suddenly hit me—I have a Raspberry Pi 4 just sitting there! Why not put it to good use?
If you’re like me and love tinkering with tech, you’ll be happy to know that setting up GitLab Runner on an RPi is totally doable. There are three major ways to install GitLab Runner:
- Shell
- Docker
- Kubernetes
At first, I went with Docker since RPi supports it now, but I ran into a snag—there was no ARM64 image for GitLab Runner. So, I had to pivot and go with the shell installation instead. Let me walk you through the process!
Step 1: Install Git
First things first, let’s install Git. It’s a simple one-liner:
1 | sudo apt install git |
Step 2: Install Docker
Docker is great for managing containers, so let’s get it installed on our RPi:
1 | # Download script and start installation |
Step 3: Install GitLab Runner
Now, let’s install GitLab Runner itself.
First, check the current OS version:
1 | cat /etc/os-release |
Next, set up the repository and install GitLab Runner:
1 | curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo os=debian dist=bullseye bash |
Step 4: Register the Runner
Now comes the fun part—registering the runner! Get the token from your GitLab group runner and run:
1 | sudo gitlab-runner register |
When prompted, enter docker as the executor.
Step 5: Configure the Runner for Docker-in-Docker (DinD)
If you want your runner to support Docker-in-Docker (DinD), add this configuration:
1 | [runners.docker] |
🎉 GitLab Runner is Now Ready! 🎉
And that’s it! You now have a fully functional GitLab Runner on your Raspberry Pi. Whether you’re automating builds, running CI/CD pipelines, or just experimenting, this setup will serve you well.
Have any questions or ran into an issue? Drop a comment below, and let’s troubleshoot together! 🚀