github.com/nilium/gitlab-runner@v12.5.0+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](https://docs.microsoft.com/en-us/powershell/scripting/getting-started/starting-windows-powershell?view=powershell-6#with-administrative-privileges-run-as-administrator):
    26  1. [Register the Runner](../register/index.md).
    27  1. Install the Runner as a service and start it. You can either run the service
    28     using the Built-in System Account (recommended) or using a user account.
    29  
    30     **Run service using Built-in System Account** (under directory created in step 1. from above, ex.: `C:\GitLab-Runner`)
    31  
    32     ```powershell
    33     cd C:\GitLab-Runner
    34     ./gitlab-runner.exe install
    35     ./gitlab-runner.exe start
    36     ```
    37  
    38     **Run service using user account** (under directory created in step 1. from above, ex.: `C:\GitLab-Runner`)
    39  
    40     You have to enter a valid password for the current user account, because
    41     it's required to start the service by Windows:
    42  
    43     ```powershell
    44     cd C:\GitLab-Runner
    45     ./gitlab-runner.exe install --user ENTER-YOUR-USERNAME --password ENTER-YOUR-PASSWORD
    46     ./gitlab-runner.exe start
    47     ```
    48  
    49     See the [troubleshooting section](#troubleshooting) if you encounter any
    50     errors during the Runner installation.
    51  
    52  1. (Optional) Update Runners `concurrent` value in `C:\GitLab-Runner\config.toml`
    53     to allow multiple concurrent jobs as detailed in [advanced configuration details](../configuration/advanced-configuration.md).
    54     Additionally you can use the advanced configuration details to update your
    55     shell executor to use Bash or PowerShell rather than Batch.
    56  
    57  Voila! Runner is installed, running, and will start again after each system reboot.
    58  Logs are stored in Windows Event Log.
    59  
    60  ## Update
    61  
    62  1. Stop the service (you need an [elevated command prompt](https://docs.microsoft.com/en-us/powershell/scripting/getting-started/starting-windows-powershell?view=powershell-6#with-administrative-privileges-run-as-administrator) as before):
    63  
    64     ```powershell
    65     cd C:\GitLab-Runner
    66     ./gitlab-runner.exe stop
    67     ```
    68  
    69  1. Download the binary for [x86][] or [amd64][] and replace runner's executable.
    70     You can download a binary for every available version as described in
    71     [Bleeding Edge - download any other tagged release](bleeding-edge.md#download-any-other-tagged-release).
    72  
    73  1. Start the service:
    74  
    75     ```powershell
    76     ./gitlab-runner.exe start
    77     ```
    78  
    79  ## Uninstall
    80  
    81  From an [elevated command prompt](https://docs.microsoft.com/en-us/powershell/scripting/getting-started/starting-windows-powershell?view=powershell-6#with-administrative-privileges-run-as-administrator):
    82  
    83  ```powershell
    84  cd C:\GitLab-Runner
    85  ./gitlab-runner.exe stop
    86  ./gitlab-runner.exe uninstall
    87  cd ..
    88  rmdir /s GitLab-Runner
    89  ```
    90  
    91  ## Troubleshooting
    92  
    93  Make sure that you read the [FAQ](../faq/README.md) section which describes
    94  some of the most common problems with GitLab Runner.
    95  
    96  If you encounter an error like _The account name is invalid_ try to add `.\` before the username:
    97  
    98  ```powershell
    99  ./gitlab-runner.exe install --user ".\ENTER-YOUR-USERNAME" --password "ENTER-YOUR-PASSWORD"
   100  ```
   101  
   102  If you encounter a _The service did not start due to a logon failure_ error
   103  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) to check how to resolve the problem.
   104  
   105  If you don't have a Windows Password, Runner's service won't start but you can
   106  use the Built-in System Account.
   107  
   108  If you have issues with the Built-in System Account, please read
   109  [How to Configure the Service to Start Up with the Built-in System Account](https://support.microsoft.com/en-us/help/327545/how-to-troubleshoot-service-startup-permissions-in-windows-server-2003#6)
   110  on Microsoft's support website.
   111  
   112  [x86]: https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-386.exe
   113  [amd64]: https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe