Introduction

In this article, I’ll show you how to configure a self managed GitLab Runner to run Terraform/OpenTofu scripts on Proxmox.

Installation

VM setup

The first step is to create and configure a VM on Proxmox that will serve as our GitLab Runner. I chose Ubuntu 24.04 as the operating system and installed Docker as an additional package. Instructions to install Docker on Ubuntu can be found here.

GitLab Runner

Now that the VM is configured, the next step is to install the latest version of GitLab Runner on it.

# Add the official GitLab repository
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash

# Install the latest version of GitLab Runner
sudo apt install gitlab-runner

Next, we need to register the runner. Go to the GitLab Group where you want to configure the runner, then navigate to Build > Runners and click “New group runner”. Follow the instructions to complete the registration. Finally you will need to run the provided gitlab-runner register command on the VM. Make sure to run the gitlab-runner register command with sudo!

After registering the GitLab Runner, we can configure it as a systemd service.

sudo gitlab-runner install --user <user-to-run-the-service>
sudo gitlab-runner start

That’s it! When you head back to Build > Runners, you should see your runner listed with an online status.

Conclusion

In this article, we covered how to set up a VM on Proxmox to serve as a GitLab Runner. The next step is to configure a CI/CD pipeline that makes use of this runner to automate infrastructure deployments.