Skip to content

Create a self-hosted instance of NTFY

Moved Guides
63 4 34.8k 1
  • wrote on last edited by
    #4

    @phenomlab Any idea why I get this message in any browser trying to access ntfy.mynodebb.com?:

    ntfy.mynodebb.com uses a security technology called “HTTP Strict Transport Security (HSTS)”, by which Firefox is allowed to connect to the website only through secured connections. Therefore, no exception can be added for the website.

    That’s my server.conf (part of):

    server {
        server_name ntfy.mynodebb.com;
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
            proxy_pass http://127.0.0.1:2586;
            proxy_redirect off;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    
        listen 443 ssl;
        ssl_certificate /etc/letsencrypt/live/mynodebb-0001/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/mynodebb-0001/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
    }
    
  • @phenomlab Any idea why I get this message in any browser trying to access ntfy.mynodebb.com?:

    ntfy.mynodebb.com uses a security technology called “HTTP Strict Transport Security (HSTS)”, by which Firefox is allowed to connect to the website only through secured connections. Therefore, no exception can be added for the website.

    That’s my server.conf (part of):

    server {
        server_name ntfy.mynodebb.com;
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
            proxy_pass http://127.0.0.1:2586;
            proxy_redirect off;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    
        listen 443 ssl;
        ssl_certificate /etc/letsencrypt/live/mynodebb-0001/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/mynodebb-0001/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
    }
    
    wrote on last edited by phenomlab
    #5

    @dave1904 do you get the same if you prefix the site with https:// ?

  • @dave1904 do you get the same if you prefix the site with https:// ?

    wrote on last edited by
    #6

    @phenomlab yes, it will be forwarded in any case

  • @phenomlab yes, it will be forwarded in any case

    wrote on last edited by
    #7

    @dave1904 are you using Cloudflare?

  • @dave1904 are you using Cloudflare?

    wrote on last edited by
    #8

    @phenomlab No, I don’t. What I’m not sure of is the root <path to your home directory>. I didn’t set this because I’m not sure where to point.

  • @phenomlab No, I don’t. What I’m not sure of is the root <path to your home directory>. I didn’t set this because I’m not sure where to point.

    wrote on last edited by
    #9

    @dave1904 you should use the full path to the subdomain, so for example /home/domain/subdomains/my.subdomain.com

    Also, have you started ntfy ? (I may have missed that step…)

  • wrote on last edited by dave1904
    #10

    I don’t have a folder for my subdomain. What I did was create a new A-Record on DigitalOcean. ntfy is installed on/etc/ntfy. Then I edited the config as in your example and configured nginx.

    Yes, ntfy is serving.

  • I don’t have a folder for my subdomain. What I did was create a new A-Record on DigitalOcean. ntfy is installed on/etc/ntfy. Then I edited the config as in your example and configured nginx.

    Yes, ntfy is serving.

    wrote on last edited by
    #11

    @dave1904 it looks like the cert being offered is self signed. How did you apply the LetsEncrypt certificate?

  • wrote on last edited by
    #12

    Ohh yes it could be that I have to configure Certbot

  • Ohh yes it could be that I have to configure Certbot

    wrote on last edited by
    #13

    @dave1904 yep!

  • wrote on last edited by
    #14

    It’s working now! 🎊 Really missed that point 😄

  • It’s working now! 🎊 Really missed that point 😄

    wrote on last edited by
    #15

    @dave1904 good news. Easily missed!

  • wrote on last edited by dave1904
    #16

    Is it possible to directly open the link associated with a notification? It feels like a detour to me to first open ntfy and then to click on the link. So basically click notification -> go to website

  • Is it possible to directly open the link associated with a notification? It feels like a detour to me to first open ntfy and then to click on the link. So basically click notification -> go to website

    wrote on last edited by
    #17

    @dave1904 that’s exactly how it works for me? If I click the notification itself, it opens the link to the post directly - admittedly, in a new browser window, but if does work.

  • wrote on last edited by dave1904
    #18

    Ok, I have to check this again.
    Chat message notifications aren’t working for me at the Moment, can you confirm this?

  • Ok, I have to check this again.
    Chat message notifications aren’t working for me at the Moment, can you confirm this?

    wrote on last edited by
    #19

    @dave1904 they work fine for me?

  • wrote on last edited by dave1904
    #20

    @phenomlab Sorry, I was too tired this night. 😄 I upgraded to @1.7.3 and it seems to work now. Only thing I’m still struggling with is to set my own icon in the ACP. It doesn’t seem to be changed here

  • @phenomlab Sorry, I was too tired this night. 😄 I upgraded to @1.7.3 and it seems to work now. Only thing I’m still struggling with is to set my own icon in the ACP. It doesn’t seem to be changed here

    wrote on last edited by phenomlab
    #21

    @dave1904 That relies on the “touch” icon being present - what do you have in

    ACP -> /admin/settings/general -> Touch Icon?

  • @dave1904 That relies on the “touch” icon being present - what do you have in

    ACP -> /admin/settings/general -> Touch Icon?

    wrote on last edited by
    #22

    @phenomlab There I have the path to the touch icon. In the ntfy plugin I used this path as full qualified domain

  • wrote on last edited by dave1904
    #23

    btw do you have any issues with iOS devices? My buddy gets a message in Safari “Notifications not supported in this browser”, without any possiblity to activate them. He tries it with the native ntfy iOS app now.


Related Topics