Skip to main content

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.

Guestsrv-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)
URLhttps://wd.isc3.isc-vs.ch/ — TLS handled by Caddy take cert from FreeIPA
SourceOfficial docker-compose.yml, Caddyfile and .env from windmill-labs/windmill, stored in /root
Version1.880.1 (release of 2026-11-19, updated November 2026); image tag main (ghcr.io/windmill-labs/windmill:main), not pinned
StackDocker CE + Compose plugin, Caddy (layer4 reverse proxy), PostgreSQL 18, Windmill server + workers, windmill-extra (LSP, debugger)
DatabasePostgreSQL 18 in the db container, database windmill, volume db_data, not exposed outside the Compose network
AuthLocal 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:

LayerOwns / doesMust not become
Git: ISC-HEI/dc-isc-prodSource-controlled Ansible playbooks under playbooks/; versioned Windmill code under windmill/; rotation catalogue playbooks/secrets/accounts.ymlA store for live tokens, passwords or unreviewed production-only changes
AWX on srv-autoSynchronizes the configured Git project/branch; maintains inventories, credentials, RBAC, Job Templates and the execution and logs of Ansible jobsA copy of every workflow's application-facing UI or a second source of truth for the playbook source
Windmill on srv-wd, workspace iscOrchestrates 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 notificationA separate Ansible executor or a repository of duplicated playbooks
OpenBao and ISC agent on srv-baoSecret management and the existing AWX-token rotation/synchronization into Windmill variables, as documented belowA 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
RuleWhy
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/awxThis is the only path the rotation agent updates.
f/secrets/awx_token and f/awx-secrets/awx_token stay separateTwo 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 anythingFolder 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 folderSeparate 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_configuration calls the appropriate configured AWX Job Templates, while Git playbooks/ contains the underlying Ansible playbooks. Use lowercase snake_case for new leaf names and f/<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 proven windmill/f/secrets/awx_run_job.py and windmill/f/calc/awx_run_job.py patterns 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-c0 currently 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 existing f/secrets/ high-privilege rotation flows. Grant access to groups, not just individual employees; review both edit/deploy and run-as permissions. Do not use svcbaowindmillsync to 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 JTRoot login used
1DNS + Hostname (execute_dns_hostname)38 DNS + Hostname (FreeIPA) (JT 10 until 2026-11-16)base credential 9
2Enroll client (execute_enroll_client)11base credential 9
3fail2ban (execute_fail2ban)20base credential 9
4Foreman register (execute_foreman_register)15base credential 9
5NFS mount (execute_nfs_mount)13base credential 9
6Netdata (execute_netdata_enrollment)28base credential 9
7Update and reboot (execute_reboot)16base credential 9
8Change root password (change_root_password)18sets the root - <host> entry in Vaultwarden
Re-running part of the flow
  • 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 run playbooks/reboot.yml from WSL with the Vaultwarden password on stdin; JT 16 has no Vaultwarden variant yet (todo).
  • A step can fail in Windmill (ConnectionError while 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​

caution
Keep the caddy_data volume

Caddy stores its certificates and ACME account in the caddy_data volume. Deleting it forces a new certificate request and can hit rate limits.

caution
Never run docker compose down -v

The -v flag deletes the db_data volume, which holds the entire Windmill state (scripts, flows, users, secrets, run history).

caution
Recreate workers with --pull never

The 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.

SettingValue
RAM6144 MB since 2026-11-12 (was 4096 MB) — no ballooning: PVE never takes memory back
Balloon devicekept (balloon unset = memory), so Proxmox shows the real RAM use (why)
Guest agentagent: enabled=1, qemu-guest-agent running
ApplyFull qm shutdown 128 then qm start 128 (a guest reboot does not apply it)
Disk50 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).

Disk during an update

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​

  1. Docker CE from the CentOS repository (compatible with Rocky):

    dnf -y install dnf-plugins-core
    dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    systemctl enable --now docker
  2. Files from the upstream repository in /root:

    curl https://raw.githubusercontent.com/windmill-labs/windmill/main/docker-compose.yml -o docker-compose.yml
    curl https://raw.githubusercontent.com/windmill-labs/windmill/main/Caddyfile -o Caddyfile
    curl https://raw.githubusercontent.com/windmill-labs/windmill/main/.env -o .env
  3. Start:

    docker compose up -d

    The 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​

ServiceRoleNotes
dbPostgreSQL 18Healthcheck pg_isready, volume db_data mounted on /var/lib/postgresql
windmill_serverAPI and UIPort 8000 (internal), 2525 for email triggers
windmill_workerJob execution3 replicas, 2048M limit each, privileged: true for PID namespace isolation
windmill_worker_nativeNative (in-process) jobs1 replica
windmill_indexerFull-text searchEnterprise Edition, disabled (replicas: 0)
windmill_extraLSP and debuggerMultiplayer disabled (Enterprise Edition), REQUIRE_SIGNED_DEBUG_REQUESTS=true
caddyReverse proxyPublishes 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.

SettingValue
caddy → BASE_URL<FQDN> (replaces ":80")
caddy → ports80:80, 443:443, 25:25
Windmill Base URLhttps://<FQDN> (Instance settings → Core → Base URL)
Certificate storagecaddy_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_ENVSREQUESTS_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​

BoundaryActual identity / storageResponsibility
FreeIPA → srv-wd hostFreeIPA host enrollment and CA trustHost identity, certificates and verified outbound TLS. Not Windmill application login.
People → WindmillLocal Windmill accounts in workspace iscWindmill currently does not use FreeIPA LDAP/LDAPS or Keycloak/SSO for application authentication. Host enrollment does not imply user SSO.
srv-bao → WindmillLocal 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-onlyThe 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/awxScoped 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/awxSeparate permission boundary for the secret-rotation Job Templates, not a replacement for the infrastructure account.
OpenBaoDedicated LDAP engines, KV secrets and narrowly authorized consumers elsewhere in the ISCNot 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?​

  1. 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.
  2. 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.
  3. 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.
  4. 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:

SettingValue
Server addresssrv-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.