How Shoutrrr Works (The 60-Second Version)

Shoutrrr turns a service's credentials into a URL. The scheme identifies the service, the userinfo carries the token, and query parameters carry the extras (channel, sender, recipient). Watchtower reads WATCHTOWER_NOTIFICATION_URL at startup and hands every notification to Shoutrrr. Same variable, any service:

environment:
  WATCHTOWER_NOTIFICATION_URL: "discord://TOKEN@CHANNEL_ID"

A few rules that apply to every channel below:

  • Quote the URL. URLs contain @, :, ? and & — always wrap the value in double quotes in YAML, or compose will misparse it.
  • URL-encode special characters in passwords and tokens (@ → %40, / → %2F, : in passwords → %3A, spaces → %20).
  • You can set multiple channels by separating URLs with a space — e.g. Discord and email in one variable (see the multiple channels section).
  • All examples below use the maintained nickfedor/watchtower image (migration guide if you're still on containrrr).
  • Every channel section ends with a test step using --run-once: it forces an immediate scan and notification so you confirm delivery in seconds instead of waiting for the next scheduled poll.

Discord

The most popular choice for homelabs — updates land in your Discord server seconds after they happen.

Exact URL format:

WATCHTOWER_NOTIFICATION_URL="discord://TOKEN@CHANNEL_ID"

Where to get the token: In Discord, open your server → channel settings (gear icon) → Integrations → Webhooks → New Webhook. Copy the webhook URL — it looks like https://discord.com/api/webhooks/123456789/abcdef.... The first number is the CHANNEL_ID, the string after it is the TOKEN. Paste them into the format above.

Compose snippet:

services:
  watchtower:
    image: nickfedor/watchtower:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_SCHEDULE=0 0 4 * * *
      - WATCHTOWER_NOTIFICATION_URL=discord://123456789/abcdefYOURTOKEN
    restart: unless-stopped

Test it: Run a one-shot check — it will scan containers and send a summary notification to Discord:

docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_NOTIFICATION_URL="discord://123456789/abcdefYOURTOKEN" \
  nickfedor/watchtower --run-once

Check your Discord channel for the report. No message? Jump to the troubleshooting section.

Telegram

Great for phone alerts — a bot message hits your phone the moment an update completes.

Exact URL format:

WATCHTOWER_NOTIFICATION_URL="telegram://TOKEN@telegram?channels=CHANNEL"

Where to get the token: Message @BotFather in Telegram → /newbot → follow the prompts → copy the bot token it gives you (format: 123456:ABC-DEF...). Then message your new bot once (send it any text) so it can find your chat. For the channel: use your numeric chat ID (message @userinfobot to get it), or a channel username like @myupdates — add the bot as an admin of that channel first.

Compose snippet:

services:
  watchtower:
    image: nickfedor/watchtower:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_SCHEDULE=0 0 4 * * *
      - WATCHTOWER_NOTIFICATION_URL=telegram://123456:ABCDEF@telegram?channels=987654321
    restart: unless-stopped

Test it:

docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_NOTIFICATION_URL="telegram://123456:ABCDEF@telegram?channels=987654321" \
  nickfedor/watchtower --run-once

The bot token contains a colon — Shoutrrr expects it, so don't URL-encode that one. But if your token has other odd characters, encode them.

Slack

Best for teams — updates post to a Slack channel where everyone can see what changed and when.

Exact URL format:

WATCHTOWER_NOTIFICATION_URL="slack://xoxb-TOKEN@CHANNEL"

Where to get the token: Go to api.slack.com/apps → Create New App → From scratch → name it (e.g. "Watchtower") and pick your workspace. Under OAuth & Permissions, add the chat:write scope, then Install to Workspace. Copy the Bot User OAuth Token (starts with xoxb-). The CHANNEL is the channel ID (e.g. C012AB3CD — right-click a channel in Slack → View channel details → the ID is at the bottom) or the channel name. Invite the bot to the channel with /invite @Watchtower.

Compose snippet:

services:
  watchtower:
    image: nickfedor/watchtower:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_SCHEDULE=0 0 4 * * *
      - WATCHTOWER_NOTIFICATION_URL=slack://xoxb-abc123def456@C012AB3CD
    restart: unless-stopped

Test it:

docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_NOTIFICATION_URL="slack://xoxb-abc123def456@C012AB3CD" \
  nickfedor/watchtower --run-once
ℹ️
Slack's legacy incoming-webhook tokens (xoxp- style or hooks.slack.com URLs) are deprecated. Shoutrrr's slack:// scheme uses a bot token (xoxb-) with the app flow described above.

Email (SMTP)

The universal fallback — works with Gmail, Outlook, your own mail server, or any SMTP relay. Best when you want a permanent, searchable record of updates.

Exact URL format:

WATCHTOWER_NOTIFICATION_URL="smtp://USER:PASS@smtp.host:587/?fromaddr=SENDER&toaddr=RECIPIENT"

Where to get the credentials: Use your mail provider's SMTP details. For Gmail: smtp.gmail.com:587 with your full Gmail address as USER and an app password (Google Account → Security → 2-Step Verification → App passwords) as PASS — your regular password will not work. For Outlook: smtp.office365.com:587. For a self-hosted relay, use your server's hostname and credentials. fromaddr is the sender shown in the email; toaddr is where alerts go (add multiple recipients separated by commas).

Compose snippet:

services:
  watchtower:
    image: nickfedor/watchtower:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_SCHEDULE=0 0 4 * * *
      - WATCHTOWER_NOTIFICATION_URL=smtp://alerts%40example.com:APP%20PASS@smtp.gmail.com:587/?fromaddr=alerts@example.com&toaddr=me@example.com
    restart: unless-stopped

Test it:

docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_NOTIFICATION_URL="smtp://alerts%40example.com:APP%20PASS@smtp.gmail.com:587/?fromaddr=alerts@example.com&toaddr=me@example.com" \
  nickfedor/watchtower --run-once
⚠️
Email credentials are the #1 source of notification failures. URL-encode the @ in your username (%40) and any spaces or special characters in an app password. An unencoded @ in the userinfo section silently breaks the URL parse.

Gotify

The self-hosted favorite — push notifications to your own server, no third party involved. Ideal if you already run Gotify for other homelab alerts.

Exact URL format:

WATCHTOWER_NOTIFICATION_URL="gotify://HOST/TOKEN"

Where to get the token: Open your Gotify web UI → Apps → Create application → name it "Watchtower" → copy the generated token. HOST is your Gotify server's hostname or IP as reachable from inside the Watchtower container — if Gotify runs on the same Docker host, use the host's LAN IP or a Docker-network hostname, not localhost. Append the port if non-standard: gotify://192.168.1.10:8080/TOKEN. For HTTPS, prefix the scheme: gotifys://.

Compose snippet:

services:
  watchtower:
    image: nickfedor/watchtower:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_SCHEDULE=0 0 4 * * *
      - WATCHTOWER_NOTIFICATION_URL=gotify://192.168.1.10:8080/AbCdEfGhIjKlMnOp
    restart: unless-stopped

Test it:

docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_NOTIFICATION_URL="gotify://192.168.1.10:8080/AbCdEfGhIjKlMnOp" \
  nickfedor/watchtower --run-once

Using Multiple Channels at Once

You don't have to pick one channel. WATCHTOWER_NOTIFICATION_URL accepts multiple space-separated URLs, and every notification is delivered to all of them. A common homelab pattern: instant phone buzz via Telegram plus a permanent searchable record via email:

environment:
  - WATCHTOWER_NOTIFICATION_URL=telegram://123456:ABCDEF@telegram?channels=987654321 smtp://alerts%40example.com:APP%20PASS@smtp.gmail.com:587/?fromaddr=alerts@example.com&toaddr=me@example.com

When combining URLs, quoting matters even more: the value contains spaces between URLs and & inside the SMTP URL, so always wrap the entire value in double quotes. In docker run -e form, quote the whole argument: -e "WATCHTOWER_NOTIFICATION_URL=url1 url2". If one channel is misconfigured, Shoutrrr logs an error for that URL at startup but still delivers to the others — which is why running with WATCHTOWER_DEBUG=true during setup is worth it.

Troubleshooting: No Notifications?

Work through this list top to bottom — it covers essentially every notification failure we've seen:

  1. Check URL quoting. The URL must be quoted in compose. Unquoted & in SMTP URLs gets interpreted by the shell/YAML as a background operator or anchor. If you set the variable with docker run -e, quote the whole -e argument too.
  2. Check URL encoding. Passwords with @, /, : or spaces break the parse. Encode them: @→%40, /→%2F, space→%20. This fixes most SMTP failures outright.
  3. Run with --debug. Add WATCHTOWER_DEBUG=true (or --debug on the test command) and read the startup logs. Shoutrrr errors — bad token, unreachable host, auth rejected — are printed at startup, not hidden.
  4. Test with --run-once. Every channel section above includes a test command. It forces a scan and a notification immediately instead of making you wait for the next scheduled poll.
  5. Check the firewall / network path. SMTP on port 587, Gotify on your LAN, Telegram/Discord/Slack over HTTPS — the Watchtower container needs outbound access. If you run a restrictive firewall or the container is on an isolated network, notifications fail silently at the TCP level. For Gotify on the same host, remember: localhost inside the container is the container itself — use the host's LAN IP.
  6. Verify the token still works. Regenerated Discord webhooks, revoked Telegram bots, rotated Slack app tokens, and expired Gmail app passwords all fail the same way: everything looks configured, nothing arrives. Re-create the credential and update the URL.
  7. Confirm notifications aren't filtered. Watchtower only notifies about containers it actually processes. If WATCHTOWER_LABEL_ENABLE=true is set and nothing is labeled, there's nothing to report. Also check why containers aren't updating — a silent scan means silent notifications.

Still stuck after all seven? Our general troubleshooting guide covers the wider set of Watchtower failure modes, and the environment variable reference documents every notification-related option including report templates.

Frequently Asked Questions

Can Watchtower send to multiple notification channels at once?

Yes. Separate multiple Shoutrrr URLs with a space inside WATCHTOWER_NOTIFICATION_URL — for example Discord and email together: "discord://TOKEN@CHANNEL_ID smtp://USER:PASS@smtp.host:587/?fromaddr=A&toaddr=B". Every notification goes to every configured channel.

Do notification settings change when migrating from containrrr to nickfedor?

No. Shoutrrr URLs are identical in the fork — the migration is a one-line image swap with zero config changes. See our migration guide for the full checklist.

Why do I get update notifications but no "all clear" messages?

By design, Watchtower notifies about events — updates applied, updates skipped, failures. A poll where nothing changed produces nothing to report. If you want a heartbeat, run the --run-once test command on a schedule, or check the container logs for the scan summary.

My Gmail SMTP fails with an authentication error. What now?

Gmail blocks regular passwords for SMTP — you must use an app password (Google Account → Security → 2-Step Verification → App passwords). Also URL-encode the @ in your username as %40, and make sure port 587 with STARTTLS is reachable from the container.

Can I customize what the notification message says?

Yes. Watchtower supports report templates via notification-related environment variables — see the environment variable reference. The default template already includes which containers were updated, skipped, or failed.

Does Telegram need the bot to be an admin?

Only for channels: add the bot as an admin of the channel you're posting to. For a direct message to yourself, you just need to have messaged the bot once first so it can resolve your chat ID.

Pair notifications with a sane polling schedule so you are alerted at sensible times, and see how Diun handles notifications if you prefer a notify-only workflow.

WD
WatchtowerDocker Editorial Team
This guide is maintained by the WatchtowerDocker editorial team, an independent resource not affiliated with containrrr or Nicholas Fedor.