[GH-ISSUE #1040] auth-file settings ignored #731

Closed
opened 2026-05-07 00:26:59 +02:00 by BreizhHardware · 3 comments

Originally created by @CountMurphy on GitHub (Feb 29, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1040

🐞 Describe the bug
Just installed on Arch by the ntfysh package. My /etc/ntfy/server.yml has the following three lines:

listen-http: ":8082"
auth-file: "/Raid/ntfy/user.db" 
auth-default-access: "deny-all"

Now the server does indeed start on port 8082, so I know ntfy is reading the config. The permissions on the directory are

drwxr-xr-x ntfy ntfy

When I attempt to create a new user with ntfy user add --role=admin Name I get:

option auth-file not set; auth is unconfigured for this server

The user.db file is also not created at service start.

💻 Components impacted

ntfy server
💡 Screenshots and/or logs

🔮 Additional context

Additionally, the deny-all setting is also ignored and the server is publicly accessible.

Originally created by @CountMurphy on GitHub (Feb 29, 2024). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1040 :lady_beetle: **Describe the bug** Just installed on Arch by the ntfysh package. My `/etc/ntfy/server.yml` has the following three lines: ```yml listen-http: ":8082" auth-file: "/Raid/ntfy/user.db" auth-default-access: "deny-all" ``` Now the server does indeed start on port 8082, so I know ntfy is reading the config. The permissions on the directory are ``` drwxr-xr-x ntfy ntfy ``` When I attempt to create a new user with `ntfy user add --role=admin Name` I get: ``` option auth-file not set; auth is unconfigured for this server ``` The user.db file is also not created at service start. :computer: **Components impacted** <!-- ntfy server, Android app, iOS app, web app --> ntfy server :bulb: **Screenshots and/or logs** <!-- If applicable, add screenshots or share logs help explain your problem. To get logs from the ... - ntfy server: Enable "log-level: trace" in your server.yml file - Android app: Go to "Settings" -> "Record logs", then eventually "Copy/upload logs" - web app: Press "F12" and find the "Console" window --> :crystal_ball: **Additional context** <!-- Add any other context about the problem here. --> Additionally, the deny-all setting is also ignored and the server is publicly accessible.
BreizhHardware 2026-05-07 00:26:59 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@wunter8 commented on GitHub (Feb 29, 2024):

I'd be happy to help on Discord! It's a bit hard to go back and forth here.

(But in essence, I'm guessing the problem is that the systemd service runs as the ntfy user, whereas ntfy user add ... runs as your user, so it's looking at ~/.config/ntfy/server.yml instead of /etc/ntfy/server.yml, so it doesn't know where the auth-file is. You can either sudo -u ntfy ntfy user add ... or ntfy user --auth-file /Raid/ntfy/user.db add ...)

<!-- gh-comment-id:1972001652 --> @wunter8 commented on GitHub (Feb 29, 2024): I'd be happy to help on Discord! It's a bit hard to go back and forth here. (But in essence, I'm guessing the problem is that the systemd service runs as the ntfy user, whereas `ntfy user add ...` runs as your user, so it's looking at `~/.config/ntfy/server.yml` instead of `/etc/ntfy/server.yml`, so it doesn't know where the auth-file is. You can either `sudo -u ntfy ntfy user add ...` or `ntfy user --auth-file /Raid/ntfy/user.db add ...`)
Author
Owner

@CountMurphy commented on GitHub (Feb 29, 2024):

Also tried running as the ntfy user, exact same result. I've just joined. What channel should I join, or should I DM you?

<!-- gh-comment-id:1972007596 --> @CountMurphy commented on GitHub (Feb 29, 2024): Also tried running as the ntfy user, exact same result. I've just joined. What channel should I join, or should I DM you?
Author
Owner

@CountMurphy commented on GitHub (Feb 29, 2024):

Well I did a dumb. My yml was missing a whitespace character before auth-file. Seems to be working now

<!-- gh-comment-id:1972018084 --> @CountMurphy commented on GitHub (Feb 29, 2024): Well I did a dumb. My yml was missing a whitespace character before auth-file. Seems to be working now
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#731
No description provided.