Commit Graph
99 Commits
Author SHA1 Message Date
Ruben FiszelandClaude Opus 4.8 c8e4f31749 refactor(worker): drop docker image storage cap; scope rootless netns per-job
Remove the `docker_image_storage_size_mb` instance setting and the polling
storage monitor entirely. Now that `# docker` jobs are refused under nsjail
(the per-job podman daemon runs outside the sandbox), the asymmetry that
justified a docker-specific disk cap is gone: a normal job can already exhaust
host disk in non-nsjail modes, so a docker-only cap was inconsistent. Docker
jobs now use disk like any other job — bound it at the infra level.

Also scope the rootless slirp4netns network-backend override to the per-job
podman instance via a job-scoped `$HOME` containers.conf instead of a global
`/etc/containers` drop-in, so rootful podman elsewhere in the *-full image is
unaffected (flagged by cubic).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 02:15:39 +00:00
Ruben FiszelandClaude Opus 4.8 6269b1e86f docs(worker): note world-readable /proc (cmdline/args) exposure of docker jobs
The per-job-podman bind-mount escape can read world-readable host state — including
world-readable /proc (process cmdlines/args via `-v /proc`), other job dirs'
world-readable files, and the dep cache — but NOT 0400 files like /proc/<pid>/environ
(env secrets stay protected on a root worker). Document this in the security notes
(README + compose + code comment) with the corollary: don't pass secrets as
command-line args (windmill uses env). Verified: uid-1000 container via `-v /proc`
reading a root process's environ -> 'Permission denied'; its cmdline -> readable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 01:48:57 +00:00
Ruben FiszelandClaude Opus 4.8 cd1930c06a feat(worker): don't auto-provide per-job podman for docker jobs under nsjail
Enabling nsjail is an explicit 'fully sandbox jobs' signal, but the per-job podman
daemon runs OUTSIDE the jail and a # docker script can bind-mount worker-visible
paths through it — silently providing it under nsjail would be a surprising hole in
a setup the operator hardened on purpose. So refuse instead: under nsjail, a
# docker job with no explicitly-provided Docker daemon errors with guidance to use
DOCKER_HOST (a network-reachable daemon; a mounted unix socket isn't reachable in
the jail) or a non-nsjail worker group. nsjail is off by default (DISABLE_NSJAIL
defaults true → default workers use unshare/none), so docker-via-podman keeps
working out of the box; this only gates the explicit-nsjail case. Docs updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 01:39:49 +00:00
Ruben FiszelandClaude Opus 4.8 e1856d30ec feat(worker): drop per-job podman to non-root when worker is root (protect /proc env)
When the docker worker runs as root (the default for compose/helm workers), start
the per-job podman via `runuser` dropped to a non-root uid so it runs rootless.
This keeps the worker's secrets in /proc/<worker>/environ (DATABASE_URL etc.)
root-owned and therefore unreadable by a `docker run --pid=host` container, and
makes a container escape land unprivileged — without the fragile namespace
confinement (no unshare/mask/pid-ns, which conflicted with podman system service).

A non-root worker can't drop further (podman runs rootless as itself; a --pid=host
container shares its uid), so run the docker worker as root for the /proc protection.
The per-job podman + its containers are spawned in a new process group so teardown
and the storage-cap monitor kill the whole tree (podman is a runuser grandchild).

This does NOT confine the container's filesystem view — a `# docker` script can
still bind-mount worker-visible paths — so docker-capable workers remain a
trusted-tenant capability (documented). Reverses the earlier `user: 1000` advice:
keep the worker root; windmill drops podman itself.

e2e verified (bare-metal, worker as root): stock docker job runs (dropped rootless
podman); a uid-1000 --pid=host container reading the root worker's /proc/environ ->
'Permission denied' (DATABASE_URL/secret protected).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 01:33:51 +00:00
Ruben FiszelandClaude Opus 4.8 f245b2bbbc feat(worker): auto 'docker' tag for # docker jobs + soft image-storage cap
Tag-only routing (no new ScriptLang — the bash executor handles the annotation):
a Bash script with the '# docker' annotation and no explicit tag is auto-tagged
'docker' at script-create (stored on script.tag, before no-op detection) and at
preview push. 'docker' is added to DEFAULT_TAGS so default workers serve it out of
the box; run a worker group with WORKER_TAGS=docker to route docker jobs to
dedicated/bigger workers. Mirrors the routing half of bunnative/nativets.

Soft size cap for the per-job rootless-podman image store via a new instance
setting docker_image_storage_size_mb (default 8GB; 0 = uncapped). A background
monitor polls the graphroot ('podman unshare du', robust to subuid-owned overlay
layers) and, past the cap, logs a clear error and tears the runtime down (kills the
service so an in-flight pull fails, 'system reset' to stop containers + free space).
This is the rootless-compatible enforcement: a uid-1000 worker cannot mount a sized
tmpfs even when privileged, so a kernel hard-cap isn't available; soft (overshoot
up to one ~2s poll). Without this, # docker jobs could fill the worker disk under
nsjail, unlike other languages capped by the nsjail tmpfs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 17:20:37 +00:00
Ruben FiszelandClaude Opus 4.8 3e9f636aae docs(docker): enable # docker on the default worker (full image + /dev/fuse)
Replace the dedicated windmill_worker_docker group example with guidance on the
default worker: since # docker scripts are tagged "bash" they already run there,
so the only requirements are a *-full image (ships podman) and the /dev/fuse
device — no dedicated group or custom tag. Also note the *-full image's bundled
runtimes (Java, .NET, Ruby, R, Rust, Ansible, Nushell; Oracle/Kerberos in EE).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 15:23:13 +00:00
Ruben FiszelandClaude Opus 4.8 cccd8b9847 refactor(worker): auto-select podman vs provided Docker daemon; drop container_runtime config
Remove the per-worker-group container_runtime option entirely and decide the docker
runtime automatically: for a `# docker` job, if a Docker daemon is already provided
(DOCKER_HOST set or /var/run/docker.sock mounted) use it (backwards compatible,
unchanged); otherwise start a per-job rootless podman (its own ephemeral daemon,
torn down with the job). podman must be present (the *-full images) — else a clear
error.

Removed: container_runtime from WorkerConfigOpt/WorkerConfig/load_worker_config/
WORKER_CONFIG/monitor, the CE config allowlist entry, and the frontend "Container
runtime" toggle. docker-compose / README: the windmill_worker_docker example no
longer sets CONTAINER_RUNTIME (podman is automatic when no daemon is provided).

Verified e2e: a worker with no CONTAINER_RUNTIME and no DOCKER_HOST auto-runs a
# docker job via per-job podman; the provided-daemon (legacy) path is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:45:13 +00:00
Ruben FiszelandClaude Opus 4.8 40a387a17b docs+build: drop legacy dind from compose, fix full-image podman prereqs
docker-compose.yml / README: remove the legacy dind sidecar and the
DOCKER_HOST/host-socket opt-in comments (confusing now that podman is the way).
Present a single clean path: a dedicated windmill_worker_docker group with the
rootless podman runtime (full image, user 1000, privileged + /dev/fuse,
CONTAINER_RUNTIME=podman, WORKER_TAGS=docker). `# docker` scripts are tagged by
language ("bash"), so routing is via a custom "docker" tag — documented. The
legacy externally-provided DOCKER_HOST / mounted /var/run/docker.sock still works
in the backend; it's just no longer advertised in the quickstart.

DockerfileFull/FullEe: two fixes required for podman-in-container (found by
testing a containerized worker):
- chmod u+s newuidmap/newgidmap — rootless subuid mapping fails if the package's
  file caps are lost in image layers.
- default rootless networking to slirp4netns (containers.conf.d) — the netavark
  bridge default fails rootless on hosts without the needed nftables setup.

Verified e2e (podman-in-docker): a containerized worker ran a # docker job via
per-job rootless podman with both fixes + privileged + /dev/fuse; confinement held.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:30:25 +00:00
Ruben FiszelandClaude Opus 4.8 d6171b7d79 docs: recommend rootless podman worker group over legacy dind
Reframe the dind sidecar as legacy in docker-compose.yml and the README, and
point to the recommended path: a dedicated worker group with the rootless podman
container runtime (CONTAINER_RUNTIME=podman / the Container runtime UI option),
which keeps `# docker` scripts unchanged while removing the privileged daemon and
the network-reachable socket. Add a commented windmill_worker_docker example
(full image, user 1000, /dev/fuse) with honest caveats: it runs podman inside the
worker container, so memory monitoring needs cgroup v2 delegation and the
strongest isolation comes from a dedicated host.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 13:03:48 +00:00
Ruben FiszelandClaude Opus 4.8 c2a133c169 docs(security): make dind opt-in and warn about untrusted use
The repo-root docker-compose.yml quickstart ran a privileged root Docker
daemon (dind) on tcp://dind:2375 with no TLS on the worker network, and
pointed workers at it via DOCKER_HOST. Because user scripts share the
worker network namespace (no --net isolation by design), any user who can
run a script could reach the daemon and escalate to root on the dind host.

This is a docs/deployment hardening change only — no worker sandbox or
network-isolation behavior is changed:

- Gate the dind sidecar behind the "dind" compose profile so it no longer
  starts by default; make DOCKER_HOST and the dind depends_on opt-in.
- Add a prominent SECURITY WARNING comment on the dind service and a
  warning callout in the README self-host section: trusted single-tenant
  use only, never untrusted/multi-tenant.
- Document how to enable dind TLS + client-cert auth (DOCKER_TLS_CERTDIR,
  tcp://dind:2376, cert volumes), including the caveat that TLS does not
  protect against a malicious script running on the worker itself.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 10:46:53 +00:00
Ruben Fiszel fbb6170650 rm cpus limit 2026-03-31 07:19:38 +00:00
Ruben Fiszel d6957aaf31 remove NUN_WORKERS 2026-03-31 07:16:33 +00:00
Ruben FiszelandClaude Opus 4.6 5501b7a729 replace host docker socket with dind sidecar for isolation (#8531)
* feat: replace host docker socket with dind sidecar for isolation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: comment out dind sidecar by default to avoid wasting resources

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: enable dind by default, comment out insecure host socket mount

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 21:33:17 +00:00
hugocasa 535e108cbf feat: native mode (#7939)
* feat: native mode

* improve

* fix build

* review fixes

* tracing nit
2026-02-16 23:36:41 +00:00
Ruben Fiszel 4c4cee0154 modify docker-compose to favor unshare pid 2026-02-12 19:43:04 +00:00
Ruben FiszelandClaude Opus 4.5 f8cbf15d86 refactor: change debugger port from 5679 to 3003
Updates the debugger service to use port 3003 instead of 5679 across
all configuration files, documentation, and code references. This aligns
the debugger with the other windmill-extra services which use ports
3001 (LSP) and 3002 (Multiplayer).

Changes:
- docker-compose.yml: Update port exposure and add DEBUGGER_PORT env
- docker/entrypoint-extra.sh: Change default port from 5679 to 3003
- debugger/dap_debug_service.ts: Update default port in code and docs
- debugger/README.md: Update port documentation
- debugger/test_debug_service.ts: Update test URLs
- docker/test_windmill_extra.ts: Update test configuration
- .github/workflows/publish_extra.yml: Update test container ports
- frontend/src/lib/components/debug/*: Update frontend examples and defaults

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:58:12 +00:00
Ruben Fiszel 4451a37999 feat: debuggers for python and bun v0 (#7546) 2026-01-13 15:20:06 +00:00
Alexander Petric 59fd9e909d document HOME env var for non-root/windmill user (#7466) 2026-01-09 09:41:50 +00:00
Alexander Petric 5aa251a2d2 feat(security): unshare pid of worker job process (#7106)
* feat(security): unbind pid for worker jobs to create extra process isolation

* review

* simplify

* cleanup + compose files

* re-add removed comments from nu executor

* simplify

* fail immediately

* updates

* update ping backend

* nsjail / unshare in workers page

* migrations

* frontend + sqlx

* frontend

* frontend

* fix error message

* undo example changes
2025-11-18 23:04:31 +00:00
centdixandwindmill-internal-app[bot] 49524d5b28 chore(aiagent): store memory in db (#7053)
* store to db

* no warning in context

* warning in frontend

* remove log

* 100kb + alert

* update sqlx

* update eeref

* Update ee-repo-ref.txt

* cleaning

---------

Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
2025-11-07 15:27:00 +00:00
centdix 820437c897 chore(flow): clean flow conversation code (#6755)
* use own folder for memory

* fixes

* better chat interface

* fix export tab

* move in folder

* dont show flow graph if chat mode

* fix

* fix too long title

* fix user message

* fix

* fix

* remove from server

* cleaner

* cleaning

* cleaning

* cleaning
2025-10-06 15:10:29 +00:00
Ruben Fiszel 54f36fcce7 remove default db port on docker-compose 2025-08-21 01:35:59 +00:00
wendrul cd7ab5165e Change port for indexer (to remove collision with prometheus) (#5619) 2025-04-15 11:07:20 +00:00
Alexander Petric dad829adf4 feat: adding docker log rotation by default in docker compose (#5295)
* feat: adding docker log rotation by default in docker compose

* add newline

* add compression
2025-02-14 20:48:33 +01:00
HugoCasa 31f61ab7a2 cache caddy data in docker compose (#5159) 2025-01-28 16:08:17 +01:00
Alexander Petric 0a7268714c give option to run container as non-root windmill user (#4959)
* main docker file

* fix docker image build test tag

* don't remove tag

* make root user default

* chown tmp folder

* create search and logs folder in order to inherite windmill user permissions

* Dockerfile

* lsp non root

* improving lsp image to get rid of critical vulnerabilities

* formatting

* support /root/.cache mount

* make the cache mount backwards compatible
2025-01-03 16:51:31 +01:00
wendrul ff8e98feb8 Remove unused env vars from docker compose + css fixes (#4841) 2024-12-04 18:33:41 +01:00
Henri Courdent 1344517bc7 Gi syntax docker compose (#4803) 2024-11-27 14:29:41 +01:00
Ruben Fiszel fa2f5e1b3f fix: improve app reports puppeteer interactions 2024-09-05 10:07:21 +02:00
HugoCasa 80a41669b2 feat: email triggers (#4163)
* feat: email triggers v0

* update docker compose to nginx with tcp reverse proxy + move smtp to private

* fix: open source build

* test: update ee ref for testing

* feat: use caddy with layer4

* fix: nit

* feat: configurable email domain

* fix: nit

* fix: nit

* fix: get l4 from main

* fix: default email domain to mail.domain

* update ee ref
2024-08-06 16:17:33 +02:00
wendrul 660a44c8f5 feat: Indexing improvements (#4167) 2024-08-01 16:57:42 +02:00
Ruben Fiszel 340868d282 feat: remove nativets in favor of bun with native pragma 2024-07-29 19:26:26 +02:00
Ruben Fiszel acac2f445b fix docker-compose 2024-07-24 19:05:31 +02:00
Ruben Fiszel 2f1d7349b9 fix: move bun cache to non mounted volume to benefit from cache optimization 2024-07-24 18:25:21 +02:00
wendrul d8fa36b7ad add more logs, change a fetch_one to opt and add back show memory every (#4087)
* add more logs, change a fetch_one to opt and add back show memory every

* Update ee repo ref
2024-07-16 14:14:21 +02:00
wendrul af444c8b36 feat: Full-text search on runs using tantivy and command palette for quick actions (#4046)
* Add indexer crate and files

* POC searcher

incomplete schema
only indexes at startup

* POC search component frontend

* Demo of the frontend element

* add Results and Args as text

* minimal functionality

* Make jump to scripts by name

also flows and apps

* Add button on sidebar to open search

* Update lock on indexer after merge

* Make arrow key navigation compatible with scrol

* Show empty result screen and log as a coming feat

* Add summary to script searchable items

* Catch `parts is undefined` error (uFuzzy)

* Index refreshing using tokio interval

* Fix JobLoader workspace being wrongly defined

* Fix click outside

* Add debouncing for completed run search

* Binary mode working + job index tracker

* Warning for no license + fix height scrollbars on content search

* Make it compile without EE files

* remove panic to use errors

* Move global search

* Cleanup UI, no more tab switcher but clear placeholders and actions

* Add tantivy feature flag for windmill-api

* Rework indexer mode

* Mac compatibility for shortcut

* Update test for new run_server

* Prepare sqlx

* Mac compatibility

* Fix openapi yaml

* Fix frontend

* Frontend api fix

* Update docker-compose.yml and caddyfile

With the (by default deactivated) container and reverse proxy to use the
windmill indexer

* fix feature flag for tests

* fix feature falg for running tests

* fix feature flag for running tests

* Make content search use search modal instead

* Add tantivy feature to ee build steps

* Remove old Content search

* change volume location for indexer

* Update dependencies

* Prepare sqlx

* Uncomment line on docker compose

* Add line between input and results

* Update ee repo ref
2024-07-11 11:13:27 +02:00
Ruben Fiszel aae70ac6cb feat: logs can be downloaded directly from server/frontend if using shared volume 2024-05-12 04:16:04 +02:00
Jacopo Bonomi 8398003809 typo error on comment (#3225) 2024-02-14 19:40:31 +01:00
Ruben Fiszel 92639a15d3 updating docker-compose to pg16 + increase shm size 2024-02-11 23:58:34 +01:00
Bret Mogilefsky 2f15b62ca9 Fix typo in docker-compose.yml comment (#3056) 2024-01-21 21:01:46 +01:00
Guillaume Bouvignies 326eac46fc feat: File path is option when uploading a file to S3 (#3029)
* feat: File path is option when uploading a file to S3

* Add frontend

* Fix lock

* Drag and drop file upload UI
2024-01-19 14:17:42 +01:00
HugoCasaandRuben Fiszel 2768379885 feat: app reports v2 (#2778)
* fix: schema autocomplete

* feat: app reports v2

* fix: remove global copilot api call

* feat: nits

* fix: backward compatible slack notif

* feat: nits

* feat: log browser logs

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2023-12-05 18:55:46 +01:00
Guillaume Bouvignies 60ca8eec5d chore: Update comments for Caddy with HTTPS (#2569) 2023-11-06 18:25:32 +01:00
Ruben Fiszel f6d55da783 update deno to 1.38.0 and bun to 1.0.8 2023-11-04 18:22:53 +01:00
Ruben Fiszel d97e99edb8 add static version to lsp in docker-compose 2023-11-01 01:47:54 +01:00
Ruben Fiszel 35665cf102 fix: move keep job directories and expose debug metrics to instance settings UI 2023-10-26 13:08:39 +02:00
Ruben Fiszel 57dc62b298 fix: prometheus metrics are an instance settings 2023-10-25 23:32:47 +02:00
Ruben Fiszel 17129fdf0f add MODE env variable 2023-10-16 15:20:50 +02:00
Ruben Fiszel 36da52b269 remove license key from .env 2023-10-12 00:46:31 +02:00
Ruben Fiszel fdbb393a5f update docker-compose 2023-09-21 15:08:02 +02:00