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
-
Set up a working directory:
- Create a directory from where you want to run the Windmill worker, e.g.,
C:\Users\Alex\windmill
.
- Create a directory from where you want to run the Windmill worker, e.g.,
-
Download Windmill executable:
- Download the
windmill-ee.exe
file into the newly created directory from the releases page.
- Download the
-
Set basic environment variables:
- Set the following environment variables (replace the placeholders with your specific values):
More environment variables and worker settings can be found here.
# 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"
- Set the following environment variables (replace the placeholders with your specific values):
-
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
orNSSM
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
-
Install Python: Download Python.
- Note: When installing, make sure to check the box to add Python to the
PATH
.
- Note: When installing, make sure to check the box to add Python to the
-
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.
>>>
- Open a new PowerShell window and type
-
Install
uv
:- Run the following command in PowerShell:
pip install uv
- Run the following command in PowerShell:
-
Locate Python installation:
- Find where Python is installed by running:
Example output:
where.exe python
C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe
- Find where Python is installed by running:
-
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"
- Add the following environment variables (replace the placeholders with your specific values):
Bun executor
-
Install Bun: Follow the official documentation for Windows.
-
Locate Bun installation:
- Find where Bun is installed by running:
Example output:
where.exe bun
C:\Users\Alex\.bun\bin\bun.exe
- Find where Bun is installed by running:
-
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"
- Add the following environment variables (replace the placeholders with your specific values):
PowerShell executor
-
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
- Start PowerShell 7 and verify you're running PowerShell 7 by checking
-
Locate PowerShell 7 installation:
- Find where PowerShell 7 is installed by running:
Example output:
where.exe pwsh.exe # Note: previous versions used powershell.exe
C:\Program Files\PowerShell\7\pwsh.exe
- Find where PowerShell 7 is installed by running:
-
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"
- Add the following environment variables (replace the placeholders with your specific values):