Self-host Windmill

Self-hostable platform for running scripts, workflows and internal apps written in many languages, with a Postgres-backed job queue and worker processes. Run your own Windmill on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.

Updated November 23, 2026

Running your own Windmill usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Windmill behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.

Just ask your agent

Open a Plus workspace (Windmill runs in Docker, which Plus and Pro include), tap Launch to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:

Set up Windmill on this workspace and give me the link. Follow https://envhaven.com/self-host/windmill.md

Then open the link it sends and create your Windmill account straight away, before anyone else finds the address. That is the whole request: the address in it is this page’s Markdown copy, and the agent follows the instructions for it further down, with every setting Windmill’s docs require.

Or keep it private with Tailscale

The preview URL puts Windmill on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Windmill an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace’s Vars pane as TS_AUTHKEY, and ask the agent:

Set up Windmill on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/windmill.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
  • A Tailscale container runs beside Windmill, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
  • Anything other services have to reach, such as a webhook, still needs a public address. Keep self-hosted apps private with Tailscale covers both, and what Tailscale’s free plan includes.
At a glance
What it isAutomation and workflows
LicenseAGPL-3.0 for the open-source build, Apache-2.0 for the API clients and OpenAPI spec, plus proprietary enterprise code
Runs asDocker (ghcr.io/windmill-labs/windmill)
Memoryrule of thumb 1 to 2 GB per worker; the compose file caps each worker at 2048M and runs 3 workers plus 1 native worker by default (docs)
Plan that fitsPlus or larger
Web port80
Documentationwww.windmill.dev/docs/advanced/self_host

What your agent takes care of

  • Installing it. Windmill runs from the official image, ghcr.io/windmill-labs/windmill, with its data in folders under ~/apps/windmill.
  • Putting it on an HTTPS address. The workspace’s preview URL serves it, and your own domain can too.
  • Locking it down first. What Windmill’s docs say to set before it faces the internet, below.
  • Telling you what to back up: db_data Docker volume (the Postgres cluster: the entire state of Windmill) and worker_logs volume (service logs and overflow of very large job logs) (docs).

The settings it needs behind a proxy

  • Base Url: Instance setting holding the public base URL; resume URLs, OAuth and SSO depend on it. The docs say to set it to the https:// address when Caddy serves HTTPS. (docs)
  • BASE_URL: Environment variable for the server: the publicly exposed base URL (default http://localhost:8000); the instance setting overrides it. On the caddy service in the compose file, BASE_URL is Caddy’s site address (:80, :443 or a domain) instead. (docs)
  • Caddyfile: A reverse proxy has to route like the provided Caddyfile, including WebSocket support on the /ws/, /ws_mp/ and /ws_debug/* paths, which go to the windmill_extra container (port 3000); everything else goes to port 8000. (docs)
  • WebSocket base url: Optional instance setting used by the frontend for LSP, debugger and multiplayer WebSocket connections when they are not on the page’s host; when empty it uses the current window location. (docs)
  • Email domain: Instance setting: domain shown in webhooks for email triggers; it should match the MX record. (docs)

Before it faces the internet

  • Default login after docker compose up is [email protected] with password changeme; change it before exposing the instance. (docs)
  • The compose file and .env ship the Postgres password changeme. (docs)
  • Secrets stored in Windmill are encrypted with one key per workspace; the docs also recommend encrypting the Postgres database. (docs)
  • A database dump holds every user’s password hash and the secret that signs session tokens, so keep backups private. (docs)

Things to ask next

Everything after the install is one more sentence to the agent. Some that come up:

  • “Build a workflow that posts each new GitHub issue in my repo to Slack.”
  • “Add the credentials it needs from my Vars pane, and test the workflow once.”
  • “Move Windmill to app.example.com.” Add the domain on the dashboard’s Domains page with a CNAME to domains.envhaven.app, and the agent changes Windmill’s address settings to match.
  • “Update Windmill to the latest release.” It pulls the new image and recreates the container, data kept.

Instructions for the agent

The agent reads these from the page’s Markdown copy. They also work pasted on their own, if you would rather give them in your own words.

Set up Windmill on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, ghcr.io/windmill-labs/windmill, starting from the docs' compose file: https://github.com/windmill-labs/windmill/blob/main/docker-compose.yml. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- The docs' setup includes: postgres (postgres:18, service db); windmill_server (MODE=server, port 8000); windmill_worker (3 replicas); windmill_worker_native (1 replica); windmill_extra (language server, debugger, optional multiplayer); caddy (reverse proxy on port 80 and 25).
- Keep the compose file in ~/apps/windmill and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Windmill's port 80.
- The preview URL terminates HTTPS in front of Windmill: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/windmill.md for the preview URL, as Windmill's docs describe for running behind a proxy; skip any that apply only when Windmill serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/windmill.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Windmill up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.

What to know

  • In Docker, Windmill’s containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
  • Email triggers use TCP port 25, which Caddy redirects to Windmill port 2525. (docs)
  • The default compose file runs the workers with privileged: true for PID namespace isolation. (docs)
  • A job that exceeds its worker’s 2048M memory limit is killed with exit code 137. (docs)
  • The instance setting for HTTP request size limit applies to Cloud only, so a self-hosted instance has no documented body-size setting. (docs)
  • The docs recommend an external reverse proxy for TLS rather than the bundled Caddy. (docs)
  • Postgres 18 ships in the compose file; a db_data volume written by PostgreSQL 16 or earlier makes the container refuse to start until migrated. (docs)
  • A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.

Without a workspace

The manual route, on a server you run:

  1. Rent a Linux VPS, secure SSH, and create a user for the app.
  2. Install Docker and write a compose file from the official image.
  3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
  4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
  5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Windmill’s own documentation covers each step for its install methods.

Sources

Facts about Windmill come from its own documentation, checked on 2026-11-23: