Skip to content
ConfigurationActions & NotificationsNtfy

Ntfy

The ntfy trigger lets you send container update notifications via Ntfy.

logo

The ntfy trigger lets you send container update notifications via Ntfy.

Variables

Env varRequiredDescriptionSupported valuesDefault value when missing
DD_NOTIFICATION_NTFY_{trigger_name}_AUTH_PASSWORD⚪Password (if basic auth is enabled)
DD_NOTIFICATION_NTFY_{trigger_name}_AUTH_TOKEN⚪Bearer token (if bearer auth is enabled)
DD_NOTIFICATION_NTFY_{trigger_name}_AUTH_USER⚪User (if basic auth is enabled)
DD_NOTIFICATION_NTFY_{trigger_name}_PRIORITY⚪The Ntfy message priorityInteger between 0 and 5 see here
DD_NOTIFICATION_NTFY_{trigger_name}_PRIORITIES_{event}⚪Per-event priority override. Falls back to PRIORITY when unset for that eventevent is one of UPDATEAVAILABLE, UPDATEAPPLIED, UPDATEFAILED, SECURITYALERT, CONTAINERUNHEALTHY, MATURITYCLEARED, AGENTDISCONNECT, AGENTRECONNECT; value is an integer between 0 and 5
DD_NOTIFICATION_NTFY_{trigger_name}_TOPIC⚪The Ntfy topic name
DD_NOTIFICATION_NTFY_{trigger_name}_TOPICS_{event}⚪Per-event topic override. Falls back to TOPIC when unset for that eventevent is one of UPDATEAVAILABLE, UPDATEAPPLIED, UPDATEFAILED, SECURITYALERT, CONTAINERUNHEALTHY, MATURITYCLEARED, AGENTDISCONNECT, AGENTRECONNECT
DD_NOTIFICATION_NTFY_{trigger_name}_ACTIONS_{n}_ACTION⚪Action button type for slot n (0-2, up to 3 actions)view, http
DD_NOTIFICATION_NTFY_{trigger_name}_ACTIONS_{n}_LABEL⚪Action button label for slot n. Supports the same ${...} template variables as SIMPLETITLE/SIMPLEBODY
DD_NOTIFICATION_NTFY_{trigger_name}_ACTIONS_{n}_URL⚪Action button URL for slot n. Supports the same ${...} template variables as SIMPLETITLE/SIMPLEBODY
DD_NOTIFICATION_NTFY_{trigger_name}_ACTIONS_{n}_METHOD⚪HTTP method for an http action in slot n
DD_NOTIFICATION_NTFY_{trigger_name}_ACTIONS_{n}_BODY⚪Request body for an http action in slot n. Supports the same ${...} template variables as SIMPLETITLE/SIMPLEBODY
DD_NOTIFICATION_NTFY_{trigger_name}_ACTIONS_{n}_CLEAR⚪Whether the notification is cleared from the phone after the http action runstrue, false
DD_NOTIFICATION_NTFY_{trigger_name}_URL⚪The Ntfy server urlThe http or https ntfy server addresshttps://ntfy.sh
This trigger also supports the common configuration variables.

Examples

Configure the trigger to publish to the official public ntfy service

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_NOTIFICATION_NTFY_THRESHOLD=minor
      - DD_NOTIFICATION_NTFY_SH_TOPIC=xxxxyyyyzzzz

Configure the trigger to publish to a private ntfy service with basic auth enabled

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_NOTIFICATION_NTFY_PRIVATE_URL=http://ntfy.local
      - DD_NOTIFICATION_NTFY_PRIVATE_TOPIC=xxxxyyyyzzzz
      - DD_NOTIFICATION_NTFY_PRIVATE_AUTH_USER=john
      - DD_NOTIFICATION_NTFY_PRIVATE_AUTH_PASSWORD=doe

Route a failed update to a separate topic

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_NOTIFICATION_NTFY_SH_TOPIC=xxxxyyyyzzzz
      - DD_NOTIFICATION_NTFY_SH_TOPICS_UPDATEFAILED=xxxxyyyyzzzz-alerts

An update that succeeds still publishes to xxxxyyyyzzzz; only update-failed events publish to xxxxyyyyzzzz-alerts. Every other event kind (update-available, security-alert, container-unhealthy, maturity-cleared, agent-disconnect, agent-reconnect) falls back to TOPIC the same way.

Raise the priority of a security alert

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_NOTIFICATION_NTFY_SH_TOPIC=xxxxyyyyzzzz
      - DD_NOTIFICATION_NTFY_SH_PRIORITY=2
      - DD_NOTIFICATION_NTFY_SH_PRIORITIES_SECURITYALERT=5

Add an action button linking back to the container

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_NOTIFICATION_NTFY_SH_TOPIC=xxxxyyyyzzzz
      - DD_NOTIFICATION_NTFY_SH_ACTIONS_0_ACTION=view
      - DD_NOTIFICATION_NTFY_SH_ACTIONS_0_LABEL=Open $${container.name}
      - DD_NOTIFICATION_NTFY_SH_ACTIONS_0_URL=https://drydock.example.com/containers/$${container.name}

label and url (and body for an http action) render through the same template variables as SIMPLETITLE/SIMPLEBODY. Up to 3 actions can be configured, in slots 0-2.