Windmill (workflow automation)
Self-hosted Windmill (Community Edition) — open-source platform to build scripts, flows and internal tools, run by a pool of workers backed by PostgreSQL.
| Guest | srv-wd — Rocky Linux 9, VM 128 on rumba, 192.168.88.29, 6144 MB RAM (1024 MB at creation, then 4096 MB, see below), 50 GB disk (local-lvm, scsi0; 30 GB until 2026-11-20, see Sizing) |
| URL | https://wd.isc3.isc-vs.ch/ — TLS handled by Caddy take cert from FreeIPA |
| Source | Official docker-compose.yml, Caddyfile and .env from windmill-labs/windmill, stored in /root |
| Version | 1.880.1 (release of 2026-11-19, updated November 2026); image tag main (ghcr.io/windmill-labs/windmill:main), not pinned |
| Stack | Docker CE + Compose plugin, Caddy (layer4 reverse proxy), PostgreSQL 18, Windmill server + workers, windmill-extra (LSP, debugger) |
| Database | PostgreSQL 18 in the db container, database windmill, volume db_data, not exposed outside the Compose network |
| Auth | Local Windmill accounts only — no Keycloak/SSO integration |
AWX + Windmill: roles and target structure
Target architecture (approved 2026-11-03; folders f/awx, f/awx-secrets, f/infrastructure in use since 2026-11-06).
AWX and Windmill are complementary parts of the ISC automation platform:
| Layer | Owns / does | Must not become |
|---|---|---|
Git: ISC-HEI/dc-isc-prod | Source-controlled Ansible playbooks under playbooks/; versioned Windmill code under windmill/; rotation catalogue playbooks/secrets/accounts.yml | A store for live tokens, passwords or unreviewed production-only changes |
AWX on srv-auto | Synchronizes the configured Git project/branch; maintains inventories, credentials, RBAC, Job Templates and the execution and logs of Ansible jobs | A copy of every workflow's application-facing UI or a second source of truth for the playbook source |
Windmill on srv-wd, workspace isc | Orchestrates one AWX Job Template, several in order/conditional branches, or an AWX Workflow Job Template; also handles input validation, approvals, schedules, external APIs and failure notification | A separate Ansible executor or a repository of duplicated playbooks |
OpenBao and ISC agent on srv-bao | Secret management and the existing AWX-token rotation/synchronization into Windmill variables, as documented below | A general-purpose token or certificate injected into every Windmill worker |
Normal call chain: Git playbook → AWX project synchronization → AWX Job Template → Windmill flow → AWX API launch → AWX job execution → status/artifacts returned to Windmill. The conceptual ordering is not a deployment ordering: the flow calls an
already configured AWX template. Adding a .yml to Git does not automatically
create an AWX Job Template or make it visible to Windmill. Check AWX project SCM
synchronization, its configured branch, the Job Template, surveys and RBAC.
The project and its configured branch, rather than the Git default branch alone,
determine the playbooks AWX can run.
Coupled by purpose, decoupled for recovery: normal multi-step automations use
Windmill as their orchestration entry point and AWX as their Ansible execution
engine. AWX must remain able to run an authorized job manually if Windmill is
unavailable; Windmill must report an AWX outage and stop safely rather than claim
success. AWX also has native Workflow Job Templates (a read-only API test saw
Default Configuration, ID 14): keep an entirely Ansible-only, stable job
graph in AWX when appropriate and have Windmill launch that single AWX
workflow. Prefer Windmill orchestration when there are cross-service steps,
dynamic branching, approvals or an operator-facing form. Do not maintain the
same sequence independently in both systems.
Windmill workspace layout
One shared workspace, isc (C0). Each top-level folder f/<name>/ is a separate
permission boundary; deeper path segments (hosts/, jobs/) only sort objects and
inherit the folder's permissions
(Windmill groups and folders).
State on 2026-11-06:
isc
├── f/awx/ shared AWX helper code, no token
│ └── run_and_wait_playbook launch an AWX Job Template and wait
├── f/awx-secrets/ secrets kept up to date by the rotation agent, restricted
│ ├── awx_token secret variable, token of svc-windmill-awx-c0
│ ├── awx c_awx resource (URL + $var:f/awx-secrets/awx_token)
│ └── glpi variable (password of svc-windmill-glpi-w1) + c_glpi resource
├── f/infrastructure/ infrastructure flows
│ ├── new_host_configuration
│ └── email_relay smtp resource (srv-mail 192.168.88.163:25, no auth)
├── f/new_host/ one flow per new-host step (enroll, DNS, Foreman, Netdata, NFS,
│ fail2ban, root password, update and reboot)
├── f/secrets/ secret rotation, separate privilege level
│ ├── awx_token, awx token of svc-windmill-secrets-c0 (Job Templates 22 and 23 only)
│ ├── awx_run_job, notify_failure, check_references
│ ├── rotate, rotate_app_admins, rotate_password_monthly
│ └── schedules rotate_monthly, rotate_app_admins_monthly, rotate_password_monthly
│ (on_failure notify_failure), check_references_daily (07:00)
├── f/calc/ CALC@HEI project (versioned in dc-isc-prod windmill/f/calc/)
└── u/yacinesaid/ drafts only (refined_flow); no other u/ object
| Rule | Why |
|---|---|
No production secret, flow or schedule under u/<person>/ | A departure or a deleted object breaks production (on 2026-11-06 the deletion of u/adrienreynard/awx_token stopped the AWX flows and the rotation agent). |
Flows read the AWX token from f/awx-secrets/awx_token or the resource f/awx-secrets/awx | This is the only path the rotation agent updates. |
f/secrets/awx_token and f/awx-secrets/awx_token stay separate | Two AWX accounts with different template rights. |
Move or delete a variable of f/awx-secrets/ only together with the agent catalogue (dc-isc-prod playbooks/secrets/accounts.yml) | The agent writes to a fixed path; a moved variable fails the agent (2026-11-06, glpi) and the password stops being copied. |
f/secrets/check_references runs daily at 07:00 (source dc-isc-prod windmill/f/secrets/check_references.py) | It mails rack-admins when a production flow, script or schedule references a missing object or a u/ path, or when a f/secrets/ schedule has no on_failure. Run it by hand after any move, with send_mail: false. |
| Workspace admins can move or delete anything | Folder permissions do not stop an admin; the guard above and the agent (every 15 min) detect the break instead. |
Folder owners are people for now (yacinesaid, adrienreynard) | Open: replace them by a C0 group (todo). |
f/calc/ stays its own folder | Separate project, not part of f/infrastructure/. |
Naming, ownership and operational rules
- Name stable interfaces by capability, not by the employee who wrote them
or an AWX numeric template ID. Example
f/infrastructure/hosts/new_host_configurationcalls the appropriate configured AWX Job Templates, while Gitplaybooks/contains the underlying Ansible playbooks. Use lowercasesnake_casefor new leaf names andf/<scope>/…paths for production. - Maintain one shared AWX integration implementation for normal
infrastructure flows, rather than copying an ad hoc HTTP launcher into every
flow. Version scripts/flows and their schemas in
dc-isc-prod/windmill/with paths mirroring Windmill. Reuse the existing provenwindmill/f/secrets/awx_run_job.pyandwindmill/f/calc/awx_run_job.pypatterns as references, without reusing their privileged credentials. Account-specific API resources and token ACLs remain isolated. - The catalog may discover visible templates dynamically; Execute is a
separate permission. Never turn an 8-template read-only listing into an
unrestricted arbitrary-template execution endpoint. Validate explicit
allowed templates, required surveys/extra_vars and effective AWX RBAC;
protect secrets in results, failure messages and job logs. AWX's service
identity
svc-windmill-awx-c0currently returned 8 Job Templates, 1 Workflow Job Template and 0 visible projects in a read-only test: that is the service user's visible subset, not a complete AWX catalog or proof of execution permissions. - Keep permission boundaries at top-level folders:
f/awx/reusable helper code,f/infrastructure/operational flows,f/awx-secrets/restricted credential access, and existingf/secrets/high-privilege rotation flows. Grant access to groups, not just individual employees; review both edit/deploy and run-as permissions. Do not usesvcbaowindmillsyncto run infrastructure flows: it is a secret-variable synchronization identity. - The source of truth for execution is AWX's configured Job Template (project/SCM revision, inventory, credentials, survey). Windmill supplies validated orchestration parameters, starts the job, records its ID, waits/checks final status, propagates failure, and links to the AWX job log. Define retry/idempotency and approval rules per operation, especially DNS, enrollment, root-password changes and reboot.
- One schedule owner per automation: before migrating, inventory existing
triggers/webhooks, schedules, notifications, hardcoded
u/…and Job Template IDs, permissions and actor identities. Move atomically with rotation consumer paths/ACLs, verify end-to-end, and retire the personal objects only after proving equivalence and rollback. See the HIGH migration checklist.
End state: ISC staff can change or leave without affecting production
automations; AWX alone owns Ansible execution; Windmill owns the
cross-job/cross-service orchestration; Git contains reviewed code; and
the existing srv-bao → Windmill secret synchronization and AWX RBAC
remain intact.
New host flow — f/infrastructure/new_host_configuration
Configures a fresh Rocky VM end to end. Inputs: machine_name, ip, host_tier, aliases,
foreman_location, foreman_activation_key and one execute_* switch per step. Each step is a
sub-flow in f/new_host/ that launches one AWX Job Template through f/awx/run_and_wait_playbook;
the flow stops at the first failed step, then mails the summary (November 2026):
| # | Step (switch) | AWX JT | Root login used |
|---|---|---|---|
| 1 | DNS + Hostname (execute_dns_hostname) | 38 DNS + Hostname (FreeIPA) (JT 10 until 2026-11-16) | base credential 9 |
| 2 | Enroll client (execute_enroll_client) | 11 | base credential 9 |
| 3 | fail2ban (execute_fail2ban) | 20 | base credential 9 |
| 4 | Foreman register (execute_foreman_register) | 15 | base credential 9 |
| 5 | NFS mount (execute_nfs_mount) | 13 | base credential 9 |
| 6 | Netdata (execute_netdata_enrollment) | 28 | base credential 9 |
| 7 | Update and reboot (execute_reboot) | 16 | base credential 9 |
| 8 | Change root password (change_root_password) | 18 | sets the root - <host> entry in Vaultwarden |
- Steps 1–7 log in with the base root password (AWX credential 9). Once step 8 has run, they fail with
Invalid/incorrect password. After a rotation use JT 36 Netdata Register (service already config) for Netdata (reads Vaultwarden) and runplaybooks/reboot.ymlfrom WSL with the Vaultwarden password on stdin; JT 16 has no Vaultwarden variant yet (todo). - A step can fail in Windmill (
ConnectionErrorwhile waiting) although its AWX job succeeded. Check the AWX job before re-running, then re-launch the flow with the done steps switched off. - Each step is idempotent (an enrolled host is skipped), so re-running a step that already succeeded is harmless.
Standing rules
caddy_data volumeCaddy stores its certificates and ACME account in the caddy_data volume. Deleting it forces a new
certificate request and can hit rate limits.
docker compose down -vThe -v flag deletes the db_data volume, which holds the entire Windmill state (scripts, flows,
users, secrets, run history).
--pull neverThe services use pull_policy: always on the unpinned main tag, so a plain docker compose up -d <service> pulls a newer Windmill for that service only and leaves it out of step with the server. Use
docker compose up -d --pull never --no-deps <service> to apply a compose change.
Sizing
The initial 1024 MB of RAM was not enough: image extraction stalled and the full stack
(Postgres, server, 3 workers, native worker, windmill-extra, Caddy) needs several GB.
| Setting | Value |
|---|---|
| RAM | 6144 MB since 2026-11-12 (was 4096 MB) — no ballooning: PVE never takes memory back |
| Balloon device | kept (balloon unset = memory), so Proxmox shows the real RAM use (why) |
| Guest agent | agent: enabled=1, qemu-guest-agent running |
| Apply | Full qm shutdown 128 then qm start 128 (a guest reboot does not apply it) |
| Disk | 50 GB since 2026-11-20 (was 30 GB, the size of template 111); / = 47 GB XFS on LVM rlm-root |
Until 2026-11-12 the VM had balloon: 0: Proxmox then showed 103 % (the qemu process) while the
guest used about 48 %. The 6144 MB came from a change already pending in the PVE config, applied
by that day's stop/start (journal).
The images take about 15 GB (November 2026: windmill:main 6.6 GB, windmill-extra:latest
8.6 GB). docker compose pull downloads the new images next to the old ones, so an update needs
about 15 GB free on top of the running stack: with 30 GB, the 2026-11-20 pull filled / to 99 %.
After an update, remove the old images with docker image prune -f (about 24 GB used afterwards).
Installation
-
Docker CE from the CentOS repository (compatible with Rocky):
dnf -y install dnf-plugins-corednf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repodnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginsystemctl enable --now docker -
Files from the upstream repository in
/root:curl https://raw.githubusercontent.com/windmill-labs/windmill/main/docker-compose.yml -o docker-compose.ymlcurl https://raw.githubusercontent.com/windmill-labs/windmill/main/Caddyfile -o Caddyfilecurl https://raw.githubusercontent.com/windmill-labs/windmill/main/.env -o .env -
Start:
docker compose up -dThe first start pulls the images (
windmill,windmill-extra,caddy-l4,postgres:18): 3.5 GB at installation, about 15 GB on disk in November 2026. Do not interrupt it; if it stalls, re-run the command and the downloaded layers are kept.
Services
| Service | Role | Notes |
|---|---|---|
db | PostgreSQL 18 | Healthcheck pg_isready, volume db_data mounted on /var/lib/postgresql |
windmill_server | API and UI | Port 8000 (internal), 2525 for email triggers |
windmill_worker | Job execution | 3 replicas, 2048M limit each, privileged: true for PID namespace isolation |
windmill_worker_native | Native (in-process) jobs | 1 replica |
windmill_indexer | Full-text search | Enterprise Edition, disabled (replicas: 0) |
windmill_extra | LSP and debugger | Multiplayer disabled (Enterprise Edition), REQUIRE_SIGNED_DEBUG_REQUESTS=true |
caddy | Reverse proxy | Publishes 80 and 25, routes /ws/*, /ws_mp/*, /ws_debug/* to windmill_extra, the rest to the server |
| wm_metrics | Prometheus metrics (2026-11-19) | sql_exporter in the db network namespace, read-only role wm_metrics, served by Caddy on /wm-metrics to srv-pm only — see dc-isc-prod playbooks/monitoring/windmill/ |
All services use restart: unless-stopped, and Docker is enabled at boot, so the stack comes back
after a VM reboot unless it was stopped manually with docker compose stop or down.
HTTPS
TLS is terminated by Caddy, which obtains and renews the certificate automatically.
| Setting | Value |
|---|---|
caddy → BASE_URL | <FQDN> (replaces ":80") |
caddy → ports | 80:80, 443:443, 25:25 |
| Windmill Base URL | https://<FQDN> (Instance settings → Core → Base URL) |
| Certificate storage | caddy_data volume |
The Caddyfile is unchanged from upstream. Port 80 stays open for the ACME challenge and the redirect
to HTTPS. Check the certificate with docker compose logs caddy.
Outbound TLS from jobs
Scripts call AWX and GLPI with certificate verification (2026-10-17). Both workers mount the host trust
store, which carries the FreeIPA CA because srv-wd is a FreeIPA client:
| Setting (both worker services) | Value |
|---|---|
| volume | /etc/pki/ca-trust/extracted/pem:/etc/isc-ca:ro |
REQUESTS_CA_BUNDLE, SSL_CERT_FILE | /etc/isc-ca/tls-ca-bundle.pem |
WHITELIST_ENVS | REQUESTS_CA_BUNDLE,SSL_CERT_FILE (passes them on to the jobs) |
Python requests then verifies against that bundle by default; no script embeds a CA or sets
verify=False.
Decision: keep Windmill → AWX token sync from srv-bao
Decision (2026-11-03, ISC C0): retain the current secret-variable synchronization model for Windmill Community Edition. Do not replace it with direct Windmill-worker access to OpenBao merely to centralize storage. This decision does not close the separate HIGH ownership remediation: no production flow, schedule, execution identity or service secret should depend on a staff member's personal Windmill namespace.
Identity and secret boundaries
| Boundary | Actual identity / storage | Responsibility |
|---|---|---|
FreeIPA → srv-wd host | FreeIPA host enrollment and CA trust | Host identity, certificates and verified outbound TLS. Not Windmill application login. |
| People → Windmill | Local Windmill accounts in workspace isc | Windmill currently does not use FreeIPA LDAP/LDAPS or Keycloak/SSO for application authentication. Host enrollment does not imply user SSO. |
srv-bao → Windmill | Local Windmill service user svc-bao-windmill-sync@wd.isc3 (workspace name svcbaowindmillsync); its Windmill API token is on srv-bao at /etc/secrets-agent/windmill-token, root-only | The ISC secrets-expiry-agent updates only explicitly shared Windmill secret variables. This is not a FreeIPA login, nor a native Windmill/OpenBao secret backend. The agent renews its own Windmill API token. |
| Windmill → AWX (infrastructure) | AWX local service user svc-windmill-awx-c0, bearer token stored in Windmill secret variable f/awx-secrets/awx_token, resource f/awx-secrets/awx | Scoped AWX API access, independent of any staff identity in AWX and in Windmill (moved from u/adrienreynard/awx_token on 2026-11-06). |
| Windmill → AWX (secrets flows) | Separate AWX local service user svc-windmill-secrets-c0; variable f/secrets/awx_token, resource f/secrets/awx | Separate permission boundary for the secret-rotation Job Templates, not a replacement for the infrastructure account. |
| OpenBao | Dedicated LDAP engines, KV secrets and narrowly authorized consumers elsewhere in the ISC | Not the configured KV storage location of the Windmill → AWX bearer tokens. srv-bao hosts OpenBao and a distinct ISC expiry agent; they must not be conflated. |
svc-bao-windmill-sync@wd.isc3 is an application-local service identity, despite the
hostname-like email. Its setup uses a discarded random password and a renewable API token,
not FreeIPA LDAP bind. See
bootstrap/windmill_glpi_w1.py
and bootstrap/windmill_share_var.py.
Data flow and rotation
AWX svc-windmill-awx-c0
│ issues the next OAuth2 token (using the current token)
▼
secrets-expiry-agent on srv-bao (timer checks every 15 min)
│ through Windmill API as svcbaowindmillsync
▼
Windmill secret variable f/awx-secrets/awx_token
│ retrieved at job time with wmill.get_variable(...)
▼
Windmill workflow ──HTTPS / Authorization: Bearer──► AWX
The catalogue entry awx-token-windmill specifies a 30-day rotation target; AWX
tokens have a documented default lifetime of 90 days. The agent reads the current token
from Windmill, validates that it authenticates the intended non-superuser AWX service
account, creates a new AWX token, writes it into Windmill, reads it back, proves it with
/api/v2/me/, and only then revokes older tokens. Checked on 2026-11-06: the variable
is secret, only u/svcbaowindmillsync has write access, forced rotation succeeded (AWX
token 15, older tokens revoked).
This AWX bearer token is not stored by this code in an OpenBao KV path. On srv-bao,
/etc/secrets-agent/windmill-token is the agent's Windmill API token, not the AWX bearer
token used by the workflows. The agent may also hold its own, distinct
/etc/secrets-agent/awx-token for AWX credential-management operations: do not confuse
that with svc-windmill-awx-c0's token.
Sources: accounts.yml — tokens, agent/secrets_expiry_agent.py — handle_token, secrets README §10.
Why retain sync rather than direct OpenBao access?
- Community Edition compatibility. Windmill's documented native HashiCorp Vault KV v2 secret-storage backend is an Enterprise Edition feature (official secret-backend documentation). OpenBao has an API usable from scripts, but that is a custom integration, not the native backend already installed here.
- Limit the secret-access surface. The existing dedicated sync identity can write specific variables. Giving general-purpose Windmill workers a shared OpenBao token, FreeIPA client certificate or broad KV policy would create a new cross-workflow secret exposure risk. A direct-fetch design would first need workload/worker isolation, least-privilege machine authentication and access auditing.
- Availability. A Windmill job reads its local encrypted variable, so AWX launch does not require a fresh OpenBao read on every job. This reduces runtime coupling to OpenBao availability; rotation, expiry and other OpenBao-backed dependencies still require monitoring. It is a resilience trade-off, not a guarantee of operation during every OpenBao outage.
- Already implemented and scoped. The ISC agent rotates and validates the token, then revokes its predecessors. Replacing this with KV reads would also require a new AWX-token KV rotation handler and an authentication mechanism for the consumers. No proven security gain justifies such a migration as part of the immediate ownership fix.
Security trade-off: the secret still resides (encrypted if the Windmill variable is marked secret) in Windmill/PostgreSQL and is accessible to authorized jobs, rather than being centrally served from OpenBao on each run. Audit variable flags, ACLs, job run-as, token privileges and rotation logs; do not describe this as inherently safer than a properly isolated direct-OpenBao design. OpenBao Agent + FreeIPA certificate authentication already exists for Grafana, but Grafana's single-purpose host differs from Windmill's general-purpose job workers.
Moving a synchronized variable: change its path in
dc-isc-prod/playbooks/secrets/accounts.yml and redeploy the agent in the same step as the
Windmill change, give u/svcbaowindmillsync write access on the new variable, then prove it
(read in Windmill, AWX /api/v2/me/, one agent pass without error). Reconsider direct
OpenBao integration only through a separate security and availability review.
Recovery: AWX token lost or expired
Symptom: e-mail « [srv-bao] ÉCHEC de l'agent d'expiration des secrets » with
awx-token-windmill … HTTP 404 (variable deleted) or HTTP 401 (token expired), and AWX
steps of the flows failing. OpenBao is not involved. From an admin workstation, dc-isc-prod
checkout:
# new token created on srv-auto and piped to srv-wd, never displayed; folder, ACL,
# resource, proof in Windmill, flows and scripts repointed from the old path
SSH_KEY=~/.ssh/id_ed25519_tours bash playbooks/secrets/bootstrap/windmill_awx_secrets.sh --new-token setup test migrate
# on srv-bao: clean token from the agent, every other token of the account revoked
python3 -I /usr/local/libexec/secrets-agent/secrets_expiry_agent.py --only awx-token-windmill --force-rotate
systemctl reset-failed secrets-expiry-agent.service && systemctl start secrets-expiry-agent.service
migrate alone (no new token) repoints flows created later with the old
u/adrienreynard/awx_token path.
Read-only health checks for the sync agent
On srv-bao (do not print token file contents):
systemctl is-active secrets-expiry-agent.timer
systemctl list-timers --all secrets-expiry-agent.timer
systemctl show secrets-expiry-agent.service -p Result -p ExecMainStatus -p ExecMainExitTimestamp
journalctl -u secrets-expiry-agent.service --since "35 days ago" --no-pager \
| grep -E 'awx-token-windmill|ERROR|ECHEC' | tail -n 60
Review log output for secrets before sharing it. These commands observe the agent; they do not trigger a rotation.
Mail
Notifications (alerts, schedule error handlers, user invitations) go out through the rack's outbound relay rather than a direct credential. Configured in Instance settings → Core → SMTP:
| Setting | Value |
|---|---|
| Server address | srv-mail.isc3 (192.168.88.163), port 25, no auth/TLS |
Requires this guest's address to be present in mynetworks on srv-mail
(provisioning/mail/deploy-relay.sh), otherwise mail is refused at Client host rejected
(layer 1, see Email). Test with the Send test email button in the SMTP settings.