[GH-ISSUE #344] ntfy user commands don't work if auth_file is used in config instead of auth-file #266

Closed
opened 2026-05-07 00:22:28 +02:00 by BreizhHardware · 3 comments

Originally created by @Histalek on GitHub (Jun 24, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/344

Essentially what the title says.

Deployment / Version used

podman run -d -v ./server.yml:/etc/ntfy/server.yml:ro -p 80:80 --name=ntfy docker.io/binwiederhier/ntfy:v1.27.2@sha256:19eeaec60fda9dfd4757f79610494f5ec78ece274c995f032edc68238720e0a2 serve

Reproduction

  1. specify auth_file in server.yml e.g. auth_file: "/var/lib/ntfy/auth.db"
  2. start container (see above)
  3. exec into container e.g. podman exec -it ntfy /bin/sh
  4. execute ntfy user command and observe output:
$ ntfy user add myuser mytopic rw
option auth-file not set; auth is unconfigured for this server

Once I switch from auth_file to auth-file in the server.yml everything works. This contradicts the statement at the top of the server.yml

Originally created by @Histalek on GitHub (Jun 24, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/344 Essentially what the title says. **Deployment / Version used** ``` podman run -d -v ./server.yml:/etc/ntfy/server.yml:ro -p 80:80 --name=ntfy docker.io/binwiederhier/ntfy:v1.27.2@sha256:19eeaec60fda9dfd4757f79610494f5ec78ece274c995f032edc68238720e0a2 serve ``` **Reproduction** 1. specify `auth_file` in server.yml e.g. `auth_file: "/var/lib/ntfy/auth.db"` 2. start container (see above) 3. exec into container e.g. `podman exec -it ntfy /bin/sh` 4. execute ntfy user command and observe output: ``` $ ntfy user add myuser mytopic rw option auth-file not set; auth is unconfigured for this server ``` Once I switch from `auth_file` to `auth-file` in the server.yml everything works. This contradicts the [statement at the top of the server.yml ](https://github.com/binwiederhier/ntfy/blob/20f835df5086b0ca5367fa8cad194fa96a12fb67/server/server.yml#L4)
BreizhHardware 2026-05-07 00:22:28 +02:00
Author
Owner

@binwiederhier commented on GitHub (Jun 24, 2022):

Good catch. This is just an oversight. Fixed in github.com/binwiederhier/ntfy@30c8d6b02b, which will be a while since I just released yesterday.

Thank you for reporting and the detailed report!

<!-- gh-comment-id:1166059312 --> @binwiederhier commented on GitHub (Jun 24, 2022): Good catch. This is just an oversight. Fixed in https://github.com/binwiederhier/ntfy/commit/30c8d6b02b6b12f3f2d0f372485a5c7a8d08be62, which will be a while since I just released yesterday. Thank you for reporting and the detailed report!
Author
Owner

@Histalek commented on GitHub (Jun 25, 2022):

Thanks for fixing this so quickly!
I'm totally fine waiting for the next release, the workaround is easy enough :D

<!-- gh-comment-id:1166191474 --> @Histalek commented on GitHub (Jun 25, 2022): Thanks for fixing this so quickly! I'm totally fine waiting for the next release, the workaround is easy enough :D
Author
Owner

@wtf911 commented on GitHub (May 7, 2025):

Not sure if this would be considered an issue or working correctly:

This works:
ntfy user -auth-file="\ntfy\user.db" add --role=admin phil

But this doesn't:
ntfy user add --role=admin phil -auth-file="\ntfy\user.db"

Just mentioning it because I figured it out by trial and error and could see someone else having trouble too.

<!-- gh-comment-id:2857583557 --> @wtf911 commented on GitHub (May 7, 2025): Not sure if this would be considered an issue or working correctly: This works: ntfy user -auth-file="\ntfy\user.db" add --role=admin phil But this doesn't: ntfy user add --role=admin phil -auth-file="\ntfy\user.db" Just mentioning it because I figured it out by trial and error and could see someone else having trouble too.
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#266
No description provided.