Skip to main content

Self Host Windmill

Windmill's GitHub repository contains all the necessary files to run Windmill locally, or to self-host it.

We encourage Docker-based deployments, and provide a docker-compose file to help you get started.



Simplified instruction for docker compose in the README.


Use docker compose and not docker-compose.


When talking about the compose, or caddyfile, we explicitly refer to the ones on Windmill's GitHub repository.

Using Docker and Caddy, Windmill can be deployed using two files, (docker-compose.yml and Caddyfile) and in a single command.

Caddy takes care of managing the TLS certificate and the reverse proxy, Postgres of storage, Windmill-LSP provides editor intellisense. All managed by one docker-compose.yml file.


Let's assume you wish to deploy Windmill to the domain. This information only needs to be propagated to the docker-compose.yml file, using the WM_BASE_URL environment variable.

Create/edit the .env file at the root of the project and set your desired address:

# .env

Setting the WM_BASE_URL configures Windmill to use it as its base url, but also configures Caddy to use it as the domain.


Once you have setup your environment for deployment, you can run the following command:

docker compose up

That's it! Head over to your domain and you should be greeted with the login screen.


Default e-mail is [email protected] and the password is changeme.


To update to a newer version of Windmill, all you have to do is run:

docker compose pull

Or in case you wish to update only the Windmill image, run:

docker compose pull windmill

Database volume is persistent, so updating the database image is safe too.

Helm Chart

We also provide a convenient Helm Chart for Kubernetes based self-hosted set-up.

Detailed instructions can be found in the README file in the official repository of the chart.


If you're familiar with Helm and want to jump right in, you can deploy quickly with the snippet below.

# add the Windmill helm repo
helm repo add windmill
# install chart with default values
helm install windmill-chart windmill/windmill \
--namespace=windmill \

Detailed instructions in the official repository.

Enterprise deployment with Helm

The Enterprise edition of Windmill uses different base images and supports additional features. One important feature is better caching for depencies in a super cache supported by S3.

You need:

  • an Enterprise license key
  • an AWS account and S3 bucket
  • AWS credentials or IAM roles prepared for access from the Windmill worker pods.

See the Helm Chart repository README repository for more details. The exact setup for S3 access will vary according to your environment.

Compile from source

  1. Navigate to the frontend folder (source) and run:
    npm run install
    npm run generate-backend-client
    npm run build
  2. Install the LLD Linker.
  3. Go to backend folder (source) and run:
    SQLX_OFFLINE=true cargo build --release
  4. The Windmill binary will be at target/release/windmill

You can run it with the following command:

DATABASE_URL=<your_database_url> ./windmill

Windmill binary will make the assumption that NsJail is in PATH, Python3 is available at /usr/local/bin/python3 and Deno at /usr/bin/deno. It will also assume that you are connected to PostgreSQL using a superuser. If you cannot use a superuser, see the following section.

Run Windmill without using a Postgres superuser

Create the database with your non-super user as owner:

CREATE DATABASE windmill OWNER nonsuperuser

As a superuser, create the windmill_user and windmill_admin roles with the proper privileges, using:

psql <DATABASE_URL> -f init-db-as-superuser.sql

where init-db-as-superuser.sql is this file.

Then finally, run the following commands:

GRANT windmill_admin TO nonsuperuser;
GRANT windmill_user TO nonsuperuser;