How to Install GitLab Runner on Ubuntu?
Last Updated :
05 Jun, 2024
GitLab Runner is a fantastic tool that works like a trusty helper for developers. It takes care of tasks that ensure your software runs smoothly, like testing and deploying. Installing GitLab Runner on your Ubuntu system is like giving yourself a superpower in software development. Automating many repetitive tasks makes your life easier, allowing you to focus on what you do best: writing code.
In this guide, we'll walk through the steps to get GitLab Runner up and running on your Ubuntu 20.04 LTS system. You don't need to be a computer expert to follow along; just have your Ubuntu machine ready, an internet connection, and a cup of coffee if you like.
Prerequisites
Before we start, make sure you have:
- Permission to make changes on your Ubuntu computer.
- Access to the internet.
- A GitLab account.
Step-By-Step Guide to Install Install GitLab Runner on Ubuntu
Step 1: Update Ubuntu Packages
First things first, let's make sure our system is up-to-date. Open your terminal and type:
sudo apt update && sudo apt upgrade
Step 2: Add the GitLab Runner Repository
GitLab Runner isn't included in the usual list of software for Ubuntu. We need to add its special place called a repository.
Install Dependencies
We need to install something called curl to help us with the installation. If you don't have it, type:
sudo apt install -y curl

Add the Repository
Now, let's add the GitLab Runner's repository by running this command:
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash

Step 3: Install GitLab Runner on Ubuntu 20.04 LTS
With the repository added, let's install GitLab Runner. Type:
sudo apt install gitlab-runner

Step 4: Register GitLab Runner
Now, we need to tell GitLab Runner about our GitLab account.
Get Your GitLab Registration Token
Go to your project on the GitLab website, click on Settings > CI/CD, and copy the registration token.
Register the GitLab Runner

Back in your terminal, type:
sudo gitlab-runner register
.png)
Follow the instructions. You'll need to paste your registration token and give a name to your Runner.
Step 5: Start and Enable its Service
Let's make sure GitLab Runner is running and starts automatically when we boot our computer.
Start the service:
sudo gitlab-runner start
Enable auto-start:
sudo gitlab-runner enable
Step 6: Verify Runner Status
To check if GitLab Runner is up and running, type:
sudo gitlab-runner verify

You should see a message saying it's valid, which means it's ready to work.
Uninstallation (optional)
If you want to remove GitLab Runner, here's how:
sudo gitlab-runner stop
sudo apt autoremove --purge gitlab-runner
sudo rm -rf /etc/apt/sources.list.d/runner_gitlab-runner.list
sudo deluser --remove-home gitlab-runner
sudo rm -rf /etc/gitlab-runner
Conclusion
That's it! Now you have GitLab Runner on your Ubuntu system is like having a reliable assistant by your side throughout your software development journey. By automating various tasks in continuous integration and deployment, GitLab Runner streamlines your workflow, saving you time and effort. With GitLab Runner in place, you can focus more on writing quality code and less on manual processes.
Similar Reads
How to install Rider on Ubuntu?
Are you looking to install Rider on your Ubuntu system? Rider, the powerful IDE from JetBrains, is a popular choice for .NET developers seeking a robust development environment on Linux. In this guide, we will provide you with a step-by-step tutorial on how to install Rider on Ubuntu. Whether you ar
3 min read
How to install RubyMine on Ubuntu
RubyMine is an integrated development environment (IDE) that aids productivity in all aspects of Ruby/Rails project development, from creating and debugging code to testing and delivering a finished application. RubyMine is available for macOS, Windows, and Linux, among other platforms. JetBrains' R
2 min read
How To Install Git on Ubuntu 20.04
Git, a popular version control system, is widely used for managing code in software development projects. It tracks changes in code, allowing collaboration and easy reversion to previous versions if needed. This article will outline two methods for installing Git on your Ubuntu system. Table of Cont
3 min read
How to install git-crypt on Ubuntu?
git-crypt encrypts and decrypts data in a git repository in a transparent manner. When you commit a file, it is encrypted, and when you check it out, it is decrypted. With git-crypt, you may freely share a repository that contains both public and private information. git-crypt gracefully degrades, a
1 min read
How to Install Sourcetree on Ubuntu
Managing repositories and tracking changes can sometimes be overwhelming, but with Sourcetree, developers can simplify version control and boost productivity. In this article, we will be installing the Sourcetree application on the Ubuntu system in a step-by-step process. What is Sourcetree?Sourcetr
4 min read
How to Install RawTherapee on Ubuntu?
RawTherapee is application software that allows you to process images in raw image formats, such as those produced by many digital cameras. It is a subset of image editing processes intended specifically at non-destructive post-production of raw photos, with the primary goal of enhancing a photograp
2 min read
How to Install Grafana Loki on Ubuntu?
Loki is a Prometheus-inspired multi-tenant, highly available, and possibly, horizontally scalable log aggregation system solution. A robust logging system called Grafana Loki is made to effectively gather, store, and query logs from several sources through the system. It is made by the software engi
4 min read
How to install Elinks on Ubuntu?
If you are searching for any Text-Based Web Browser for any Linux Distribution like Ubuntu, then the Elinks on Ubuntu will be the best to use. The Elinks Web Browser on Ubuntu can even enhance the Command Line Experience. Not only on Ubuntu OS but the Installation of Elinks can be done on Windows OS
3 min read
How to Install Git on Termux?
We can use Git in our Android mobiles with the help of Termux. Sometimes we need to work with Git but at that time we may need a laptop to work. So we can use Git in our Android mobiles also using the tool Termux. We can easily install this command-line tool on our mobiles. We will use Android 9 in
2 min read
How to Install Deb Files (Packages) on Ubuntu
Installing the application on Windows is an easy task, as we just need to download the .exe file of the application and complete the installation in simple clicks, but the installation of the application on Linux or Ubuntu is quite different from Windows. We need to execute the commands and perform
7 min read