[GH-ISSUE #1519] Can't create a user and its token with config #1070

Closed
opened 2026-05-07 00:30:01 +02:00 by BreizhHardware · 1 comment

Originally created by @furkan-guvenc on GitHub (Dec 21, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1519

🐞 Describe the bug
I used docker compose to self host Ntfy and used the Private Instance example. It didn't work and as I understand the error happens because of the order of operations in ntfy's startup sequence. Ntfy tries to process the NTFY_AUTH_TOKENS before it has finished creating the user defined in NTFY_AUTH_USERS. Since the user "phil" doesn't exist yet in the database, the token assignment fails.

💻 Components impacted
ntfy server

💡 Screenshots and/or logs
Logs:

invalid auth-tokens: "phil:tk_3gd7d2yftt4b8ixyfe9mnmro88o76:My personal token", user "phil" is not provisioned

🔮 Additional context
Config:

    environment:
      - NTFY_BEHIND_PROXY-proxy=true
      - TZ=UTC
      - NTFY_AUTH_FILE=/etc/ntfy/user.db
      - NTFY_AUTH_DEFAULT_ACCESS=deny-all
      - NTFY_AUTH_USERS=phil:$$2a$10$$YLiO8U21sX1uhZamTLJXHuxgVC0Z/GKISibrKCLohPgtG7yIxSk4C:admin
      - NTFY_AUTH_TOKENS="phil:tk_3gd7d2yftt4b8ixyfe9mnmro88o76:My personal token"
Originally created by @furkan-guvenc on GitHub (Dec 21, 2025). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1519 :lady_beetle: **Describe the bug** I used docker compose to self host Ntfy and used the [Private Instance](https://docs.ntfy.sh/config/#example-private-instance) example. It didn't work and as I understand the error happens because of the order of operations in ntfy's startup sequence. Ntfy tries to process the NTFY_AUTH_TOKENS before it has finished creating the user defined in NTFY_AUTH_USERS. Since the user "phil" doesn't exist yet in the database, the token assignment fails. :computer: **Components impacted** ntfy server :bulb: **Screenshots and/or logs** Logs: ``` invalid auth-tokens: "phil:tk_3gd7d2yftt4b8ixyfe9mnmro88o76:My personal token", user "phil" is not provisioned ``` :crystal_ball: **Additional context** Config: ```yaml environment: - NTFY_BEHIND_PROXY-proxy=true - TZ=UTC - NTFY_AUTH_FILE=/etc/ntfy/user.db - NTFY_AUTH_DEFAULT_ACCESS=deny-all - NTFY_AUTH_USERS=phil:$$2a$10$$YLiO8U21sX1uhZamTLJXHuxgVC0Z/GKISibrKCLohPgtG7yIxSk4C:admin - NTFY_AUTH_TOKENS="phil:tk_3gd7d2yftt4b8ixyfe9mnmro88o76:My personal token" ```
BreizhHardware 2026-05-07 00:30:01 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@binwiederhier commented on GitHub (Jan 18, 2026):

Sorry I didn't see this before, but pretty sure the variables should be var: value. See example here: https://docs.ntfy.sh/config/#example-config

I just tested and it works just fine. Ask on Discord/Matrix if you still have questions.

<!-- gh-comment-id:3764702687 --> @binwiederhier commented on GitHub (Jan 18, 2026): Sorry I didn't see this before, but pretty sure the variables should be `var: value`. See example here: https://docs.ntfy.sh/config/#example-config I just tested and it works just fine. Ask on Discord/Matrix if you still have questions.
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#1070
No description provided.