mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-10 00:08:52 +02:00
[GH-ISSUE #1278] Relay notifications from one public server to a private one #901
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#901
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @schklom on GitHub (Feb 18, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1278
💡 Idea
I have a self-hosted ntfy instance at my_ntfy_url.domain.
Problem: my URL is unique, so giving it out to the Internet somewhat identifies me.
What I tried and failed: On ntfy.sh, if I subscribe to my_ntfy_url.domain/topic1, my browser (and phone app) connects to my_ntfy_url.domain.
Solution: On my_ntfy_url.domain/topic1, subscribing to ntfy.sh/topic2 should make the notifications received by ntfy.sh/topic2 go to my_ntfy_url.domain/topic1 and then to my device. Similar to https://docs.ntfy.sh/config/#ios-instant-notifications, but also for other client devices, so topic2 would be the sha256 of my_ntfy_url.domain/topic1.
The easy alternative is to connect my devices to both servers, but on a phone this requires battery to maintain 2 Websocket connections.
This feature would let my phone maintain only 1 connection (to my_ntfy_url.domain) instead of 2 (ntfy.sh + my_ntfy_url.domain), and the notification sender would only know about ntfy.sh instead of my_ntfy_url.domain.
If usable with UnifiedPush, this would solve the privacy issue from https://github.com/simplex-chat/simplex-chat/issues/1081 where the self-hosted ntfy server can be used to uniquely identify its owner, because the other party would only post to ntfy.sh/topic2. Ideally, this feature can be used with and without UnifiedPush.
I understand this would add a connection from the server to ntfy.sh, but at the same time this would allow to avoid connections from devices because they would only need to keep a connection to my_ntfy_url.domain instead of my_ntfy_url.domain + ntfy.sh.
In my situation, i have a few phones that would stop connecting to my_ntfy_url.domain + ntfy.sh, and only connect to my_ntfy_url.domain.
So the load on ntfy.sh might decrease a little.
To relay with UnifiedPush, maybe a toggle in the mobile app settings could say "Relay new UnifiedPush subscriptions via the following server: (default ntfy.sh)".
💻 Target components
ntfy server (functionality to relay notifications)
@binwiederhier commented on GitHub (Feb 2, 2026):
This is an interesting feature, though you are effectively asking ntfy.sh be your VPN-like traffic forwarder.
I currently have no interest in implementing this feature, nor would I accept PRs for this, I think. Unless there is something that I'm missing, there are no upsides for ntfy.sh itself
@schklom commented on GitHub (Feb 2, 2026):
There is a small upside to ntfy.sh: the number of websocket connections to ntfy.sh should decrease in exchange for forwarding the notifications. So the network load on ntfy.sh should be a little lower.
I mean that with this, my phone would only need 1 connection to my_ntfy_url.domain, instead of 1 to my_ntfy_url.domain + 1 to ntfy.sh.
In return, ntfy.sh would forward a small (feel free to limit) amount of messages back to my selfhosted ntfy instance.
It's not a major upside, so I understand if you're still not interested.