Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Version Control System » Install and Register GitLab Runner on Windows
  • addanewlang
    How to change or add another keyboard language in Windows Server Windows Server
  • rdp error
    The connection was denied because the user account is not authorized for remote login: How to add and remove Remote Desktop Users Windows
  • image 16
    How to Fix Windows Error 0x80070057 Windows
  • Chocolatey Packages
    Create Chocolatey Package: Upgrade Software with Chocolatey Scripts
  • Norton 360 Error
    Norton Autofix identified an issue: Fix Norton 360 Installation has encountered an error 8404 on Windows Anti-Virus Solution
  • Add Nutanix AHV to Veeam
    Full Integration Guide on how to Add Nutanix AHV to Veeam Network | Monitoring
  • Ping 3
    How to convert images from PNG to JPG on WordPress, Windows, and Mac JIRA|Confluence|Apps
  • ACE magic
    How to install Windows Server unto ACEMAGICIAN Mini PC Windows Server

Install and Register GitLab Runner on Windows

Posted on 28/09/202128/03/2024 Christian By Christian No Comments on Install and Register GitLab Runner on Windows
GitLabrunner

In this guide, you will learn how to Install and Register GitLab Runner on Windows. GitLab Runner is an open-source application and it is written in Go. It works with GitLab CI/CD to run jobs in a pipeline. It can be run as a single binary; no language-specific requirements are needed. Please see how to use AWS CodeCommit, Azure DevOps and GitHub integration for Docker and Kubernetes deployment, and how to build your first CI/CD Pipeline in Azure DevOps using ASP.Net Core Application.

You can choose to install the GitLab Runner application on the infrastructure that you own or manage. If you do, you should install GitLab Runner on a machine that’s separate from the one that hosts the GitLab instance for security and performance reasons.

When you use separate machines, you can have different operating systems and tools, like Kubernetes or Docker, on each. You can install GitLab Runner on several different supported operating systems.

Other operating systems may also work, as long as you can compile a Go binary on them. GitLab Runner can also run inside a Docker container or be deployed into a Kubernetes cluster.

Here are some related guides: How to install Git on macOS, How to uninstall Git on macOS, Practical Git use with markdown, how to clone a repository and install software from GitHub on Windows.

Software Development

Some of the tools for software development using continuous methodologies are:

  • Continuous Integration (CI)
  • Continuous Delivery (CD)
  • Continuous Deployment (CD)

GitLab CI is an open-source continuous integration service included with GitLab. GitLab CI/CD can automatically build, test, deploy, and monitor your applications by using Auto DevOps.

Various concepts describe and run your build and deployment and one of which is “GitLab Runner”. First, let’s highlight on the different aspects of GitLab Runner, and then dive into how to Install and Register GitLab Runner on Windows. And also how to start the GitLab runner afterwards.

GitLab Runner officially supported binaries are available for the following architectures as of the time of writing this piece: x86, AMD64, ARM64, ARM, s390x, ppc64le. GitLab Runner officially supports the following operating systems: Linux, Windows, macOS, FreeBSD.

Different types of Runners

There are different types of GitLab runners and they are as follows:

  • Shared Runner
  • Specific Runner
  • Group Runner

Shared Runners are relevant for jobs that have similar requirements, and multiple projects. Rather than having multiple Runners idling for many projects, you can have a single or a small number of Runners that handle multiple projects. This makes it easier to maintain and update them.

Shared Runners process jobs using a fair usage queue. In contrast to specific Runners that use a FIFO queue, this prevents cases where projects create hundreds of jobs which can lead to eating all available shared Runners resources. A Runner that serves all projects is called a shared Runner.

Group Runners are useful when you have multiple projects under one group and would like all projects to have access to a set of Runners. Group Runners process jobs using a FIFO queue.

Install GitLab Runner on Windows

Now, let’s Install and Register GitLab Runner on Windows. To do this, please follow the steps below.

1: Create a folder somewhere in your system, For instance on the C drive. This can be created on any other drive: C:\GitLab-Runner.

Screenshot-2021-09-27-at-14.16.28

2: Download the binary for 64-bit or 32-bit and put it into the folder you created. Upon clicking on the 46-bits, the GitLab runner executable will be downloaded as shown below.

Screenshot-2021-09-27-at-14.22.26

3: Copy the GitLab runner executable that has just been downloaded and paste it in the location that was created. The following assumes you have renamed the binary to GitLab-runner.exe (This step is optional).

Screenshot-2021-09-27-at-14.26.45
Screenshot-2021-09-27-at-14.27.23

Note: Make sure to restrict the Write permissions on the GitLab Runner directory and executable. If you do not set these permissions, regular users can replace the executable with their own and run arbitrary code with elevated privileges. You can verify this by following the steps below.

You can right-click on the GitLab Runner directory, click on Properties and then Security. Ensure the regular users do not have the Write Permission assigned.

4: Run an elevated command prompt as shown below

Screenshot-2021-09-27-at-23.37.13

This will ensure the Command Prompt opens as an Administrator as shown below. Navigate to the GitLab-Runner directory

Screenshot-2021-09-27-at-23.41.29

Run service using Built-in System Account: Now, we have to install the GitLab Runner as a service using the command below.

gitlab-runner.exe install
Screenshot-2021-09-27-at-23.46.58

If you wish to run service using user account, please use the command below and substitute your account details appropirately.

gitlab-runner.exe install --user ENTER-YOUR-USERNAME --password ENTER-YOUR-PASSWORD

Note: When you run .\gitlab-runner.exe install it installs gitlab-runner as a Windows service. You can find the logs in the Event Viewer with the provider name gitlab-runner. You can also view this from PowerShell using the command below.

Get-WinEvent -ProviderName gitlab-runner

View the version of GitLab- Runner Installed

To view the version of the installed GitLab Runner, run the command as shown in the image below. As you can see, it will display the version, OS/Architecture etc.

Screenshot-2021-09-28-at-00.04.49

Start the GitLab Runner Service: To do this, use the command below. From the image below, the installed GitLab-Runner is already running.

gitlab-runner.exe start
Screenshot-2021-09-28-at-00.15.34

Register GitLab Runner

Now that we have installed GitLab Runner, we have to register the GitLab Runner on Windows. Registering a runner is the process that binds the runner with one or more GitLab instances.

After you install the application, you register individual runners, or multiple runners on the same host machine, each with a different configuration, by repeating the register command. Runners are the agents that run the CI/CD jobs that come from GitLab.

When you register a runner, you are setting up communication between your GitLab instance and the machine where GitLab Runner is installed.

  • Runners usually process jobs on the same machine where you installed GitLab Runner. However, you can also have a runner process jobs in a container, in a Kubernetes cluster, or in auto-scaled instances in the cloud.

Before registering a runner, you need the following parameters:

  • Install it on a server separate from where GitLab is installed. (This we have done in the steps above).
  • Obtain a token (These steps will be expanded more later as we progress):
    • For a shared runner, have an administrator go to the GitLab Admin Area and click Overview > Runners
    • For a group runner, go to Settings > CI/CD and expand the Runners section
    • For a project-specific runner, go to Settings > CI/CD and expand the Runners section

Shared Runners are enabled by default as of GitLab 8.2, but can be disabled with the Disable shared Runners button which is present under each project’s Settings ➔ CI/CD page.

Run the command below to Register GitLab-Runner

gitlab-runner.exe register

Next, you will be required to enter your GitLab instance URL (also known as the gitlab-ci coordinator URL) as shown below

Screenshot-2021-09-28-at-00.41.23
Screenshot-2021-09-28-at-00.43.08

Setting up a specific GitLab-Runner

Enter the token you obtained to register the runner. To get your Token, you will need to access your GitLab project as discussed above

Screenshot-2021-09-28-at-00.49.54

Navigate to the following section “Runners” and Expand it as shown below

Screenshot-2021-09-28-at-00.53.45

As you can see, we now have access to the registration token as shown below

Screenshot-2021-09-28-at-00.56.52-1

Enter the Registration Token and also enter a description for the runner. You can change this value later in the GitLab user interface.

Enter the tags associated with the runner, separated by commas. You can change this value later in the GitLab user interface.

Screenshot-2021-09-28-at-01.06.00

Please enter the Runner executor such as: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell: docker. I will be using Shell as shown below.

Screenshot-2021-09-28-at-01.09.11

Now you have successfully installed and registered GitLab runner as shown in the figure above. If your GitLab registration fails, you may want to see this related guide “Panic: Failed to register the GitLab-runner, you may be having network issues“.

Note: If you entered docker as your executor, you’ll be asked for the default image to be used for projects that do not define one in .gitlab-ci.yml. You can enter alpine:latest

Please enter the default Docker image (e.g. ruby:2.1):
alpine:latest

You can see the GitLab Runner configuration in the config.toml file under the GitLab-Runner folder as shown below.

Screenshot-2021-09-28-at-19.33.31

GitLab Runner implements a number of executors that can be used to run your builds in different scenarios.

The executors support different platforms and methodologies for building a project. The table below shows the key facts for each executor which will help you decide which executor to use.

Screenshot-2021-09-28-at-01.13.50
Shell executor: The Shell is the simplest executor to configure. All required dependencies for your builds need to be installed manually on the same machine that GitLab Runner is installed on.

Check if the Runner is activated for the Project

Basically, you will have to follow the same steps as discussed previously. Click on the GitLab project and navigate to Settings > CI/CD and expand the Runners section.

Screenshot-2021-09-28-at-00.49.54

As you can see below, the runner is activated for this project

Screenshot-2021-09-28-at-01.22.04

Nicely done, congratulations. You have successfully followed each and every step needed to Install and Register GitLab Runner on Windows. I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Version Control System Tags:Git, Git GUI, Git OSX, Github, GitLab, GitLab-Runner, Microsoft Windows, Windows 10, Windows 11

Post navigation

Previous Post: Cost Management in Azure Using Cost Analysis Tool
Next Post: GitLab-runner is not recognized as an internal or external command, operable program, or batch file

Related Posts

  • commit trong git 640
    How to uninstall Git from MacOS Mac
  • banner
    How to fix Git always asking for my Username and Password Version Control System
  • git pull error
    Failed to pull image with the policy “always” error from the daemon Version Control System
  • coding
    Git GUI and Gitk won’t open “Missing Tcl / Tk Aqua libraries” Version Control System
  • Fatal Refusing to Merge
    How to Fix Fatal Git Error Refusing to Merge Unrelated Histories Version Control System
  • Screenshot 2022 03 20 at 21.08.50
    How to integrate AWS CodeBuild and AWS CodeCommit to SonarCloud AWS/Azure/OpenShift

More Related Articles

commit trong git 640 How to uninstall Git from MacOS Mac
banner How to fix Git always asking for my Username and Password Version Control System
git pull error Failed to pull image with the policy “always” error from the daemon Version Control System
coding Git GUI and Gitk won’t open “Missing Tcl / Tk Aqua libraries” Version Control System
Fatal Refusing to Merge How to Fix Fatal Git Error Refusing to Merge Unrelated Histories Version Control System
Screenshot 2022 03 20 at 21.08.50 How to integrate AWS CodeBuild and AWS CodeCommit to SonarCloud AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • addanewlang
    How to change or add another keyboard language in Windows Server Windows Server
  • rdp error
    The connection was denied because the user account is not authorized for remote login: How to add and remove Remote Desktop Users Windows
  • image 16
    How to Fix Windows Error 0x80070057 Windows
  • Chocolatey Packages
    Create Chocolatey Package: Upgrade Software with Chocolatey Scripts
  • Norton 360 Error
    Norton Autofix identified an issue: Fix Norton 360 Installation has encountered an error 8404 on Windows Anti-Virus Solution
  • Add Nutanix AHV to Veeam
    Full Integration Guide on how to Add Nutanix AHV to Veeam Network | Monitoring
  • Ping 3
    How to convert images from PNG to JPG on WordPress, Windows, and Mac JIRA|Confluence|Apps
  • ACE magic
    How to install Windows Server unto ACEMAGICIAN Mini PC Windows Server

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,839 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.