Skip to content

Latest commit

 

History

History
111 lines (78 loc) · 5.25 KB

install-machine-runner-3-on-windows.adoc

File metadata and controls

111 lines (78 loc) · 5.25 KB
contentTags
platform
Cloud
Server v4.4+

Install machine runner 3 on Windows

This page describes how to install CircleCI’s machine runner 3 on Windows. This has been tested for Windows Server 2016, 2019, and 2022 in Datacenter Edition. Other Server SKUs with Desktop Experience and Remote Desktop Services (RDS) should also work.

This page walks you through installing a machine runner and its dependencies (for example, Chocolatey, Git, and Gzip) on your Windows Server.

Since this setup creates a new local administrator user that runs CircleCI jobs, your Windows Server needs to be capable of creating local users and accepting remote logons for them.

Note
The Windows Server needs to be a domain member when you set this up in domain environments. The self-hosted runner instance cannot run on a Windows Server operating as a domain controller.

Prerequisites

To install machine runners and run jobs, you will need to have root access, and have the following dependencies installed on your system:

Note
Additional utilities and tools, such as Chocolatey, Git, and Gzip are automatically installed as part of the installation script.

Self-hosted runner terms agreement

2. Machine runner installation on Windows

  1. Download the Install-CircleCIRunner.ps1 script from GitHub to an easily accessible location.

  2. Open PowerShell as an administrator and navigate to the directory where you placed the script file.

  3. Run the following in your PowerShell:

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
    ./Install-CircleCIRunner.ps1

    The installation will be output into your PowerShell interface.

  4. As part of the installation, the configuration file for the machine runner (runner-agent-config.yaml) will open in Notepad. Fill in the requested information (see Machine Runner 3.0 Configuration Reference). The configuration file is located in the installation directory, C:\Program Files\CircleCI, by default.

After your setup completes, the machine runner starts automatically and begins looking for jobs to process.

Uninstall / reinstall steps

Uninstalling machine runners will prepare the system for installation again.

  1. Download the Uninstall-CircleCIRunner.ps1 script from GitHub to an easily accessible location.

  2. Open PowerShell as an administrator and navigate to the directory where you placed the script file.

  3. Run the following in your PowerShell:

    ./Uninstall-CircleCIRunner.ps1

Continuous mode vs. single task mode for Windows self-hosted runners

By default, Windows machine runners run in single-task mode in order to ensure high reliability of the underlying technology that the self-hosted runner uses to execute jobs. This is the recommended mode for Windows machine runners.

A Windows machine runner can be run in continuous mode. However, doing so eliminates the guarantee of a clean job environment. This may translate into jobs not executing as expected, and job failure.

Troubleshooting

Refer to the Troubleshoot Machine Runner guide if you encounter issues installing or running machine runner on Windows.