Skip to content

Notifications

The server can send the ticket out when it’s ready:

Terminal window
deaddrop serve x.torrent --notify discord=https://discord.com/api/webhooks/<id>/<token>
deaddrop serve x.torrent --notify webhook=https://example.com/hooks/deaddrop

Webhook URLs usually contain a secret. To keep them out of shell history and ps, use the config file or an environment variable:

[[serve.notify]]
type = "discord"
url = "https://discord.com/api/webhooks/<id>/<token>"
[[serve.notify]]
type = "webhook"
url = "https://example.com/hooks/deaddrop"
include_key = true

Sources aren’t merged: --notify flags replace DEADDROP_NOTIFY, which replaces the config file’s list.

By default a notifier gets the ticket but not the decryption key. Choose per notifier which ones get the key:

  • On the command line or in DEADDROP_NOTIFY, add +key to the type: webhook+key=https://...
  • In the config file, set include_key = true in its [[serve.notify]] table.
Type What it sends
discord A channel message with the torrent name, size, mode and a copyable deaddrop fetch … command. Mentions are turned off and markdown in the name is escaped. With the key, it is shown as a spoiler, to be set as DEADDROP_KEY.
webhook POST with a JSON body. See the webhook payload reference.
  • Bad notifier settings are rejected at startup, before the torrent download begins.
  • If a notification fails (an error status, an unreachable host, or the 15 s timeout), the server logs a warning and keeps serving, since the ticket is still printed locally.
  • Logs never include webhook URLs.

Want Slack, Matrix or something else? See Adding a notifier.