Skip to content

How to Send Notifications From Duplicati to Discord


Created: – Last Updated:

In most cases a Duplicati (opens in a new tab) backup runs in the background without any interaction needed. However, if a backup fails, it’s crucial to receive a notification. Duplicati has a couple of built-in features (opens in a new tab) to send reports but no native integration for Discord.

If you, like me, consolidate notifications for self-hosted services in a Discord server, this guide will show you how to integrate Duplicati’s HTTP notifications with Discord’s webhooks.

Set up a Cloudflare worker

I have created duplicati-discord-cloudflare-worker (opens in a new tab) which is a Cloudflare worker to proxy Duplicati’s HTTP notifications to a Discord webhook URL. It “translates” the outgoing HTTP notifications into a format that Discord understands.

Since I don’t want to host this proxy for you, you’ll need to create your own worker. Cloudflare has a generous free tier so under normal circumstances this proxy worker will always be free.

Here’s how you can set up your own worker:

  1. Create a Cloudflare (opens in a new tab) account
  2. Deploy to Cloudflare (opens in a new tab)

If everything goes smoothly you should end up with a deployed Cloudflare worker that has a URL similar to this one:

Terminal window
https://duplicati-discord-cloudflare-worker.your-name.workers.dev

Create a Discord webhook URL

Inside your Discord server, select “Edit Channel” for the channel that should receive the notifications. Navigate to “Integrations”, select “Webhooks”, and open “New Webhook”.

Give the newly created webhook a name and select “Copy Webhook URL” to copy the webhook URL to your clipboard.

The URL will be in this format:

https://discord.com/api/webhooks/12345/foobar123

You’ll need the 12345/foobar123 portion of the URL for the next step.

Duplicati integration

Now it’s time to tie everything together inside Duplicati.

  1. Open your Duplicati web UI and select the “Home” tab

  2. Inside “Configuration” select the “Edit…” button

  3. Navigate to the “Options” tab

  4. Inside “Advanced options”, select send-http-json-urls from the Add advanced option select dropdown

  5. Add your Cloudflare worker URL together with the portion you copied from the Discord webhook URL to the send-http-json-urls text field:

    Terminal window
    https://duplicati-discord-cloudflare-worker.your-name.workers.dev/12345/foobar123
  6. Save your edit to the backup

You can repeat these steps for every Duplicati backup that you’d like to receive notifications for.

Discord thread / forum channel support

If you want to send notifications to a Discord thread (opens in a new tab) or to a post inside a forum channel (opens in a new tab), you need to pass a thread_id to the Cloudflare worker. Here’s how you can do that:

  1. Navigate to the thread / forum post, right-click it, and choose “Copy Link”.

    It will be in the following format:

    Terminal window
    https://discord.com/channels/123/456

    The 456 is your thread_id.

  2. Adjust the URL you’re passing to the send-http-json-urls flag by adding ?thread_id=<your-thread-id> to the end of it:

    https://duplicati-discord-cloudflare-worker.your-name.workers.dev/12345/foobar123?thread_id=456