mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #1383] Is it considered safe to use a selfhosted instance without any auth #978
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#978
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 @m1212e on GitHub (Jul 6, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1383
Hey, thanks for this great tool and the time invested into it!
I'm about to self host an instance and was asking myself if there are some 'best practices' around this. I read through the docs and config instructions and I think I know how to get going but around the whole topic of auth I got a little confused.
Is it ok to not enable auth in any way?
I'd very much appreciate if the docs would include some form of recommendation. I see why auth and ACL is there and I also understand how to use it. Currently I ask myself if I should enable it and what implications come with it. Because in theory, please correct me if I'm wrong, I could just use very long and random topic names to prevent unauthorized access to my messages. Since there are reasonable limits, abuse hopefully would not be an issue anyway. What advantage comes with using/not using auth and in which cases should I enable what? Some examples on this whole topic would be very helpful!
Thanks again for taking the time!
(quick sidenote: Enabling the GitHub discussions would be great since those get indexed by search engines and are public, where discord is not)
@binwiederhier commented on GitHub (Jul 6, 2025):
Whatever you put on the Internet will eventually be abused, unless you take precautions. That's a fact of life :-)
That said, ntfy has an outrageous amount of rate limits in place to counter that abuse. There are request limits, message limits, bandwidth limit, subscription limits, .... See https://docs.ntfy.sh/config/#rate-limiting for details. With all these limits in place (and enabled by default, albeit quite generous), people will not be able to fill up the disk or otherwise bring down the server (at least not without effort). If you want to be sure about that, you can put fail2ban in place (see https://docs.ntfy.sh/config/#banning-bad-actors-fail2ban), which will block these actors before it even reaches ntfy. See https://github.com/binwiederhier/ntfy-ansible/tree/main/roles/fail2ban too.
ntfy.sh is configured this way, though the request limits and message limits are wayy smaller than the defaults, because otherwise my SaaS business wouldn't make any money.
Advantages:
curl -u username:password ...everywhere)Disadvantages:
Let me know if this answers your questions
@m1212e commented on GitHub (Jul 7, 2025):
Hey, yes thank you very much for you input!
So a reasonable approach would be to either put auth restrictions in place or to reduce the default rate limits and keep an eye on load/abuse and switch to authenticated if necessary?
@binwiederhier commented on GitHub (Jul 7, 2025):
Honestly, there are plenty of ntfy servers without rate limit adjustments on the public Internet and nobody's complained. Some are even advertising it (see ntfy docs). I'd just see how it goes with the defaults.
The beautiful thing is that if you use more or less cryptic topics, there's not much chance of leakage. And typically you're not really sending state secrets anyway :-D
@m1212e commented on GitHub (Jul 7, 2025):
True that! I'd like to implement some sort of dummy smtp notification relay for all of my selfhosted services. Basically using ntfy as a mail bridge sorta thing so best would be no leaks :D
But I think I know everything I need to know! Thanks a lot for your quick answers and your work on this project!