> For the complete documentation index, see [llms.txt](https://docs.testfirst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testfirst.com/test-execution/cloud-runners/set-up-an-on-premise-test-runner.md).

# Set up an On-Premise Test Runner

By default, TestFirst runs automated tests using **cloud runners**.

If you need more control - such as running tests within your own network or infrastructure - you can set up an **on-premise test runner**.

{% stepper %}
{% step %}

### Step 1 - Install **Docker Desktop**&#x20;

* Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) on the machine you are planning to run tests on.&#x20;

{% endstep %}

{% step %}

### Step 2 - Register a Runner

* Go to **Test Execution → Cloud Runners**
* Click **GENERATE REGISTRATION TOKEN**
* A **registration token** is copied to your clipboard
  {% endstep %}

{% step %}

### Step 3 - Start the Runner

Run the following command on your machine:

* **Windows** → use PowerShell
* **Mac / Linux** → use Terminal

```
docker run --env REGISTRATION_TOKEN=<REGISTRATION TOKEN> -d --name <RUNNER NAME> --restart unless-stopped --shm-size 2000000000 public.ecr.aws/testfirst/test-runner:browser-chrome
```

{% endstep %}
{% endstepper %}

Replace:

* `<REGISTRATION TOKEN>` → token copied from TestFirst
* `<RUNNER NAME>` → any name you prefer

#### What Happens Next

* It runner container connects to TestFirst
* The runner appears in the **On-Premise Runners** list

***

### Managing the Runner

You can control the runner in two places:

#### **From Docker**

* Stop / start the container anytime
* Restart happens automatically (unless stopped manually)

#### [**From TestFirst**](/test-execution/cloud-runners.md#manage-on-premise-runners)

* Enable / disable the runner
* Delete the runner
* Monitor status (online/offline)

***

### When to Use On-Premise Runners

Use them when you need:

* Access to **internal environments**&#x20;
* **Custom execution environments**
* **Security or compliance control**
* Dedicated execution capacity
