Skip to main content

Windows workers

Windows Native Workers are a Self-Hosted Enterprise Feature.

You can use the Windows worker natively if you do not want to run Docker or WSL on Windows (e.g., for policy or security reasons). This feature supports the Python, Bun, and PowerShell executors.

You can connect Windows workers to your existing Dockerized or cloud self-hosted PostgreSQL database and Windmill server.

Setting up Windmill worker executable

  1. Set up a working directory:

    • Create a directory from where you want to run the Windmill worker, e.g., C:\Users\Alex\windmill.
  2. Download Windmill executable:

    • Download the windmill-ee.exe file into the newly created directory from the releases page.
  3. Set basic environment variables:

    • Set the following environment variables (replace the placeholders with your specific values):
      # Replace these variables with your specific configuration
      $env:MODE="worker"
      $env:DATABASE_URL="postgres://postgres:[email protected]:5432/windmill?sslmode=disable"
      $env:SKIP_MIGRATION="true"
      More environment variables and worker settings can be found here.
  4. Run windmill-ee.exe:

    PS C:\Users\Alex\windmill> .\windmill-ee.exe

    We recommend running Windmill as a service on your Windows environment using sc or NSSM to monitor the Windmill worker, start it at system boot, and manage the restart policy.

After the basic setup, follow these steps for each language your worker should support.

Python executor

  1. Install Python: Download Python.

    • Note: When installing, make sure to check the box to add Python to the PATH.
  2. Verify Python installation:

    • Open a new PowerShell window and type python. You should see output similar to the following:
      PS C:\Users\Alex> python
      Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)] on win32
      Type "help", "copyright", "credits" or "license" for more information.
      >>>
  3. Install uv:

    • Run the following command in PowerShell:
      pip install uv
  4. Locate Python installation:

    • Find where Python is installed by running:
      where.exe python
      Example output:
      C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe
  5. Set environment variables:

    • Add the following environment variables (replace the placeholders with your specific values):
      # Replace these variables with your specific configuration
      $env:PYTHON_PATH="C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe"

Bun executor

  1. Install Bun: Follow the official documentation for Windows.

  2. Locate Bun installation:

    • Find where Bun is installed by running:
      where.exe bun
      Example output:
      C:\Users\Alex\.bun\bin\bun.exe
  3. Set environment variables:

    • Add the following environment variables (replace the placeholders with your specific values):
      # Replace these variables with your specific configuration
      $env:BUN_PATH="C:\Users\Alex\.bun\bin\bun.exe"

PowerShell executor

  1. Install PowerShell 7+ (stable): Ensure you have the latest stable release of PowerShell by following the official documentation.

    • Start PowerShell 7 and verify you're running PowerShell 7 by checking $PSVersionTable:
      $PSVersionTable
      PSVersion 7.4.5
  2. Locate PowerShell 7 installation:

    • Find where PowerShell 7 is installed by running:
      where.exe pwsh.exe # Note: previous versions used powershell.exe
      Example output:
      C:\Program Files\PowerShell\7\pwsh.exe
  3. Set environment variables:

    • Add the following environment variables (replace the placeholders with your specific values):
      # Replace these variables with your specific configuration
      $env:POWERSHELL_PATH="C:\Program Files\PowerShell\7\pwsh.exe"