gitlab.com/jfprevost/gitlab-runner-notlscheck@v11.11.4+incompatible/docs/install/windows.md (about) 1 --- 2 last_updated: 2017-10-09 3 --- 4 5 # Install GitLab Runner on Windows 6 7 To install and run GitLab Runner on Windows you need: 8 9 - Git installed. 10 - A password for your user account, if you want to run it under your user 11 account rather than the Built-in System Account. 12 13 ## Installation 14 15 CAUTION: **Important:** 16 With GitLab Runner 10, the executable was renamed to `gitlab-runner`. If you 17 want to install a version prior to GitLab Runner 10, [visit the old docs](old.md). 18 19 1. Create a folder somewhere in your system, ex.: `C:\GitLab-Runner`. 20 1. Download the binary for [x86][] or [amd64][] and put it into the folder you 21 created. Rename the binary to `gitlab-runner.exe`. 22 You can download a binary for every available version as described in 23 [Bleeding Edge - download any other tagged 24 release](bleeding-edge.md#download-any-other-tagged-release). 25 1. Run an [elevated command prompt][prompt]: 26 1. Press <kbd>Windows</kbd> key or click **Start** button. 27 1. Type `PowerShell`. 28 1. Right-click `Windows PowerShell`, and then select `Run as administrator`. 29 1. [Register the Runner](../register/index.md). 30 1. Install the Runner as a service and start it. You can either run the service 31 using the Built-in System Account (recommended) or using a user account. 32 33 **Run service using Built-in System Account** 34 35 ```powershell 36 gitlab-runner install 37 gitlab-runner start 38 ``` 39 40 **Run service using user account** 41 42 You have to enter a valid password for the current user account, because 43 it's required to start the service by Windows: 44 45 ```powershell 46 gitlab-runner install --user ENTER-YOUR-USERNAME --password ENTER-YOUR-PASSWORD 47 gitlab-runner start 48 ``` 49 50 See the [troubleshooting section](#troubleshooting) if you encounter any 51 errors during the Runner installation. 52 53 1. (Optional) Update Runners `concurrent` value in `C:\GitLab-Runner\config.toml` 54 to allow multiple concurrent jobs as detailed in [advanced configuration details](../configuration/advanced-configuration.md). 55 Additionally you can use the advanced configuration details to update your 56 shell executor to use Bash or PowerShell rather than Batch. 57 58 Voila! Runner is installed, running, and will start again after each system reboot. 59 Logs are stored in Windows Event Log. 60 61 ## Update 62 63 1. Stop the service (you need [elevated command prompt][prompt] as before): 64 65 ```powershell 66 cd C:\GitLab-Runner 67 gitlab-runner stop 68 ``` 69 70 1. Download the binary for [x86][] or [amd64][] and replace runner's executable. 71 You can download a binary for every available version as described in 72 [Bleeding Edge - download any other tagged release](bleeding-edge.md#download-any-other-tagged-release). 73 74 1. Start the service: 75 76 ```powershell 77 gitlab-runner start 78 ``` 79 80 ## Uninstall 81 82 From [elevated command prompt][prompt]: 83 84 ```powershell 85 cd C:\GitLab-Runner 86 gitlab-runner stop 87 gitlab-runner uninstall 88 cd .. 89 rmdir /s GitLab-Runner 90 ``` 91 92 ## Troubleshooting 93 94 Make sure that you read the [FAQ](../faq/README.md) section which describes 95 some of the most common problems with GitLab Runner. 96 97 If you encounter an error like _The account name is invalid_ try to add `.\` before the username: 98 99 ```powershell 100 gitlab-runner install --user ".\ENTER-YOUR-USERNAME" --password "ENTER-YOUR-PASSWORD" 101 ``` 102 103 If you encounter a _The service did not start due to a logon failure_ error 104 while starting the service, please [look in the FAQ](../faq/README.md#the-service-did-not-start-due-to-a-logon-failure-error-when-starting-service-on-windows) to check how to resolve the problem. 105 106 If you don't have a Windows Password, Runner's service won't start but you can 107 use the Built-in System Account. 108 109 If you have issues with the Built-in System Account, please read 110 [How to Configure the Service to Start Up with the Built-in System Account](https://support.microsoft.com/en-us/kb/327545#6) 111 on Microsoft's support website. 112 113 [x86]: https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-386.exe 114 [amd64]: https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe 115 [prompt]: https://docs.microsoft.com/en-us/powershell/scripting/setup/starting-windows-powershell#at-the-command-prompt