Skip to main content
Version: 9.x

Triggers

Triggers perform automated actions (such as sending notifications or executing updates) whenever a new container version is discovered.

Triggers are configured using environment variables following this naming pattern:

WUD_TRIGGER_{trigger_type}_{trigger_name}_{configuration_item}=value
Multiple Instances Supported

You can configure multiple triggers of the same type (for example, multiple SMTP or Discord destinations). Simply assign each one a distinct {trigger_name} identifier (e.g. WUD_TRIGGER_DISCORD_DEV_URL, WUD_TRIGGER_DISCORD_PROD_URL).


📂 Trigger Categories​

WUD supports 30+ triggers organized into three functional categories:


Common Trigger Configuration​

In addition to provider-specific settings, all triggers support the following common configuration variables:

WUD_TRIGGER_{trigger_type}_{trigger_name}_AUTO
Optionalbooleandefault: true

Whether to execute the trigger automatically (false requires manual execution via UI or API)

WUD_TRIGGER_{trigger_type}_{trigger_name}_BATCHTITLE
Optionalstringdefault: ${containers.length} updates available

Template used to render the notification title in batch mode

Allowed values:String template with `${count}`, `${hostname}`, `${watcher}` placeholders
WUD_TRIGGER_{trigger_type}_{trigger_name}_EVENTS
Optionalstringdefault: available

Subscribed container update lifecycle events. Can be overridden per container via wud.trigger.events or wud.trigger.<name>.events.

Allowed values:Comma-separated string of `available`, `pre`, `success`, `failure`, `rollback`
WUD_TRIGGER_{trigger_type}_{trigger_name}_FAILUREBODY
Optionalstringdefault: Container ${container.name} update failed: ${error}

Template used to render the notification body when an update fails

Allowed values:JS string template with `container` object and `error` string
WUD_TRIGGER_{trigger_type}_{trigger_name}_FAILURETITLE
Optionalstringdefault: Update FAILED for ${container.name}

Template used to render the notification title when an update fails

Allowed values:JS string template with `container` object
WUD_TRIGGER_{trigger_type}_{trigger_name}_INCLUDEBYDEFAULT
Optionalbooleandefault: true

Associate trigger with all containers by default (false makes it opt-in via container labels or wud.trigger.include)

WUD_TRIGGER_{trigger_type}_{trigger_name}_MODE
Optionalenumdefault: simple

Execution mode: trigger individually per container or batch all available updates into a single notification

Allowed values:`simple`, `batch`
WUD_TRIGGER_{trigger_type}_{trigger_name}_ONCE
Optionalbooleandefault: true

Execute trigger only once per detected update (prevents duplicate alerts on consecutive runs)

WUD_TRIGGER_{trigger_type}_{trigger_name}_ONDIGEST
Optionalbooleandefault: true

Enable or disable notifications when only the image digest has changed (without semver tag bump)

WUD_TRIGGER_{trigger_type}_{trigger_name}_ROLLBACKBODY
Optionalstringdefault: Container ${name} was rolled back from ${newImageRef} to ${oldImageRef} (reason: ${reason}).

Template used to render the body of a rollback notification (both success and failure are produced by the same template)

Allowed values:JS string template with `name`, `scope`, `status`, `reason`, `oldImageRef`, `newImageRef`, `archiveName`, `error_step`, `error_message`, `services` and `container`
WUD_TRIGGER_{trigger_type}_{trigger_name}_ROLLBACKTITLE
Optionalstringdefault: Rollback of ${name}

Template used to render the title of a rollback notification

Allowed values:JS string template with `name`, `scope`, `status`, `reason`, `oldImageRef`, `newImageRef`, `archiveName`, `error_step`, `error_message`, `services` and `container`
WUD_TRIGGER_{trigger_type}_{trigger_name}_SIMPLEBODY
Optionalstringdefault: Container ${container.name} running with ${container.updateKind.kind} ${container.updateKind.localValue} can be updated to ${container.updateKind.kind} ${container.updateKind.remoteValue}${container.result && container.result.link ? "\\n" + container.result.link : ""}

Template used to render the notification body in simple mode

Allowed values:JS string template with `container` object
WUD_TRIGGER_{trigger_type}_{trigger_name}_SIMPLETITLE
Optionalstringdefault: New ${container.updateKind.kind} found for container ${container.name}

Template used to render the notification title in simple mode

Allowed values:JS string template with `container` object
WUD_TRIGGER_{trigger_type}_{trigger_name}_SUCCESSBODY
Optionalstringdefault: Container ${container.name} has been successfully updated.

Template used to render the notification body when an update is successful

Allowed values:JS string template with `container` object
WUD_TRIGGER_{trigger_type}_{trigger_name}_SUCCESSTITLE
Optionalstringdefault: Update SUCCESS for ${container.name}

Template used to render the notification title when an update is successful

Allowed values:JS string template with `container` object
WUD_TRIGGER_{trigger_type}_{trigger_name}_THRESHOLD
Optionalenumdefault: all

Minimum semver version bump required to fire the trigger

Allowed values:`all`, `major`, `major-only`, `minor`, `minor-only`, `patch`

Threshold Values​

  • all: Executes the trigger for all update types (including digests).
  • major: Executes the trigger for major, minor, or patch semver updates.
  • major-only: Executes the trigger only for major semver updates.
  • minor: Executes the trigger for minor or patch semver updates.
  • minor-only: Executes the trigger only for minor semver updates.
  • patch: Executes the trigger only for patch semver updates.

📝 Template Placeholders & Variables​

Trigger titles and bodies (SIMPLETITLE, SIMPLEBODY, BATCHTITLE, BATCHBODY, SUCCESSTITLE, SUCCESSBODY, FAILURETITLE, FAILUREBODY, ROLLBACKTITLE, ROLLBACKBODY) are evaluated as JavaScript template literals against the container update data.

Simple Mode Variables​

In simple mode (MODE=simple), all container properties are accessible via the container object:

PropertyDescriptionExample
container.nameMonitored container namenginx
container.watcherWatcher or host name that discovered the containerlocal, host1, prod
container.idUnique container ID9d5fa8b3c10a
container.updateKind.kindUpdate category (tag or digest)tag
container.updateKind.localValueCurrent local tag or short digest1.25.0
container.updateKind.remoteValueTarget remote tag or short digest1.26.0
container.updateKind.semverDiffSemver difference levelmajor, minor, patch
container.isOfficialBoolean indicating if the image is an official Docker Hub image (true or false)true
container.documentationUrlDocumentation URL (from label or Docker Hub official default)https://hub.docker.com/_/postgres
container.changelogUrlChangelog or release notes URL (from label)https://github.com/postgres/postgres/releases
container.upstreamUrlUpstream source code repository URL (from label)https://github.com/postgres/postgres
container.linkPreserved link fallback (pointing to documentationUrl or upstreamUrl)https://...
container.result.linkChangelog or registry link (if available)https://...
Multi-Host Notifications

When monitoring multiple Docker daemons or remote hosts using distinct watchers (e.g. WUD_WATCHER_HOST1_..., WUD_WATCHER_HOST2_...), include $${container.watcher} in your SIMPLEBODY or SIMPLETITLE to identify which host discovered the update.

Batch Mode Variables​

In batch mode (MODE=batch), multiple container updates are grouped into a single notification:

PropertyDescriptionExample
containersArray of updated container objects[ { name: 'web', ... }, ... ]
containers.lengthTotal number of containers with available updates3
countShorthand alias for containers.length3
hostnameHost name from WUD_LOG_HOSTNAME or system hostnameserver1
watcherCommon watcher name across containers (or first watcher)local, host1

🎯 Container Trigger Filtering & Precedence​

You can control which triggers execute for a given container by attaching labels (or annotations/metadata) directly to your workload.

Precedence Order​

When evaluating whether a trigger applies to a container, WUD checks rules in the following 3-level order:

LevelRuleExample LabelEffect
1. Specific Trigger (Highest)wud.trigger.<type>.<name>.enabledwud.trigger.docker.autoupdate.enabled=trueExplicitly enables or disables this specific trigger instance, ignoring all lower-level settings.
2. Trigger Typewud.trigger.<type>.enabledwud.trigger.docker.enabled=falseEnables or disables all triggers of that type (e.g. all docker updaters or all telegram notifications).
3. Global Filters & Defaultswud.trigger.include / wud.trigger.exclude / INCLUDEBYDEFAULTwud.trigger.include=docker.autoupdateEvaluates legacy include/exclude lists. If no labels apply, falls back to the trigger's INCLUDEBYDEFAULT configuration.
Supported Prefixes

Labels can be formatted using wud.trigger.<...> (Docker / Docker Compose), getwud.app/trigger.<...> (Kubernetes, Swarm, Nomad), or trigger.<...>.

Concrete Use Case: Targeted Auto-Update Opt-In​

A common workflow is to keep auto-updates disabled globally, while selectively enabling auto-updates for specific containers:

  1. Configure your auto-update trigger with INCLUDEBYDEFAULT=false:

    # Update trigger is registered, but does NOT run on containers by default
    WUD_TRIGGER_DOCKER_AUTOUPDATE_AUTO=true
    WUD_TRIGGER_DOCKER_AUTOUPDATE_INCLUDEBYDEFAULT=false

    # Notification triggers remain enabled by default
    WUD_TRIGGER_TELEGRAM_NOTIFY_AUTO=true
    WUD_TRIGGER_TELEGRAM_NOTIFY_INCLUDEBYDEFAULT=true
  2. Opt-in specific containers using the granular label:

    services:
    web:
    image: nginx:latest
    labels:
    # Only this container is auto-updated; telegram notifications still fire for all containers
    - "wud.trigger.docker.autoupdate.enabled=true"

    database:
    image: postgres:16
    # No label: will receive telegram notification, but will NOT be auto-updated
Granular Labels vs wud.trigger.include

The legacy wud.trigger.include label acts as an exclusive allowlist: setting wud.trigger.include=docker.autoupdate would disable all other triggers (including Telegram notifications) for that container. Granular labels (wud.trigger.<type>.<name>.enabled=true|false) allow targeted opt-in or opt-out without interfering with other triggers.


🚀 Examples​

Customizing Notification Content​

services:
whatsupdocker:
image: getwud/wud
environment:
- WUD_TRIGGER_SMTP_GMAIL_SIMPLETITLE=Container $${container.name} can be updated
- WUD_TRIGGER_SMTP_GMAIL_SIMPLEBODY=Container $${container.name} on host $${container.watcher} can be updated from $${container.updateKind.localValue} to $${container.updateKind.remoteValue}