Configuring Synology DSM to send push notifications to Discord

Enable SSH on Synology DSM Link to heading

  1. Login to your Synology DSM web interface
  2. Open Control Panel
  3. Go down to “Terminal & SNMP”
  4. Select “Enable SSH Service” and click apply then click OK.

Edit the file that controls webhook based notifications Link to heading

  1. SSH into your Synology.

  2. Run the following command:

    sudo vim /usr/syno/etc/synowebhook.conf
    
  3. Assuming you have no webhooks currently configured add the following to the file:

    {
        "Discord": {
            "needssl": false,
            "port": 8090,
            "prefix": "A new system event occurred on your %HOSTNAME%",
            "req_header": "",
            "req_method": "post",
            "req_param": "{\"username\":\"Synology\", \"avatar_url\": \"https://play-lh.googleusercontent.com/HjbYWbXJ-6e6Cia-mBbHDSdontW1yE6MHMaXqlHW80CQegDOEPQ1HGACxvEpnqCUHgo\", \"embeds\": [{\"description\": \"@@TEXT@@\", \"title\": \"@@PREFIX@@\"}]}",
            "sepchar": " ",
            "template": "$webhook_url",
            "type": "custom",
            "url": "$webhook_url"
        }
    }    
    
  4. Replace $webhoook_url with your webhook from discord.

Test the notifiication works Link to heading

  1. Login to your Synology DSM web interface.
  2. Open Control Panel.
  3. Go to “Notification” then the “Push Service” tab then click “Manage Webhooks” at the bottom.
  4. Click on the “Discord” webhook and click “Send Test Message”

If everything is configured it will send a discord message to your channel that looks like the following: Test Message