Skip to content

Discord

The Discord notifier posts color-coded embeds to a channel through a Discord channel webhook. No bot to host: the webhook URL is all it needs.

[notifiers.discord-ops]
type = "discord"
webhook_url = "${DISCORD_OPS_URL}"
Key Required What it does
webhook_url yes The webhook URL. Keep it out of the file; see Storing the secret.
template_path no A Go template file that replaces the built-in message.
  1. In your server, open Server Settings → Integrations → Webhooks and click New Webhook.
  2. Pick the channel (for example #ops-alerts).
  3. Set the name and avatar. Messages are posted under them.
  4. Click Copy Webhook URL. It looks like https://discord.com/api/webhooks/1234567890/XXXXXXXXXXXXXXXXXXXX.

Anyone with the URL can post to your channel, so treat it as a secret. A webhook belongs to one channel; for a second channel, create a second webhook and a second [notifiers.*] block. Discord notifiers don’t accept a discord-ops:<target> override.

Each event is one embed. The color strip shows the outcome:

Color When
Red failures, timeouts, crashes
Green successes
Yellow warnings, like low disk space
Blurple everything else, like a run starting
❌ backup-postgres failed
Exited with code 1 after 0.3s.
Triggered via the REST API · 14 May, 17:11.
Error: connection refused
dial tcp 127.0.0.1:5432: connect:
connection refused
from runwisp · bright-falcon
  • The title links to the run when external_url is set.
  • The last lines of output appear for failures and timeouts, when there is a log.
  • Mentions are turned off, so a task that prints @everyone can’t ping your whole server.

Point template_path at your own Go template. Start from the built-in discord.tmpl.json, which has the embed layout and the color table. It gets the whole event and the same helpers as the Slack template.

  • A missing or empty webhook_url, or one that isn’t http:// or https://.