[GH-ISSUE #1288] Settings are ignored NTFY_KEEPALIVE_INTERVAL #910

Closed
opened 2026-05-07 00:28:41 +02:00 by BreizhHardware · 4 comments

Originally created by @gUstrx on GitHub (Mar 9, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1288

Docker server self-hosting
Settings are ignored
Instead of 45s, keepalive sends packets every 10-15s by default.

If you set
environment:
NTFY_KEEPALIVE_INTERVAL: 60s

it still sends packets 10-15s
this is visible in the router connection tracker

What kind of energy saving can we talk about?
How can I make it send packets according to the settings?

Originally created by @gUstrx on GitHub (Mar 9, 2025). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1288 Docker server self-hosting Settings are ignored Instead of 45s, keepalive sends packets every 10-15s by default. If you set environment: NTFY_KEEPALIVE_INTERVAL: 60s it still sends packets 10-15s this is visible in the router connection tracker What kind of energy saving can we talk about? How can I make it send packets according to the settings?
Author
Owner

@hastyeagle commented on GitHub (Jan 31, 2026):

I'm seeing the same thing on v2.15.0. It's pinging every 15s even when I have keepalive-interval: "45s" set in server.yaml.

<!-- gh-comment-id:3829446253 --> @hastyeagle commented on GitHub (Jan 31, 2026): I'm seeing the same thing on v2.15.0. It's pinging every 15s even when I have `keepalive-interval: "45s"` set in server.yaml.
Author
Owner

@binwiederhier commented on GitHub (Feb 1, 2026):

I tested export NTFY_KEEPALIVE_INTERVAL=5s and keepalive-interval: 5s in the server.yml, and both work as intended. I do not modify or control any of the underlying TCP connections.

<!-- gh-comment-id:3831123459 --> @binwiederhier commented on GitHub (Feb 1, 2026): I tested `export NTFY_KEEPALIVE_INTERVAL=5s` and `keepalive-interval: 5s` in the server.yml, and both work as intended. I do not modify or control any of the underlying TCP connections.
Author
Owner

@hastyeagle commented on GitHub (Feb 1, 2026):

5s works for me too, but anything over 15s doesn't work (it uses 15s no matter if I have it set to 30s or 45s, etc.). It seems like 15s is the max keep-alive.

<!-- gh-comment-id:3831770297 --> @hastyeagle commented on GitHub (Feb 1, 2026): 5s works for me too, but anything over 15s doesn't work (it uses 15s no matter if I have it set to 30s or 45s, etc.). It seems like 15s is the max keep-alive.
Author
Owner

@binwiederhier commented on GitHub (Feb 1, 2026):

I am not entirely sure what you are doing wrong, but it works for me. It's worth noting that you referenced the server.yaml (< wrong) file, but it has to be server.yml (no "a").

$ curl -u phil:phil localhost:2586/bla/json
{"id":"ztEUUqpWHjKi","time":1769984173,"event":"open","topic":"bla"}
{"id":"CY9qlndnTzCi","time":1769984233,"event":"keepalive","topic":"bla"}
{"id":"wEVb0jx9Rprb","time":1769984293,"event":"keepalive","topic":"bla"}
{"id":"MuYwsgkujs8Y","time":1769984353,"event":"keepalive","topic":"bla"}
{"id":"vs8sFsy7qoSw","time":1769984413,"event":"keepalive","topic":"bla"}
<!-- gh-comment-id:3832159989 --> @binwiederhier commented on GitHub (Feb 1, 2026): I am not entirely sure what you are doing wrong, but it works for me. It's worth noting that you referenced the `server.yaml` (< wrong) file, but it has to be `server.yml` (no "a"). ``` $ curl -u phil:phil localhost:2586/bla/json {"id":"ztEUUqpWHjKi","time":1769984173,"event":"open","topic":"bla"} {"id":"CY9qlndnTzCi","time":1769984233,"event":"keepalive","topic":"bla"} {"id":"wEVb0jx9Rprb","time":1769984293,"event":"keepalive","topic":"bla"} {"id":"MuYwsgkujs8Y","time":1769984353,"event":"keepalive","topic":"bla"} {"id":"vs8sFsy7qoSw","time":1769984413,"event":"keepalive","topic":"bla"} ```
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#910
No description provided.