To install and run GitLab Runner on Windows you need:
- Git installed
- A password for your user account, if you want to run it under your user account rather than the Built-in System Account
Create a folder somewhere in your system, ex.:
You can download a binary for every available version as described in Bleeding Edge - download any other tagged release.
Administrator/elevated command prompt (WindowsKey + X then select Command Prompt (Admin)).
Register the Runner (see Runners documentation to learn how to obtain a token):
C:\Windows\system32>cd C:\GitLab-Runner C:\GitLab-Runner>gitlab-runner register Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): https://gitlab.com Please enter the gitlab-ci token for this runner: xxxx Please enter the gitlab-ci description for this runner: [xxxx]: Please enter the gitlab-ci tags for this runner (comma separated): windows Whether to run untagged builds [true/false]: [false]: true Registering runner... succeeded Please enter the executor: docker+machine, kubernetes, docker, docker-ssh, parallels, virtualbox, shell, ssh, docker-ssh+machine: shell Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
Install the Runner as a service and start it. You can either run the service using the Built-in System Account (recommended) or using a user account.
Run service using Built-in System Account
gitlab-runner install gitlab-runner start
Run service using user account
You have to enter a valid password for the current user account, because it's required to start the service by Windows:
gitlab-runner install --user ENTER-YOUR-USERNAME --password ENTER-YOUR-PASSWORD gitlab-runner start
See the troubleshooting section if you encounter any errors during the Runner installation.
(Optional) Update Runners
C:\GitLab-Runner\config.tomlto allow multiple concurrent jobs as detailed in advanced configuration details.
Voila! Runner is installed, running, and will start again after each system reboot. Logs are stored in Windows Event Log.
Stop the service (you need elevated command prompt as before):
cd C:\GitLab-Runner gitlab-runner stop
Start the service:
From elevated command prompt:
cd C:\GitLab-Runner gitlab-runner stop gitlab-runner uninstall cd .. rmdir /s GitLab-Runner
Make sure that you read the FAQ section which describes some of the most common problems with GitLab Runner.
If you encounter an error like The account name is invalid try to add
.\ before the username:
gitlab-runner install --user ".\ENTER-YOUR-USERNAME" --password "ENTER-YOUR-PASSWORD"
If you encounter a The service did not start due to a logon failure error while starting the service, please look in the FAQ to check how to resolve the problem.
If you don't have a Windows Password, Runner's service won't start but you can use the Built-in System Account.
If you have issues with the Built-in System Account, please read How to Configure the Service to Start Up with the Built-in System Account on Microsoft's support website.