How to Install ntfy on Your Synology NAS

How to Install ntfy on Your Synology NAS

Ntfy is a simple HTTP-based pub-sub notification service like Gotify. With ntfy, you can send notifications to your phone or desktop via scripts from any computer, without having to sign up or pay any fees. If you’d like to run your own instance of the service, you can easily do so since ntfy is open source. There is also an open source Android app available on Google Play or F-Droid, as well as an open source iOS app available on the App Store. In this step by step guide I will show you how to install ntfy on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest ntfy v2.11.0 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

  • STEP 4

Install Text Editor via Synology “Package Center”. (Mandatory STEP.) If you already have Text Editor installed on your Synology NAS, skip this STEP.

Synology Install Text Editor 2023

  • STEP 5

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

ntfy Synology NAS Set up 1

  • STEP 6

Now click the “Create” button. Follow the instructions in the image below.

ntfy Synology NAS Set up 2

  • STEP 7

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in ntfy. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: ntfy.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 6741

ntfy Synology NAS Set up 3

  • STEP 8

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

 

  • STEP 9

Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

ntfy Synology NAS Set up 4

  • STEP 10

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.

ntfy Synology NAS Set up 5

  • STEP 11

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it ntfy. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

ntfy Synology NAS Set up 6

  • STEP 12

Now create one new folder inside the ntfy folder that you created at STEP 11 and name it cache. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

ntfy Synology NAS Set up 7

  • STEP 13

Download (click on the blue link below) then upload the server.yml file below in the ntfy folder that you have previously created at STEP 11. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

👉🏻server.yml

ntfy Synology NAS Set up 8

  • STEP 14

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 15

In the Name field type in ntfy. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.9"
services:
  ntfy:
    image: binwiederhier/ntfy
    container_name: NTFY
    command:
      - serve
    environment:
      - TZ=Europe/Bucharest
    volumes:
      - /volume1/docker/ntfy/cache:/var/cache/ntfy:rw
      - /volume1/docker/ntfy:/etc/ntfy:rw
    healthcheck:
        test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
        interval: 60s
        timeout: 10s
        retries: 3
        start_period: 40s
    ports:
      - 6741:80
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value for TZ. (Select your current Time Zone from this list.)

ntfy Synology NAS Set up 9

  • STEP 16

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

ntfy Synology NAS Set up 10

  • STEP 17

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

ntfy Synology NAS Set up 11

  • STEP 18

Go back to STEP 1 or you will deal with karma 🙂.

  • STEP 19

Now open your browser and type in your HTTPS/SSL certificate like this https://ntfy.yourname.synology.me In my case it’s https://ntfy.mariushosting.synology.me If everything goes right, you will see the the ntfy page. At the top left of the page, click GRANT NOW. Follow the instructions in the image below.

ntfy Synology NAS Set up 12

  • STEP 20

A new pop up window will open. Click Allow. Follow the instructions in the image below.

ntfy Synology NAS Set up 13

  • STEP 21

On the left sidebar click Settings, then select the Dark Mode theme and your favorite Notification sound. Follow the instructions in the image below.

ntfy Synology NAS Set up 14

  • STEP 22

On the left sidebar click + Subscribe to topic. Add a new topic, for example, UptimeKuma, or a more complicated name, then click SUBSCRIBE. Follow the instructions in the image below.

ntfy Synology NAS Set up 15

  • STEP 23

Copy your generated Link. You will need it later at STEP 25.

ntfy Synology NAS Set up 16

  • STEP 24

If you have Uptime Kuma installed on your Synology NAS using my easy guide, you can set up Notifications via ntfy. Open Uptime Kuma, then click Settings. Click Notifications, then Setup Notification. Follow the instructions in the image below.

ntfy Synology NAS Set up 17

  • STEP 25

Select Ntfy from the Notification list. Choose a friendly name and an ntfy topic. Type in your ntfy link that you have previously generated at STEP 23. Click Test then Save. Follow the instructions in the image below.

ntfy Synology NAS Set up 18

  • STEP 26

Open ntfy. The Uptime Kuma notifications are now inside your generated topic/link.

ntfy Synology NAS Set up 19

  • STEP 27

You can also receive notifications from your Synology DSM to your ntfy page. Create a new Topic in the ntfy app and name it Synology (like you did before with UptimeKuma at STEP 22).

  • STEP 28

Go to Control Panel / Notifications / Webhooks tab / Click Add. Follow the instructions in the image below.

ntfy DSM Synology NAS Set up 1

  • STEP 29

On the Provider area select Custom. On the Rule area select All. Click Next. Follow the instructions in the image below.

ntfy DSM Synology NAS Set up 2

  • STEP 30

In the Provider name area, type in Ntfy. In the Webhook URL area, type in your own ntfy link that you have previously generated at STEP 27, then click Next. Follow the instructions in the image below.

ntfy DSM Synology NAS Set up 3

  • STEP 31

HTTP Method: select POST. Content-Type select application/json. Click +Add header and type in All. Click Save. Follow the instructions in the image below.

ntfy DSM Synology NAS Set up 4

  • STEP 32

Select your Ntfy Provider, then click the Send Test Message tab. Follow the instructions in the image below.

ntfy DSM Synology NAS Set up 5

  • STEP 33

Open ntfy. The Synology DSM notifications are now inside your generated topic/link.

ntfy DSM Synology NAS Set up 6

  • STEP 34

If you want to modify your ntfy server settings, open the server.yml file that you have previously downloaded and uploaded at STEP 13 in the ntfy folder, then modify it according to your preferences using the Synology Text Editor package that you have previously installed at STEP 4.

Enjoy ntfy!

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: Ntfy Full Documentation.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the ntfy container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Sunday / May 19th, 2024 at 10:43 PM