[GH-ISSUE #1416] NTFY_AUTH_USERS does not create users #997

Closed
opened 2026-05-07 00:29:27 +02:00 by BreizhHardware · 3 comments

Originally created by @stefanvanherwijnen on GitHub (Aug 5, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1416

🐞 Describe the bug

When defining NTFY_AUTH_USERS in the docker compose configuration, the defined user is not available in ntfy.

💻 Components impacted

ntfy server inside a docker container
💡 Screenshots and/or logs

/ # echo $NTFY_AUTH_USERS
phil:$2a$10$YLiO8U21sX1uhZamTLJXHuxgVC0Z/GKISibrKCLohPgtG7yIxSk4C:admin
/ # ntfy user list
user * (role: anonymous, tier: none)
- no topic-specific permissions
- read-only access to all (other) topics (server config)

🔮 Additional context

There are also some issues with escaping the $ character in the hashed passwords. Not a ntfy problem, but it will sometimes break the docker compose configuration.

docker-compose.yaml

  ntfy:
    image: binwiederhier/ntfy
    container_name: ntfy
    labels:
      caddy: __url__
      caddy.reverse_proxy: "{{upstreams 80}}"
    command:
      - serve
    volumes:
      - ./config:/etc/ntfy
    environment:
      TZ: Europe/Amsterdam
      NTFY_BASE_URL: __url__
      NTFY_CACHE_FILE: /etc/ntfy/cache.db
      NTFY_AUTH_FILE: /etc/ntfy/auth.db
      NTFY_AUTH_DEFAULT_ACCESS: read-only
      NTFY_AUTH_USERS: phil:$$2a$$10$$YLiO8U21sX1uhZamTLJXHuxgVC0Z/GKISibrKCLohPgtG7yIxSk4C:admin
      NTFY_BEHIND_PROXY: true
      NTFY_ATTACHMENT_CACHE_DIR: /etc/ntfy/attachments
      NTFY_ENABLE_LOGIN: true
    healthcheck: # optional: remember to adapt the host:port to your environment
      test:
        [
          "CMD-SHELL",
          "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1",
        ]
      interval: 60s
      timeout: 10s
      retries: 3
      start_period: 40s
    networks:
      - web
    restart: unless-stopped
Originally created by @stefanvanherwijnen on GitHub (Aug 5, 2025). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1416 :lady_beetle: **Describe the bug** <!-- A clear and concise description of the problem. --> When defining `NTFY_AUTH_USERS` in the docker compose configuration, the defined user is not available in ntfy. :computer: **Components impacted** <!-- ntfy server, Android app, iOS app, web app --> ntfy server inside a docker container :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 --> ```sh / # echo $NTFY_AUTH_USERS phil:$2a$10$YLiO8U21sX1uhZamTLJXHuxgVC0Z/GKISibrKCLohPgtG7yIxSk4C:admin / # ntfy user list user * (role: anonymous, tier: none) - no topic-specific permissions - read-only access to all (other) topics (server config) ``` :crystal_ball: **Additional context** <!-- Add any other context about the problem here. --> There are also some issues with escaping the `$` character in the hashed passwords. Not a ntfy problem, but it will sometimes break the docker compose configuration. docker-compose.yaml ```yaml ntfy: image: binwiederhier/ntfy container_name: ntfy labels: caddy: __url__ caddy.reverse_proxy: "{{upstreams 80}}" command: - serve volumes: - ./config:/etc/ntfy environment: TZ: Europe/Amsterdam NTFY_BASE_URL: __url__ NTFY_CACHE_FILE: /etc/ntfy/cache.db NTFY_AUTH_FILE: /etc/ntfy/auth.db NTFY_AUTH_DEFAULT_ACCESS: read-only NTFY_AUTH_USERS: phil:$$2a$$10$$YLiO8U21sX1uhZamTLJXHuxgVC0Z/GKISibrKCLohPgtG7yIxSk4C:admin NTFY_BEHIND_PROXY: true NTFY_ATTACHMENT_CACHE_DIR: /etc/ntfy/attachments NTFY_ENABLE_LOGIN: true healthcheck: # optional: remember to adapt the host:port to your environment test: [ "CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1", ] interval: 60s timeout: 10s retries: 3 start_period: 40s networks: - web restart: unless-stopped ```
BreizhHardware 2026-05-07 00:29:27 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@binwiederhier commented on GitHub (Aug 5, 2025):

The auth users feature is not available yet. It will be in about 10min though when I cut the 2.14.0 release.

<!-- gh-comment-id:3154047377 --> @binwiederhier commented on GitHub (Aug 5, 2025): The auth users feature is not available yet. It will be in about 10min though when I cut the 2.14.0 release.
Author
Owner

@stefanvanherwijnen commented on GitHub (Aug 5, 2025):

That makes sense, I couldn't really find anything in the source code either at this moment.
Thanks 👍 .

<!-- gh-comment-id:3154053965 --> @stefanvanherwijnen commented on GitHub (Aug 5, 2025): That makes sense, I couldn't really find anything in the source code either at this moment. Thanks 👍 .
Author
Owner

@binwiederhier commented on GitHub (Aug 5, 2025):

Okay, it's released.

<!-- gh-comment-id:3154106601 --> @binwiederhier commented on GitHub (Aug 5, 2025): Okay, it's released.
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#997
No description provided.