Slack Notifications¶
Deprecated Slack Notification Options
The following legacy Slack notification options are deprecated and subject to removal with the release of Watchtower v2:
Use the notification-url configuration option with a slack:// Shoutrrr URL instead.
Overview¶
Watchtower can use Shoutrrr's Slack service to send Slack notifications.
Examples¶
Replace the following with the parts of your Slack webhook URL, https://hooks.slack.com/services/WORKSPACE_ID/WEBHOOK_ID/WEBHOOK_TOKEN:
WORKSPACE_ID: the workspace ID, which starts withTWEBHOOK_ID: the webhook ID, which starts withBWEBHOOK_TOKEN: the webhook token
The following legacy Slack configuration options and examples are deprecated and will be removed with the release of Watchtower v2.
docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
-e WATCHTOWER_NOTIFICATIONS=slack \
-e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL="https://hooks.slack.com/services/WORKSPACE_ID/WEBHOOK_ID/WEBHOOK_TOKEN" \
-e WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=watchtower-server-1 \
-e WATCHTOWER_NOTIFICATION_SLACK_CHANNEL=CHANNEL_ID \
nickfedor/watchtower
docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
nickfedor/watchtower \
--notifications slack \
--notification-slack-hook-url "https://hooks.slack.com/services/WORKSPACE_ID/WEBHOOK_ID/WEBHOOK_TOKEN" \
--notification-slack-identifier watchtower-server-1 \
--notification-slack-channel "CHANNEL_ID"
services:
watchtower:
image: nickfedor/watchtower:latest
environment:
WATCHTOWER_NOTIFICATIONS: slack
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL: "https://hooks.slack.com/services/WORKSPACE_ID/WEBHOOK_ID/WEBHOOK_TOKEN"
WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER: watchtower-server-1
WATCHTOWER_NOTIFICATION_SLACK_CHANNEL: "CHANNEL_ID"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Replace the following:
WORKSPACE_ID: the workspace ID, which starts withTWEBHOOK_ID: the webhook ID, which starts withBWEBHOOK_TOKEN: the webhook tokenCHANNEL_ID: the ID of the channel to post to, such asC0123456789