> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uptimekit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Worker Installation

> How to install and deploy the UptimeKit worker

## Prerequisites

Before you begin, ensure you have the following installed on your server or local machine:

* [Docker engine](https://docs.docker.com/get-docker/) (install with `curl https://get.docker.com | sh`)

## Installation Steps

<Steps>
  <Step title="Configure Environment Variables">
    To connect the worker to your dashboard, you need to provide the `WORKER_API_KEY` and `DASHBOARD_URL`.

    <Info>
      First, create a worker in your dashboard to generate the `WORKER_API_KEY`. See [Worker Configuration](/configuration/worker) for instructions.
    </Info>

    Add the following variables to your `.env` file:

    ```ini theme={null}
    WORKER_API_KEY=your_api_key
    DASHBOARD_URL=http://localhost:3000
    ```
  </Step>

  <Step title="Add to Docker Compose">
    You can append the worker service to your existing `docker-compose.yml` file used for the dashboard. Add the following service definition:

    ```yaml theme={null}
    worker:
      image: ghcr.io/uptimekit/worker:latest
      restart: always
      env_file: .env
    ```

    <Info>
      If you are running the worker on a separate server, you will need to set up a full `docker-compose.yml` similar to the dashboard installation, but only running the worker service.
    </Info>
  </Step>

  <Step title="Start the Worker">
    Update your stack to include the new worker service:

    ```bash theme={null}
    docker compose up -d
    ```
  </Step>

  <Step title="Verify Worker Status">
    Check the logs to ensure the worker is processing jobs:

    ```bash theme={null}
    docker compose logs -f worker
    ```
  </Step>
</Steps>
