[GH-ISSUE #898] iOS not receiving push notifications (iPhone 15 Pro, iOS 17.0.2) #636

Open
opened 2026-05-07 00:26:06 +02:00 by BreizhHardware · 25 comments

Originally created by @jacob-shuman on GitHub (Sep 26, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/898

🐞 Describe the bug
I've setup ntfy using docker compose and I am unable to receive push notifications.

💻 Components impacted
iOS App

🔮 Additional context
For both the base url in the server.yml config as well as the default server in the iOS app I have tried using my local ip address both with and without the port (80) prefixed with http://. When I go into the app and subscribe to a topic manually refreshing the topic correctly shows me notifications for that topic. In my server.yml file I uncommented the upstream line for iOS users. I've noticed that when I try to send a test notification in the app and refresh the test notification does appear but a push notification is never sent (I'm not sure if this is intentional). I have enabled push notifications in the app (I do have scheduled summary for other apps but I enabled immediate delivery for the ntfy app).

Please let me know if there's any other information I can provide. Thank you for all of your hard work developing ntfy, it looks incredible and I'm excited to start using it!

Originally created by @jacob-shuman on GitHub (Sep 26, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/898 :lady_beetle: **Describe the bug** I've setup ntfy using docker compose and I am unable to receive push notifications. :computer: **Components impacted** iOS App :crystal_ball: **Additional context** For both the base url in the server.yml config as well as the default server in the iOS app I have tried using my local ip address both with and without the port (80) prefixed with `http://`. When I go into the app and subscribe to a topic manually refreshing the topic correctly shows me notifications for that topic. In my server.yml file I uncommented the upstream line for iOS users. I've noticed that when I try to send a test notification in the app and refresh the test notification does appear but a push notification is never sent (I'm not sure if this is intentional). I have enabled push notifications in the app (I do have scheduled summary for other apps but I enabled immediate delivery for the ntfy app). Please let me know if there's any other information I can provide. Thank you for all of your hard work developing ntfy, it looks incredible and I'm excited to start using it!
Author
Owner

@chrismueller commented on GitHub (Sep 28, 2023):

For iOS you need to configure "https://ntfy.sh" as "upsteam-base-url" in your server.yml.
See: iOS instant notifications for futher details.

<!-- gh-comment-id:1739977216 --> @chrismueller commented on GitHub (Sep 28, 2023): For iOS you need to configure "https://ntfy.sh" as "upsteam-base-url" in your server.yml. See: [iOS instant notifications](https://docs.ntfy.sh/config/?h=#ios-instant-notifications) for futher details.
Author
Owner

@Aspect13 commented on GitHub (Sep 30, 2023):

Same thing. But I use a different port for the app, if it matters (hopefully not).
The ntfy is running in docker with ports "9876:80", so inside a container it is still listening on 80. For base-url and server address I set http://my.dns.com:9876. Message flow is working correctly, but pushes do not work.

<!-- gh-comment-id:1741810229 --> @Aspect13 commented on GitHub (Sep 30, 2023): Same thing. But I use a different port for the app, if it matters (hopefully not). The ntfy is running in docker with ports "9876:80", so inside a container it is still listening on 80. For base-url and server address I set http://my.dns.com:9876. Message flow is working correctly, but pushes do not work.
Author
Owner

@ChokunPlayZ commented on GitHub (Oct 1, 2023):

I try to send a test notification in the app

yes it is intentional, the push notification will not be sent to the device that send the notification
try running this in a terminal on other device you have, or send the test notification via the web interface
it should trigger the push notification on your phone

curl -d "Hi" <your ntfy url>/<topic>
<!-- gh-comment-id:1741972909 --> @ChokunPlayZ commented on GitHub (Oct 1, 2023): > I try to send a test notification in the app ~~yes it is intentional, the push notification will not be sent to the device that send the notification~~ try running this in a terminal on other device you have, or send the test notification via the web interface it should trigger the push notification on your phone ```bash curl -d "Hi" <your ntfy url>/<topic> ```
Author
Owner

@Aspect13 commented on GitHub (Oct 1, 2023):

the push notification will not be sent to the device that send the notification

Absolutely untrue.
Try sending a test notification from the application clicking ... in top right corner -> Send test notification. My device (iOS) gets the notification afterwards.
(No, I have not solved the issue with self-hosted servce, I used https://ntfy.sh server for this test case)

<!-- gh-comment-id:1742009679 --> @Aspect13 commented on GitHub (Oct 1, 2023): > the push notification will not be sent to the device that send the notification Absolutely untrue. Try sending a test notification from the application clicking `...` in top right corner -> `Send test notification`. My device (iOS) gets the notification afterwards. (No, I have not solved the issue with self-hosted servce, I used `https://ntfy.sh` server for this test case)
Author
Owner

@ChokunPlayZ commented on GitHub (Oct 1, 2023):

the push notification will not be sent to the device that send the notification

Absolutely untrue. Try sending a test notification from the application clicking ... in top right corner -> Send test notification. My device (iOS) gets the notification afterwards. (No, I have not solved the issue with self-hosted servce, I used https://ntfy.sh server for this test case)

I am able to get the notification now, not sure why I was able to reproduce what OP is saying earlier today
I'm on a self hosted server and it works, I use a reverse proxy to expose the service

<!-- gh-comment-id:1742016050 --> @ChokunPlayZ commented on GitHub (Oct 1, 2023): > > the push notification will not be sent to the device that send the notification > > Absolutely untrue. Try sending a test notification from the application clicking `...` in top right corner -> `Send test notification`. My device (iOS) gets the notification afterwards. (No, I have not solved the issue with self-hosted servce, I used `https://ntfy.sh` server for this test case) I am able to get the notification now, not sure why I was able to reproduce what OP is saying earlier today I'm on a self hosted server and it works, I use a reverse proxy to expose the service
Author
Owner

@bvbeek commented on GitHub (Oct 4, 2023):

Same issue here, no push notifications

<!-- gh-comment-id:1746161976 --> @bvbeek commented on GitHub (Oct 4, 2023): Same issue here, no push notifications
Author
Owner

@ctschach commented on GitHub (Oct 4, 2023):

Same happened to me, after I upgraded to and iPhone15….

Once I removed the ntfy app, deleted all data and then downloaded it again from the AppStore, confirmed that I want to receive messages, everything was working again as it should.

I assume that the restore/transfer messed up the internal push identifies…

<!-- gh-comment-id:1747310255 --> @ctschach commented on GitHub (Oct 4, 2023): Same happened to me, after I upgraded to and iPhone15…. Once I removed the ntfy app, deleted all data and then downloaded it again from the AppStore, confirmed that I want to receive messages, everything was working again as it should. I assume that the restore/transfer messed up the internal push identifies…
Author
Owner

@Trystan34 commented on GitHub (Oct 8, 2023):

I am still facing the same issue. I do not receive push notifications on iOS 17.0.1 nor on iOS 17.0.2 or iOS 17.0.3. If I refresh manually in the app, they do show up. I tried reinstalling as @ctschach suggested but still nothing unfortunately.

I am also self hosting and modified config to use upsteam-base-url: https://ntfy.sh/

Similar to @Aspect13, I also use a different port on host as port 80 is being used by another service. The notifications work as expected on my domain on the desktop web browser with Cloudflare Tunnel.

Edit: I have fixed the issue and now receive notifications on iOS. It was a misconfiguration on my part.
In your server.yml file: I had the base url set to local ip rather than my domain.
base-url: 192.168.1.10 -> base-url: https://exampledomain.com

<!-- gh-comment-id:1752161577 --> @Trystan34 commented on GitHub (Oct 8, 2023): ~I am still facing the same issue. I do not receive push notifications on iOS 17.0.1 nor on iOS 17.0.2 or iOS 17.0.3.~ If I refresh manually in the app, they do show up. I tried reinstalling as @ctschach suggested ~but still nothing unfortunately~. I am also self hosting and modified config to use upsteam-base-url: https://ntfy.sh/ Similar to @Aspect13, I also use a different port on host as port 80 is being used by another service. The notifications work as expected on my domain on the desktop web browser with Cloudflare Tunnel. **Edit**: I have fixed the issue and now receive notifications on iOS. It was a misconfiguration on my part. In your server.yml file: I had the base url set to local ip rather than my domain. ~base-url: 192.168.1.10~ -> **_base-url: https://exampledomain.com_**
Author
Owner

@Aspect13 commented on GitHub (Oct 9, 2023):

@Trystan34 I noticed that you have ssl setup.
My server listens on 80 (http) not 443 (https) could this be the case?
I'm still having the issue, my config seems to be fine in terms of base-url and upsteam-base-url

<!-- gh-comment-id:1753510195 --> @Aspect13 commented on GitHub (Oct 9, 2023): @Trystan34 I noticed that you have ssl setup. My server listens on 80 (http) not 443 (https) could this be the case? I'm still having the issue, my config seems to be fine in terms of _base-url_ and _upsteam-base-url_
Author
Owner

@Trystan34 commented on GitHub (Oct 11, 2023):

@Aspect13 My server listens on port 8080 (http) not SSL but due to the one of the useful features of Cloud Flare, it provides a toggle for auto SSL encryption to the domain even though the actual NTFY server is listening on HTTP.

Originally I had my base-url set to the static ip of my Raspberry Pi but I did not receive the notifications, since changing it to my domain with https (even though I do not have HTTPS enabled in the ntfy server.yml) it works now.

image

My docker-compose file

version: "2.3"

services:
  ntfy:
    image: binwiederhier/ntfy
    container_name: ntfy
    command:
      - serve
    environment:
      - TZ=NZDT # optional: set desired timezone
    #user: 1000:1000 # optional: replace with your own user/group or uid/gid
    volumes:
      - /var/cache/ntfy/cache.db:/var/cache/ntfy
      - /etc/ntfy:/etc/ntfy
    ports:
      - "8080:80"
    restart: always

Since the Cloud Flare Tunnel points to my static ip of the Raspberry PI including port 8080, in the iOS app, I have the server set to just domain name excluding the port number. Also, in the server.yml the base-url does not include the port.

<!-- gh-comment-id:1758588190 --> @Trystan34 commented on GitHub (Oct 11, 2023): @Aspect13 My server listens on port 8080 (http) not SSL but due to the one of the useful features of Cloud Flare, it provides a toggle for auto SSL encryption to the domain even though the actual NTFY server is listening on HTTP. Originally I had my base-url set to the static ip of my Raspberry Pi but I did not receive the notifications, since changing it to my domain with https (even though I do not have HTTPS enabled in the ntfy server.yml) it works now. ![image](https://github.com/binwiederhier/ntfy/assets/2108308/a3973b46-c06b-4384-88ef-c420c3a3db98) My docker-compose file ```yaml version: "2.3" services: ntfy: image: binwiederhier/ntfy container_name: ntfy command: - serve environment: - TZ=NZDT # optional: set desired timezone #user: 1000:1000 # optional: replace with your own user/group or uid/gid volumes: - /var/cache/ntfy/cache.db:/var/cache/ntfy - /etc/ntfy:/etc/ntfy ports: - "8080:80" restart: always ``` Since the Cloud Flare Tunnel points to my static ip of the Raspberry PI including port 8080, in the iOS app, I have the server set to just domain name _excluding the port number_. Also, in the server.yml the base-url _does not include the port_.
Author
Owner

@jamesscottbrown commented on GitHub (Oct 19, 2023):

Same happened to me, after I upgraded to and iPhone15….

Once I removed the ntfy app, deleted all data and then downloaded it again from the AppStore, confirmed that I want to receive messages, everything was working again as it should.

I assume that the restore/transfer messed up the internal push identifies…

Ditto: after migrating to a new iPhone using Quick Start transfer push notifications didn't work on the new phone, but after deleting and re-installing the app they worked again.

<!-- gh-comment-id:1770433647 --> @jamesscottbrown commented on GitHub (Oct 19, 2023): > Same happened to me, after I upgraded to and iPhone15…. > > Once I removed the ntfy app, deleted all data and then downloaded it again from the AppStore, confirmed that I want to receive messages, everything was working again as it should. > > I assume that the restore/transfer messed up the internal push identifies… Ditto: after migrating to a new iPhone using Quick Start transfer push notifications didn't work on the new phone, but after deleting and re-installing the app they worked again.
Author
Owner

@mikekuzak commented on GitHub (Nov 22, 2023):

Using Docker Env variables should work too, right ?

 ntfy:
    image: binwiederhier/ntfy:${NTFY_VERSION}
    container_name: ntfy
    command:
      - serve
    environment:
        TZ: "Europe/London"
        NTFY_BASE_URL: "https://${NTFY_FQDN}"
        NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" # Needed for iOS to work
        NTFY_CACHE_FILE: "/var/cache/ntfy/cache.db"
        NTFY_BEHIND_PROXY: "true"
        NTFY_AUTH_FILE: "/var/cache/ntfy/user.db"
        NTFY_AUTH_DEFAULT_ACCESS: "deny-all"
        NTFY_USER: ${NTFY_USER}
        NTFY_ATTACHMENT_CACHE_DIR: "/var/cache/ntfy/attachments"
        NTFY_WEB_ROOT: "disable"
    user: 1000:1000 # optional: replace with your own user/group or uid/gid
    ```
<!-- gh-comment-id:1821882160 --> @mikekuzak commented on GitHub (Nov 22, 2023): Using Docker Env variables should work too, right ? ``` ntfy: image: binwiederhier/ntfy:${NTFY_VERSION} container_name: ntfy command: - serve environment: TZ: "Europe/London" NTFY_BASE_URL: "https://${NTFY_FQDN}" NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" # Needed for iOS to work NTFY_CACHE_FILE: "/var/cache/ntfy/cache.db" NTFY_BEHIND_PROXY: "true" NTFY_AUTH_FILE: "/var/cache/ntfy/user.db" NTFY_AUTH_DEFAULT_ACCESS: "deny-all" NTFY_USER: ${NTFY_USER} NTFY_ATTACHMENT_CACHE_DIR: "/var/cache/ntfy/attachments" NTFY_WEB_ROOT: "disable" user: 1000:1000 # optional: replace with your own user/group or uid/gid ```
Author
Owner

@emiwirs commented on GitHub (Nov 28, 2023):

I have been trying to find out for days what my notification/alert problem caused , but for me it was rather straight forward. I am using an add blocker (a PiHole) which blocks the firebase URL “firebaselogging-pa.googleapis.com”.
Once whitelisting this one, it solved all my problems… 😬.
So pay attention to any dns filtering, hopefully this helps someone!

<!-- gh-comment-id:1830447064 --> @emiwirs commented on GitHub (Nov 28, 2023): I have been trying to find out for days what my notification/alert problem caused , but for me it was rather straight forward. I am using an add blocker (a PiHole) which blocks the firebase URL “firebaselogging-pa.googleapis.com”. Once whitelisting this one, it solved all my problems… 😬. So pay attention to any dns filtering, hopefully this helps someone!
Author
Owner

@mikekuzak commented on GitHub (Nov 29, 2023):

So just that I understand this correctly, on the Nfty server:

        NTFY_BASE_URL: "https://myntfy.com"
        NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" 

What are the settings on the ios app ?
Default server: https://ntfy.sh but when you add topic you specify your server https://myntfy.com topic lets say: 'test' ?

<!-- gh-comment-id:1830969288 --> @mikekuzak commented on GitHub (Nov 29, 2023): So just that I understand this correctly, on the Nfty server: ``` NTFY_BASE_URL: "https://myntfy.com" NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" ``` What are the settings on the ios app ? Default server: https://ntfy.sh but when you add topic you specify your server https://myntfy.com topic lets say: 'test' ?
Author
Owner

@emiwirs commented on GitHub (Nov 29, 2023):

That is mostly correct, only difference is default server is myntfy.com on iOS.
Environment: ntfy in docker, traefik for exposing through ssl, iOS en iPadOS devices, working server.yml file

Tested:

  • self hosted, via IP address, no ssl, no traefik
  • self hosted, via dns name and traefik, with ssl
  • ntfy.sh !
  • switches in the server.yml file

All of the above (plus switching default servers) do get the test messages through on the iOS devices after pulling down, forcing refresh, in the apps. However, the notifications simply didn’t get through at all.

Switching off PiHole filtering made the notifications for new messages appear instantly (depending on the priority of the test messages, low priority I didn’t wait for, but 3 default prio or higher, direct results). Blocking off the firebase url was occurring when PiHole was switched on again.

Self hosting problem? No, I also used a fresh app install and only defined ntfy.sh/mytopic, same problem.
And now also solved.

<!-- gh-comment-id:1831464426 --> @emiwirs commented on GitHub (Nov 29, 2023): That is mostly correct, only difference is default server is myntfy.com on iOS. Environment: ntfy in docker, traefik for exposing through ssl, iOS en iPadOS devices, working server.yml file Tested: - self hosted, via IP address, no ssl, no traefik - self hosted, via dns name and traefik, with ssl - ntfy.sh ! - switches in the server.yml file All of the above (plus switching default servers) do get the test messages through on the iOS devices after pulling down, forcing refresh, in the apps. However, the notifications simply didn’t get through at all. Switching off PiHole filtering made the notifications for new messages appear instantly (depending on the priority of the test messages, low priority I didn’t wait for, but 3 default prio or higher, direct results). Blocking off the firebase url was occurring when PiHole was switched on again. Self hosting problem? No, I also used a fresh app install and only defined ntfy.sh/mytopic, same problem. And now also solved.
Author
Owner

@mikekuzak commented on GitHub (Nov 29, 2023):

well my confusion here is statement from the author:

The upstream-base-url must be configured to match exactly what you have configured as a default base URL in your iOS app. Otherwise messages will not arrive at all. See https://docs.ntfy.sh/config/#ios-instant-notifications

So my understanding is that if you point
NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh"
(as suggested)

in the iOS you also have to set the base URL to
"https://ntfy.sh"

unless I get this totally wrong.

<!-- gh-comment-id:1831643220 --> @mikekuzak commented on GitHub (Nov 29, 2023): well my confusion here is statement from the author: `The upstream-base-url must be configured to match exactly what you have configured as a default base URL in your iOS app. Otherwise messages will not arrive at all. See https://docs.ntfy.sh/config/#ios-instant-notifications` So my understanding is that if you point NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" (as suggested) in the iOS you also have to set the base URL to "https://ntfy.sh" unless I get this totally wrong.
Author
Owner

@emiwirs commented on GitHub (Nov 29, 2023):

I read it the same as you do, but for me it isn’t a requirement…

Some more test results:

  • Removed the app, reinstall and to make it work in 1 go = disable PiHole and start the app.
  • Once the app is working it keeps on working even with PiHole enabled without any extra whitelisting, also with the app restarted. Will see if it stays working after some days, but most likely it will.
  • Remove the app again, reinstall, PiHole active and no whitelisting, nothing comes through. Disable PiHole, and it comes alive again and continues to work, also after enabling PiHole again.

There is some activation/enabling/registration happening, as once it is working, it continues to work: 1 iOS device I didn’t change/touch during the testing and that one continues to receive all notifications during testing. I will also check over a longer period whether it is related to some dns caching…

So, at this moment, I am sure it is related to the following 4 URL’s (all of them or any combination of them):

  • firebaselogging-pa.googleapis.com
  • firebaseinstallations.googleapis.com
  • region1.app-measurement.com
  • fcmtoken.googleapis.com
<!-- gh-comment-id:1832641104 --> @emiwirs commented on GitHub (Nov 29, 2023): I read it the same as you do, but for me it isn’t a requirement… Some more test results: - Removed the app, reinstall and to make it work in 1 go = disable PiHole and start the app. - Once the app is working it keeps on working even with PiHole enabled without any extra whitelisting, also with the app restarted. Will see if it stays working after some days, but most likely it will. - Remove the app again, reinstall, PiHole active and no whitelisting, nothing comes through. Disable PiHole, and it comes alive again and continues to work, also after enabling PiHole again. There is some activation/enabling/registration happening, as once it is working, it continues to work: 1 iOS device I didn’t change/touch during the testing and that one continues to receive all notifications during testing. I will also check over a longer period whether it is related to some dns caching… So, at this moment, I am sure it is related to the following 4 URL’s (all of them or any combination of them): - firebaselogging-pa.googleapis.com - firebaseinstallations.googleapis.com - region1.app-measurement.com - fcmtoken.googleapis.com
Author
Owner

@wunter8 commented on GitHub (Nov 29, 2023):

well my confusion here is statement from the author:

The upstream-base-url must be configured to match exactly what you have configured as a default base URL in your iOS app. Otherwise messages will not arrive at all. See https://docs.ntfy.sh/config/#ios-instant-notifications

So my understanding is that if you point NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" (as suggested)

in the iOS you also have to set the base URL to "https://ntfy.sh"

unless I get this totally wrong.

Where did you see that? The default server in iOS needs to exactly match base-url on the server, not upstream-base-url. Make sure they both have https:// and that neither has a trailing /

(See https://docs.ntfy.sh/known-issues/#ios-app-not-receiving-notifications-anymore)

<!-- gh-comment-id:1832651648 --> @wunter8 commented on GitHub (Nov 29, 2023): > well my confusion here is statement from the author: > > `The upstream-base-url must be configured to match exactly what you have configured as a default base URL in your iOS app. Otherwise messages will not arrive at all. See https://docs.ntfy.sh/config/#ios-instant-notifications` > > So my understanding is that if you point NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" (as suggested) > > in the iOS you also have to set the base URL to "https://ntfy.sh" > > unless I get this totally wrong. Where did you see that? The default server in iOS needs to exactly match `base-url` on the server, not `upstream-base-url`. Make sure they both have `https://` and that neither has a trailing `/` (See https://docs.ntfy.sh/known-issues/#ios-app-not-receiving-notifications-anymore)
Author
Owner

@mikekuzak commented on GitHub (Nov 29, 2023):

@wunter8
https://github.com/binwiederhier/ntfy/issues/880#issuecomment-1828949447

<!-- gh-comment-id:1832712340 --> @mikekuzak commented on GitHub (Nov 29, 2023): @wunter8 https://github.com/binwiederhier/ntfy/issues/880#issuecomment-1828949447
Author
Owner

@wunter8 commented on GitHub (Nov 29, 2023):

Got it. I'm pretty sure that was a typo. The link I included to the docs says what I said:

Ensure that the URL you set in base-url matches exactly what you set the Default Server in iOS to

<!-- gh-comment-id:1832754321 --> @wunter8 commented on GitHub (Nov 29, 2023): Got it. I'm pretty sure that was a typo. The link I included to the docs says what I said: > Ensure that the URL you set in `base-url` matches exactly what you set the Default Server in iOS to
Author
Owner

@roemer2201 commented on GitHub (Nov 30, 2023):

I had the same issue as OP, but thanks to this thread, I was able to solve it: My base-url was http://ntfy.example.com (note the missing "s" at "http"). Other set options are listen-http: "localhost:8080", behind-proxy: true. As you can see, my server is configured to run on localhost:8080 without https. Now my apache2 is configured as virtual host for my ntfy.example.com, listening on port 80 and 443, forwarding requests from 80 to 443 (I got this configuration from the documentation) and talking to the service over localhost:8080.

Leaving the "s" in my base-url made the server work basically, but no iOS push was working. So I tried adding the "s" to the base-url and voila ... iOS push is working!

<!-- gh-comment-id:1834591439 --> @roemer2201 commented on GitHub (Nov 30, 2023): I had the same issue as OP, but thanks to this thread, I was able to solve it: My base-url was `http://ntfy.example.com` (note the missing "s" at "http"). Other set options are `listen-http: "localhost:8080"`, `behind-proxy: true`. As you can see, my server is configured to run on localhost:8080 without https. Now my apache2 is configured as virtual host for my `ntfy.example.com`, listening on port 80 and 443, forwarding requests from 80 to 443 (I got this configuration from the [documentation](https://docs.ntfy.sh/config/#nginxapache2caddy)) and talking to the service over `localhost:8080`. Leaving the "s" in my base-url made the server work basically, but no iOS push was working. So I tried **_adding the "s" to the base-url_** and voila ... iOS push is working!
Author
Owner

@omgprod commented on GitHub (Dec 14, 2023):

I had the same issue as OP, but thanks to this thread, I was able to solve it: My base-url was http://ntfy.example.com (note the missing "s" at "http"). Other set options are listen-http: "localhost:8080", behind-proxy: true. As you can see, my server is configured to run on localhost:8080 without https. Now my apache2 is configured as virtual host for my ntfy.example.com, listening on port 80 and 443, forwarding requests from 80 to 443 (I got this configuration from the documentation) and talking to the service over localhost:8080.

Leaving the "s" in my base-url made the server work basically, but no iOS push was working. So I tried adding the "s" to the base-url and voila ... iOS push is working!

Hello there ! can you share your conf files : docker-compose.yml, server.yml and nginx conf file ?

<!-- gh-comment-id:1855717094 --> @omgprod commented on GitHub (Dec 14, 2023): > I had the same issue as OP, but thanks to this thread, I was able to solve it: My base-url was `http://ntfy.example.com` (note the missing "s" at "http"). Other set options are `listen-http: "localhost:8080"`, `behind-proxy: true`. As you can see, my server is configured to run on localhost:8080 without https. Now my apache2 is configured as virtual host for my `ntfy.example.com`, listening on port 80 and 443, forwarding requests from 80 to 443 (I got this configuration from the [documentation](https://docs.ntfy.sh/config/#nginxapache2caddy)) and talking to the service over `localhost:8080`. > > Leaving the "s" in my base-url made the server work basically, but no iOS push was working. So I tried **_adding the "s" to the base-url_** and voila ... iOS push is working! Hello there ! can you share your conf files : docker-compose.yml, server.yml and nginx conf file ?
Author
Owner

@roemer2201 commented on GitHub (Dec 14, 2023):

Hello there ! can you share your conf files : docker-compose.yml, server.yml and nginx conf file ?

I'm running it on a Linux VPS, no docker or anything, here are the confs used:

$ cat /etc/apache2/sites-available/ntfy.conf
<VirtualHost *:80>
    ServerName ntfy.example.com

    # Proxy connections to ntfy (requires "a2enmod proxy proxy_http")
    ProxyPass / http://127.0.0.1:8080/ upgrade=websocket
    ProxyPassReverse / http://127.0.0.1:8080/

    SetEnv proxy-nokeepalive 1
    SetEnv proxy-sendchunked 1

    # Higher than the max message size of 4096 bytes
    LimitRequestBody 102400

    # Redirect HTTP to HTTPS, but only for GET topic addresses, since we want
    # it to work with curl without the annoying https:// prefix (requires "a2enmod alias")
    <If "%{REQUEST_METHOD} == 'GET'">
        RedirectMatch permanent "^/([-_A-Za-z0-9]{0,64})$" "https://%{SERVER_NAME}/$1"
    </If>

</VirtualHost>

<VirtualHost *:443>
    ServerName ntfy.example.com

    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/example.com_ssl_certificate.cer
    SSLCertificateKeyFile /etc/apache2/ssl/_.example.com_private_key.key

    # Proxy connections to ntfy (requires "a2enmod proxy proxy_http")
    ProxyPass / http://127.0.0.1:8080/ upgrade=websocket
    ProxyPassReverse / http://127.0.0.1:8080/

    SetEnv proxy-nokeepalive 1
    SetEnv proxy-sendchunked 1

    # Higher than the max message size of 4096 bytes
    LimitRequestBody 102400

</VirtualHost>
$ egrep -v '(^#|^$)' /etc/ntfy/server.yml
base-url: https://ntfy.example.com
listen-http: "localhost:8080"
auth-file: /var/lib/ntfy/user.db
auth-default-access: "deny-all"
behind-proxy: true
upstream-base-url: "https://ntfy.sh"
<!-- gh-comment-id:1856668876 --> @roemer2201 commented on GitHub (Dec 14, 2023): > Hello there ! can you share your conf files : docker-compose.yml, server.yml and nginx conf file ? I'm running it on a Linux VPS, no docker or anything, here are the confs used: ```bash $ cat /etc/apache2/sites-available/ntfy.conf ``` ``` <VirtualHost *:80> ServerName ntfy.example.com # Proxy connections to ntfy (requires "a2enmod proxy proxy_http") ProxyPass / http://127.0.0.1:8080/ upgrade=websocket ProxyPassReverse / http://127.0.0.1:8080/ SetEnv proxy-nokeepalive 1 SetEnv proxy-sendchunked 1 # Higher than the max message size of 4096 bytes LimitRequestBody 102400 # Redirect HTTP to HTTPS, but only for GET topic addresses, since we want # it to work with curl without the annoying https:// prefix (requires "a2enmod alias") <If "%{REQUEST_METHOD} == 'GET'"> RedirectMatch permanent "^/([-_A-Za-z0-9]{0,64})$" "https://%{SERVER_NAME}/$1" </If> </VirtualHost> <VirtualHost *:443> ServerName ntfy.example.com SSLEngine on SSLCertificateFile /etc/apache2/ssl/example.com_ssl_certificate.cer SSLCertificateKeyFile /etc/apache2/ssl/_.example.com_private_key.key # Proxy connections to ntfy (requires "a2enmod proxy proxy_http") ProxyPass / http://127.0.0.1:8080/ upgrade=websocket ProxyPassReverse / http://127.0.0.1:8080/ SetEnv proxy-nokeepalive 1 SetEnv proxy-sendchunked 1 # Higher than the max message size of 4096 bytes LimitRequestBody 102400 </VirtualHost> ``` ```bash $ egrep -v '(^#|^$)' /etc/ntfy/server.yml ``` ``` base-url: https://ntfy.example.com listen-http: "localhost:8080" auth-file: /var/lib/ntfy/user.db auth-default-access: "deny-all" behind-proxy: true upstream-base-url: "https://ntfy.sh" ```
Author
Owner

@omgprod commented on GitHub (Dec 14, 2023):

Thank’s @roemer2201 I whish this will helps, I found my way just on turning my firewall rules down from the web hosting service, I have to dig it more for the moment. Hope this can helps. If requested I can share my conf I’m using docker compose, nginx.

I supposed the Poll request getting blocked ..

<!-- gh-comment-id:1856752696 --> @omgprod commented on GitHub (Dec 14, 2023): Thank’s @roemer2201 I whish this will helps, I found my way just on **turning my firewall rules down** from the web hosting service, I have to dig it more for the moment. Hope this can helps. If requested I can share my conf I’m using docker compose, nginx. I supposed the Poll request getting blocked ..
Author
Owner

@bryanperez43 commented on GitHub (Apr 2, 2024):

How i get Life Notifications

version: "3"

services:
  ntfy:
    image: binwiederhier/ntfy
    container_name: ntfy
    command:
      - serve
    environment:
      TZ: "America/New_York"
      NTFY_BASE_URL: "http://{ip}:8080"
      NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh"
    volumes:
      - /var/cache/ntfy:/var/cache/ntfy
      - /etc/ntfy:/etc/ntfy
    ports:
      - "8080:80"
    restart: always

on IOS ntfy app

  1. go to settings
  2. change default server to match NTFY_BASE_URL
  3. subscribe to a topic
  4. you now get live notifications
<!-- gh-comment-id:2032863401 --> @bryanperez43 commented on GitHub (Apr 2, 2024): How i get Life Notifications ``` version: "3" services: ntfy: image: binwiederhier/ntfy container_name: ntfy command: - serve environment: TZ: "America/New_York" NTFY_BASE_URL: "http://{ip}:8080" NTFY_UPSTREAM_BASE_URL: "https://ntfy.sh" volumes: - /var/cache/ntfy:/var/cache/ntfy - /etc/ntfy:/etc/ntfy ports: - "8080:80" restart: always ``` on IOS ntfy app 1. go to settings 2. change default server to match `NTFY_BASE_URL` 3. subscribe to a topic 4. you now get live notifications
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#636
No description provided.