Skip to content

[Feature Request] - Support a preferred subscription URL with fallback for the same ntfy server #1862

Description

@HyperCriSiS

Hi,

I run a self-hosted ntfy server that is reachable through two different URLs:

  • a private URL over Tailscale
  • a public URL as a fallback

Both URLs point to the same ntfy instance and use the same topics. I would like the Android app to prefer the private URL for subscriptions, but automatically fall back to the public URL when the private connection is unavailable.

For UnifiedPush, the publishing endpoint should stay unchanged. For example:

Publishing endpoint:
https://push.example.com/upABC123

Preferred subscription URL:
https://push.my-tailnet.ts.net/upABC123

Fallback subscription URL:
https://push.example.com/upABC123

This would allow the phone to receive notifications over the private connection most of the time, while still keeping notifications working if Tailscale, WireGuard, local DNS, or another private route is temporarily unavailable.

The fallback should only affect how the ntfy Android app subscribes to the topic. It should not send a new UnifiedPush endpoint to registered apps when switching between the two URLs.

A possible behavior could be:

  1. Connect through the preferred subscription URL.
  2. After repeated connection failures, switch to the fallback URL.
  3. Periodically retry the preferred URL.
  4. Switch back once it is stable again.
  5. Use a delay or cooldown to avoid frequent switching.

This is not a request for replication or failover between two independent ntfy servers. Both URLs would need to point to the same logical ntfy instance and the same topic.

Other possible use cases would be:

  • direct LAN access with a public reverse-proxy fallback
  • WireGuard or Tailscale with a public fallback
  • a private IPv6 route with an HTTPS proxy fallback
  • internal and external DNS names for the same self-hosted server

Thanks and best regards
Hyper

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions