[GH-ISSUE #1692] Attachments not found (404) #1177

Closed
opened 2026-05-07 00:30:51 +02:00 by BreizhHardware · 3 comments

Originally created by @etfz on GitHub (Apr 8, 2026).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1692

Hi,

I have a number of attachments that I am unable to open. Attempting to do so gives me 404.

{"code":40401,"http":404,"error":"page not found"}

The attachments are all set to expire after 30 days. I have mounted /srv/docker/ntfy/cache:/var/cache/ntfy, but in it exists only what I think is the most recent message attachments that I have received.

$ sudo ls -lA /srv/docker/ntfy/cache/attachments/
total 4
-rw------- 1 root root 4096 Apr  6 09:45 hn43ZleddXjW

ntfy server 2.17.

server.yml

base-url: "https://notify.system.example.com"
cache-file: "/var/cache/ntfy/cache.db"
cache-duration: 72h
attachment-cache-dir: "/var/cache/ntfy/attachments"
attachment-expiry-duration: "30d"
auth-file: "/var/lib/ntfy/user.db"
auth-default-access: "deny-all"
behind-proxy: true
enable-login: true
manager-interval: 1h

smtp-server-listen: ":25"
smtp-server-domain: "ntfy.example.com"

visitor-request-limit-burst: 300
Originally created by @etfz on GitHub (Apr 8, 2026). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1692 Hi, I have a number of attachments that I am unable to open. Attempting to do so gives me 404. ``` {"code":40401,"http":404,"error":"page not found"} ``` The attachments are all set to expire after 30 days. I have mounted `/srv/docker/ntfy/cache:/var/cache/ntfy`, but in it exists only what I think is the most recent message attachments that I have received. ``` $ sudo ls -lA /srv/docker/ntfy/cache/attachments/ total 4 -rw------- 1 root root 4096 Apr 6 09:45 hn43ZleddXjW ``` ntfy server 2.17. **server.yml** ``` base-url: "https://notify.system.example.com" cache-file: "/var/cache/ntfy/cache.db" cache-duration: 72h attachment-cache-dir: "/var/cache/ntfy/attachments" attachment-expiry-duration: "30d" auth-file: "/var/lib/ntfy/user.db" auth-default-access: "deny-all" behind-proxy: true enable-login: true manager-interval: 1h smtp-server-listen: ":25" smtp-server-domain: "ntfy.example.com" visitor-request-limit-burst: 300 ```
BreizhHardware 2026-05-07 00:30:51 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@binwiederhier commented on GitHub (Apr 8, 2026):

There was a significant revamp of attachments in the latest releases. Please update to the newest ntfy and test again. Thanks.

<!-- gh-comment-id:4205841029 --> @binwiederhier commented on GitHub (Apr 8, 2026): There was a significant revamp of attachments in the latest releases. Please update to the newest ntfy and test again. Thanks.
Author
Owner

@binwiederhier commented on GitHub (Apr 8, 2026):

Oh but also, the cache duration must be longer or equal to the attachment duration. Attachments cannot outlive messages.

<!-- gh-comment-id:4205846661 --> @binwiederhier commented on GitHub (Apr 8, 2026): Oh but also, the cache duration must be longer or equal to the attachment duration. Attachments cannot outlive messages.
Author
Owner

@etfz commented on GitHub (Apr 8, 2026):

Oh, I see. I will update the cache duration to match attachment expiry, then. Thanks.

<!-- gh-comment-id:4205998201 --> @etfz commented on GitHub (Apr 8, 2026): Oh, I see. I will update the cache duration to match attachment expiry, then. Thanks.
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#1177
No description provided.