Skip to content

Commit 4b89009

Browse files
authored
feat: add WUD monitoring template (#1242)
* feat: add WUD monitoring template * feat(wud): exclude Dokploy infrastructure by default
1 parent 58c610d commit 4b89009

7 files changed

Lines changed: 493 additions & 0 deletions

File tree

‎blueprints/wud/docker-compose.yml‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
services:
2+
wud:
3+
image: ghcr.io/getwud/wud:9.5.0
4+
restart: unless-stopped
5+
env_file:
6+
- path: .env
7+
required: false
8+
environment:
9+
WUD_AUTH_ADMIN_USER: "${WUD_AUTH_ADMIN_USER:-admin}"
10+
WUD_AUTH_ADMIN_PASSWORD: "${WUD_AUTH_ADMIN_PASSWORD:?Keep the generated administrator password}"
11+
WUD_SERVER_PORT: "3000"
12+
WUD_SERVER_TLS_ENABLED: "false"
13+
WUD_STORE_PATH: /store
14+
WUD_STORE_FILE: wud.sqlite
15+
WUD_WATCHER_DOCKER_LOCAL_HOST: wud-socket-proxy
16+
WUD_WATCHER_DOCKER_LOCAL_PORT: "2375"
17+
WUD_WATCHER_DOCKER_LOCAL_WATCHBYDEFAULT: "${WUD_WATCHER_DOCKER_LOCAL_WATCHBYDEFAULT:-true}"
18+
WUD_WATCHER_DOCKER_LOCAL_WATCHALL: "${WUD_WATCHER_DOCKER_LOCAL_WATCHALL:-false}"
19+
WUD_WATCHER_DOCKER_LOCAL_WATCHATSTART: "true"
20+
WUD_WATCHER_DOCKER_LOCAL_CRON: "${WUD_WATCHER_DOCKER_LOCAL_CRON:-0 * * * *}"
21+
WUD_LOG_LEVEL: "${WUD_LOG_LEVEL:-info}"
22+
WUD_LOG_FORMAT: json
23+
TZ: "${TZ:-UTC}"
24+
expose:
25+
- "3000"
26+
volumes:
27+
- wud-data:/store
28+
depends_on:
29+
wud-socket-proxy:
30+
condition: service_healthy
31+
cap_drop:
32+
- ALL
33+
security_opt:
34+
- no-new-privileges:true
35+
healthcheck:
36+
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:3000/health"]
37+
interval: 30s
38+
timeout: 5s
39+
retries: 3
40+
start_period: 30s
41+
stop_grace_period: 30s
42+
logging: &logging
43+
driver: json-file
44+
options:
45+
max-size: "10m"
46+
max-file: "3"
47+
48+
wud-socket-proxy:
49+
image: ghcr.io/tecnativa/docker-socket-proxy:v0.5.0
50+
restart: unless-stopped
51+
environment:
52+
CONTAINERS: "1"
53+
IMAGES: "1"
54+
EVENTS: "1"
55+
PING: "1"
56+
VERSION: "1"
57+
POST: "0"
58+
expose:
59+
- "2375"
60+
volumes:
61+
- type: bind
62+
source: /var/run/docker.sock
63+
target: /var/run/docker.sock
64+
read_only: true
65+
bind:
66+
create_host_path: false
67+
read_only: true
68+
tmpfs:
69+
- /run
70+
- /tmp
71+
cap_drop:
72+
- ALL
73+
security_opt:
74+
- no-new-privileges:true
75+
healthcheck:
76+
test: ["CMD", "wget", "--quiet", "--output-document=-", "http://127.0.0.1:2375/_ping"]
77+
interval: 30s
78+
timeout: 5s
79+
retries: 3
80+
start_period: 10s
81+
stop_grace_period: 30s
82+
logging: *logging
83+
84+
volumes:
85+
wud-data:

‎blueprints/wud/environment.md‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Environment variables
2+
3+
This template targets WUD **9.5.0**. Provider settings are read from the environment at startup; add optional values in Dokploy's Environment tab and redeploy. The optional `.env` file forwards additional WUD settings without requiring a Compose edit. Values explicitly set in Compose take precedence over `.env`.
4+
5+
## Required administrator settings
6+
7+
| Variable | Template value | Purpose |
8+
| --- | --- | --- |
9+
| `WUD_AUTH_ADMIN_USER` | `admin` | Local administrator username; editable. |
10+
| `WUD_AUTH_ADMIN_PASSWORD` | Generated random hexadecimal string | Required by this template. Plaintext bootstrap input; WUD stores a bcrypt hash. Reapplied to this account on **every startup**. Rotate it here rather than only in the UI. |
11+
12+
No provider credential or separate session secret is required. Upstream also supports `WUD_AUTH_ADMIN_HASH`, legacy `WUD_AUTH_BASIC_*`, and OIDC; those are alternative authentication designs, not additional installation requirements. Do not set a conflicting admin hash alongside this template's password. See [authentication](https://getwud.app/docs/configuration/authentications/).
13+
14+
## Editable defaults
15+
16+
| Variable | Template value | Purpose |
17+
| --- | --- | --- |
18+
| `WUD_WATCHER_DOCKER_LOCAL_WATCHBYDEFAULT` | `true` | Monitor running containers that pass the filters. Set `false` for explicit opt-in labels. |
19+
| `WUD_WATCHER_DOCKER_LOCAL_EXCLUDE` | `^dokploy([._-]\|$)` | Skip standard Dokploy infrastructure names by default. Remove this variable and redeploy to include them. Explicit `wud.watch=true` labels override the filter. See [monitoring scope](instructions.md#dokploy-infrastructure-is-ignored-by-default). |
20+
| `WUD_WATCHER_DOCKER_LOCAL_WATCHALL` | `false` | Set `true` to include stopped containers. |
21+
| `WUD_WATCHER_DOCKER_LOCAL_CRON` | `0 * * * *` | Hourly scan in `TZ`; upstream adds up to 60 seconds of random jitter. |
22+
| `WUD_LOG_LEVEL` | `info` | `trace`, `debug`, `info`, `warn`, `error`, or `fatal`. |
23+
| `TZ` | `UTC` | Time zone for cron and timestamps, for example `Europe/Paris`. |
24+
25+
The exclusion matches container names, not image names: application Redis/PostgreSQL containers with other names remain monitored. To include Dokploy infrastructure, remove the entire exclusion line, save and redeploy, then select **Containers → Watch now**. Do not leave an empty `WUD_WATCHER_DOCKER_LOCAL_EXCLUDE=` entry: WUD rejects empty filter values. No Compose edit is needed.
26+
27+
## Fixed service settings
28+
29+
These values are set in Compose. Change them there only as part of a coordinated customization.
30+
31+
| Variable | Value | Reason |
32+
| --- | --- | --- |
33+
| `WUD_WATCHER_DOCKER_LOCAL_HOST` | `wud-socket-proxy` | Keeps the Docker socket out of the WUD container. |
34+
| `WUD_WATCHER_DOCKER_LOCAL_PORT` | `2375` | Private proxy port, never published. |
35+
| `WUD_WATCHER_DOCKER_LOCAL_WATCHATSTART` | `true` | Enables startup discovery when the stored container list is empty. For a populated store, use the watch action or scheduled scan. |
36+
| `WUD_SERVER_PORT` | `3000` | Matches the Dokploy domain and health check. |
37+
| `WUD_SERVER_TLS_ENABLED` | `false` | Traefik handles public HTTPS. |
38+
| `WUD_STORE_PATH` | `/store` | Persistent volume target. |
39+
| `WUD_STORE_FILE` | `wud.sqlite` | SQLite database filename. |
40+
| `WUD_LOG_FORMAT` | `json` | Structured logs and direct Node process startup. |
41+
42+
The socket proxy permits `CONTAINERS=1`, `IMAGES=1`, `EVENTS=1`, `PING=1`, and `VERSION=1`. `POST=0` blocks write methods; other API sections retain their denied defaults. These are fixed proxy service settings, not WUD environment variables. See [Docker Socket Proxy](https://github.com/Tecnativa/docker-socket-proxy).
43+
44+
## Optional application and provider settings
45+
46+
WUD's provider names are dynamic. For example, `LOCAL` identifies this template's Docker watcher and `ALERTS` can identify a notification trigger. The following are optional; use the linked official schemas for the fields of the providers you actually enable.
47+
48+
| Variable or family | Default / use | Documentation |
49+
| --- | --- | --- |
50+
| `WUD_WATCHER_DOCKER_LOCAL_INCLUDE` | Unset; optional container-name or `label:` allowlist. The template's default exclusion is documented above. Explicit `wud.watch` labels take precedence over both filters. | [Docker watcher](https://getwud.app/docs/configuration/watchers/) |
51+
| `WUD_WATCHER_DOCKER_LOCAL_WATCHEVENTS` | `true`; follows lifecycle events. | [Docker watcher](https://getwud.app/docs/configuration/watchers/) |
52+
| `WUD_WATCHER_DOCKER_LOCAL_JITTER` | `60000` milliseconds; random scan delay. | [Docker watcher](https://getwud.app/docs/configuration/watchers/) |
53+
| `WUD_REGISTRY_{TYPE}_{NAME}_*` | Optional private-registry credentials and registry-specific options. Public images can use anonymous access, subject to rate limits. | [Registries](https://getwud.app/docs/configuration/registries/) |
54+
| `WUD_TRIGGER_{TYPE}_{NAME}_*` | Optional notification provider settings. Required credentials depend on the chosen provider. No triggers are configured by default. | [Triggers](https://getwud.app/docs/configuration/triggers/) |
55+
| `WUD_AUTH_OIDC_{NAME}_*` | Optional SSO provider settings; issuer/client credentials and group mapping depend on the provider. | [OIDC](https://getwud.app/docs/configuration/authentications/oidc/) |
56+
| `WUD_PUBLIC_URL` | Inferred from the request; set to your canonical HTTPS URL if needed for links or SSO. | [Authentication](https://getwud.app/docs/configuration/authentications/) |
57+
| `WUD_SERVER_FEATURE_DELETE` | Upstream `true`; allows deleting a tracked record from WUD, not deleting its Docker container. | [Server](https://getwud.app/docs/configuration/server/) |
58+
| `WUD_SERVER_CORS_ENABLED` | `false`; keep disabled for the normal same-origin dashboard. | [Server](https://getwud.app/docs/configuration/server/) |
59+
| `WUD_SERVER_BASEPATH` | `/`; use a dedicated Dokploy domain with this template. | [Server](https://getwud.app/docs/configuration/server/) |
60+
| `WUD_SERVER_ENABLED` | `true`; leave enabled for the dashboard and health check. | [Server](https://getwud.app/docs/configuration/server/) |
61+
| `WUD_RUN_MODE` | `server`; leave unchanged. `oneshot` is a separate CLI deployment mode. | [Configuration](https://getwud.app/docs/configuration/) |
62+
| `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` | Unset; optional outbound proxy. Include `wud-socket-proxy,localhost,127.0.0.1` in `NO_PROXY` when enabling a proxy. | [Proxy settings](https://getwud.app/docs/configuration/#proxy--tls-configuration) |
63+
| `NODE_EXTRA_CA_CERTS` | Optional path to a mounted PEM CA bundle for private registries/proxies. | [Proxy settings](https://getwud.app/docs/configuration/#proxy--tls-configuration) |
64+
65+
WUD supports `WUD_*__FILE` secret references. Mount a readable secret file and point the corresponding variable at its container path; adding a path alone does not create the file. The file value is read and trimmed at startup. This is an advanced alternative to storing a value directly in Dokploy's Environment tab.
66+
67+
Per-container `wud.*` labels are not environment variables. Configure tag inclusion/exclusion and digest tracking on each monitored application; see the [labels guide](https://getwud.app/docs/configuration/watchers/labels/). In Compose, escape a literal dollar sign as `$$` where interpolation would otherwise occur. No `PUID`/`PGID` or database credentials are needed by the official WUD image.

‎blueprints/wud/instructions.md‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# WUD (What's Up Docker?)
2+
3+
WUD watches Docker containers, checks their image registries for newer versions, and displays available updates in a web dashboard. This template runs WUD 9.5.0 with persistent SQLite storage and a Docker socket proxy that permits monitoring requests and blocks Docker writes. Notifications are optional; automatic container updates are not configured.
4+
5+
Official documentation: [Quick start](https://getwud.app/docs/quickstart/), [configuration](https://getwud.app/docs/configuration/), [Docker watcher](https://getwud.app/docs/configuration/watchers/), and [source code](https://github.com/getwud/wud).
6+
7+
## Deploy in Dokploy
8+
9+
1. Import the template. Dokploy generates `WUD_AUTH_ADMIN_PASSWORD`; the username defaults to `admin`. Keep the generated password private, or replace it with your own strong value.
10+
2. Enable **Isolated Deployment** for this Compose service before deploying. Dokploy should place WUD and its socket proxy on the stack's private network. Do not add a domain or publish a port for `wud-socket-proxy`.
11+
3. Set your domain to service `wud`, port `3000`, and enable HTTPS with HTTP redirection in Dokploy. Traefik terminates TLS; WUD uses HTTP inside the stack.
12+
4. Deploy and wait for both services to become healthy. Open the domain and sign in using the values from the Environment tab.
13+
5. Inspect the Containers page. The local watcher monitors running containers on the Docker host where this stack is deployed, excluding Dokploy infrastructure by default as described below. Registry checks run hourly, with up to 60 seconds of jitter. Use the UI's watch action when you need an immediate scan.
14+
15+
No external database, registry account, notification service, or password-hashing command is required. Public registries work anonymously within their rate limits. Large hosts or frequent scans may need registry credentials.
16+
17+
## Monitoring scope and Docker access
18+
19+
### Dokploy infrastructure is ignored by default
20+
21+
The template adds this editable filter to Dokploy's Environment tab:
22+
23+
```dotenv
24+
WUD_WATCHER_DOCKER_LOCAL_EXCLUDE=^dokploy([._-]|$)
25+
```
26+
27+
It skips version tracking for containers named `dokploy` or beginning with `dokploy-`, `dokploy_`, or `dokploy.`. This covers standard Dokploy infrastructure names such as `dokploy-traefik`, `dokploy-postgres`, and `dokploy-redis`, including their usual Compose/Swarm suffixes. Dokploy upgrades remain managed through Dokploy.
28+
29+
This is a **container-name** filter. Your application databases and other workloads with different names are still monitored; an application deliberately named with a matching `dokploy` prefix is also excluded. Customize the expression if your infrastructure uses different names.
30+
31+
To track Dokploy infrastructure too, remove the entire `WUD_WATCHER_DOCKER_LOCAL_EXCLUDE` line from Dokploy's Environment tab, save, and redeploy. Do not leave an empty `WUD_WATCHER_DOCKER_LOCAL_EXCLUDE=` entry: WUD rejects empty filter values. Then select **Containers → Watch now** to run a fresh scan. To include just one excluded container, add `wud.watch: "true"` to that service's Docker labels and recreate it; this explicit label takes precedence over the exclusion filter.
32+
33+
### Other monitoring controls
34+
35+
`WUD_WATCHER_DOCKER_LOCAL_WATCHBYDEFAULT=true` discovers running containers that pass the filter. Set it to `false` for opt-in monitoring, then add `wud.watch: "true"` to each monitored service's Docker labels. A `wud.watch: "false"` label excludes a container. These labels belong on the services being monitored, not in WUD's Environment tab.
36+
37+
Stopped containers are excluded by default. Set `WUD_WATCHER_DOCKER_LOCAL_WATCHALL=true` to include them. Optional include/exclude patterns, tag filters, digest tracking, and release links are covered in [environment.md](environment.md) and the [container label guide](https://getwud.app/docs/configuration/watchers/labels/).
38+
39+
Only the proxy mounts `/var/run/docker.sock`. This system socket is the intentional host bind mount; it must already exist on a normal Linux Docker host. WUD connects to `wud-socket-proxy:2375`, with container/image reads and Docker events allowed. `POST=0` blocks write methods, including container start/stop, exec, image pulls, and deletion. A read-only socket mount alone would not block those Docker API operations.
40+
41+
Container inspection can expose host workload metadata and environment values, so keep proxy access within the isolated stack. Do not expose port 2375 or broaden proxy permissions for normal monitoring. This template observes one Docker host; it does not automatically discover remote Dokploy servers or configure a Swarm/Kubernetes watcher.
42+
43+
## Notifications and updates
44+
45+
Add notification variables in Dokploy's Environment tab, then redeploy. WUD loads optional values from `.env`. For example, an optional Ntfy trigger needs:
46+
47+
```dotenv
48+
WUD_TRIGGER_NTFY_ALERTS_URL=https://ntfy.sh
49+
WUD_TRIGGER_NTFY_ALERTS_TOPIC=your-private-topic
50+
```
51+
52+
Use your server's authentication settings where needed. See the official [trigger documentation](https://getwud.app/docs/configuration/triggers/) for supported providers and required credentials. No notification provider is required to install WUD.
53+
54+
Watcher, registry, and trigger settings are configured through the environment; their configuration pages in WUD display the effective settings. User accounts, preferences, and API tokens can be managed in the app.
55+
56+
The template does not configure Docker or Docker Compose update triggers. Keep changes to Dokploy-managed applications in Dokploy so its deployment configuration stays authoritative. Adding an updater would require a separate, deliberate change to the proxy permissions and deployment design. Triggers can run automatically when configured; do not add a Docker updater merely to test notifications.
57+
58+
## Passwords, persistence, and backups
59+
60+
WUD reapplies `WUD_AUTH_ADMIN_USER` and `WUD_AUTH_ADMIN_PASSWORD` on every startup, including an existing account. Rotate this administrator's password in Dokploy's Environment tab and redeploy. Changing only that account's password in WUD will be overwritten on the next restart. Additional users are stored in the database and can be managed in WUD.
61+
62+
The `wud-data` volume stores `/store`, including `wud.sqlite`, its WAL files, users, token hashes, preferences, monitored containers, history, and snoozes. Keep one WUD instance per volume. Back up the complete volume while WUD is stopped, or use a SQLite-aware backup method. Copying only the live `wud.sqlite` file can miss recent writes in the WAL. Keep an off-server copy and protect it as sensitive data.
63+
64+
The official image handles store creation and migrations. It runs as root; this template drops all Linux capabilities and prevents privilege escalation. Do not force a different UID without preparing and checking volume ownership. Back up before changing the pinned image version and review the [release notes](https://github.com/getwud/wud/releases).
65+
66+
### HTTPS and health behavior in 9.5.0
67+
68+
Use HTTPS and HTTP redirection for regular access. WUD 9.5.0 sets an HttpOnly session cookie, but its upstream implementation does not add Secure or SameSite cookie attributes. This template does not modify the published application image. You may need to sign in again after a container recreation or upgrade because WUD derives its session secret from the version and network interface.
69+
70+
GET `/health` is public HTTP liveness. It does not prove that Docker discovery or registry checks succeeded: also check the local watcher, discovered containers, and scan errors. The API and dashboard require authentication.
71+
72+
See [environment.md](environment.md) for settings and [testing.md](testing.md) for verification steps.

‎blueprints/wud/meta.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"id": "wud",
3+
"name": "WUD (What's Up Docker?)",
4+
"version": "9.5.0",
5+
"description": "WUD monitors Docker containers for image updates and shows available versions in a web dashboard. This template includes administrator authentication, persistent storage, and a Docker socket proxy that blocks write requests.",
6+
"logo": "wud.svg",
7+
"links": {
8+
"github": "https://github.com/getwud/wud",
9+
"website": "https://getwud.app/",
10+
"docs": "https://getwud.app/docs/quickstart/"
11+
},
12+
"tags": ["monitoring", "docker", "devops"]
13+
}

‎blueprints/wud/template.toml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[variables]
2+
main_domain = "${domain}"
3+
admin_password = "${hash:48}"
4+
5+
[config]
6+
env = [
7+
"WUD_AUTH_ADMIN_USER=admin",
8+
"WUD_AUTH_ADMIN_PASSWORD=${admin_password}",
9+
"WUD_WATCHER_DOCKER_LOCAL_WATCHBYDEFAULT=true",
10+
"WUD_WATCHER_DOCKER_LOCAL_EXCLUDE=^dokploy([._-]|$)",
11+
"WUD_WATCHER_DOCKER_LOCAL_WATCHALL=false",
12+
"WUD_WATCHER_DOCKER_LOCAL_CRON=0 * * * *",
13+
"WUD_LOG_LEVEL=info",
14+
"TZ=UTC"
15+
]
16+
17+
[[config.domains]]
18+
serviceName = "wud"
19+
port = 3000
20+
host = "${main_domain}"

0 commit comments

Comments
 (0)