[GH-ISSUE #1383] Is it considered safe to use a selfhosted instance without any auth #978

Closed
opened 2026-05-07 00:29:17 +02:00 by BreizhHardware · 4 comments

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?

By default, the ntfy server is open for everyone, meaning everyone can read and write to any topic (this is how ntfy.sh is configured). To restrict access to your own server, you can optionally configure authentication and authorization.

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)

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? > By default, the ntfy server is open for everyone, meaning everyone can read and write to any topic (this is how ntfy.sh is configured). To restrict access to your own server, you can optionally configure authentication and authorization. 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)
BreizhHardware 2026-05-07 00:29:17 +02:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@binwiederhier commented on GitHub (Jul 6, 2025):

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!

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:

  • It's easier to configure and to publish messages (no curl -u username:password ... everywhere)

Disadvantages:

  • Other people may use your server (Is that a disavantage?)
  • You can't use simple topic names like "alerts" and "logins"

Let me know if this answers your questions

<!-- gh-comment-id:3042476897 --> @binwiederhier commented on GitHub (Jul 6, 2025): > 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! 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: - It's easier to configure and to publish messages (no `curl -u username:password ...` everywhere) Disadvantages: - Other people may use your server (Is that a disavantage?) - You can't use simple topic names like "alerts" and "logins" Let me know if this answers your questions
Author
Owner

@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?

<!-- gh-comment-id:3043969022 --> @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?
Author
Owner

@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

<!-- gh-comment-id:3044003093 --> @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](https://docs.ntfy.sh/integrations/#alternative-ntfy-servers)). 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
Author
Owner

@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!

<!-- gh-comment-id:3044566298 --> @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!
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#978
No description provided.