ntfy: document base-url requirement for iOS push - #7851
Open
jauderho wants to merge 1 commit into
Open
Conversation
The documented server.yml set upstream-base-url only. ntfy refuses to start in that state: "if upstream-base-url is set, base-url must also be set". base-url is also necessary because the upstream topic is derived from the topic URL, so a wrong value sends the poll request to a topic no device listens on. Add base-url, the environment variable form, and the default config path. Correct the claim that iOS messages are not delivered without an upstream server; delivery is delayed, not dropped. Verified against ntfy v2.27.0: the config starts the server and a publish and poll round trip returns the message. Signed-off-by: Jauder Ho <jauderho@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #5050. Supersedes #5334.
Problem
ntfy/README.mdtold users to put this inserver.yml:ntfy refuses to start with that config:
The check is at
cmd/serve.go(upstreamBaseURL != "" && baseURL == ""). So following the README produced a server that would not boot.base-urlmatters for a second reason: the upstream Firebase topic is the SHA256 of the topic URL, so an absent or wrongbase-urlsends thepoll_requestto a topic no device is subscribed to.Changes
ntfy/README.mdonly. No Dockerfile changes.base-urlalongsideupstream-base-url, with the constraints (no trailing slash, no path, must differ fromupstream-base-url).NTFY_BASE_URL/NTFY_UPSTREAM_BASE_URLenvironment variable form./etc/ntfy/server.yml.upstream-access-tokenfor the rate-limit case.Verification
Built locally from
ntfy/DockerfileatBUILD_VERSION=v2.27.0:upstream-base-urlalone)if upstream-base-url is set, base-url must also be setListening on :80[http], ntfy v2.27.0NTFY_BASE_URL+NTFY_UPSTREAM_BASE_URLNote on #5334
#5334 documents APNS credentials (
.p8auth key, Key ID, Team ID) inserver.yml, and adds commentedNTFY_IOS_KEY_ID/NTFY_IOS_TEAM_ID/NTFY_IOS_PRIVATE_KEY_FILEhints to the Dockerfile. Those options do not exist in ntfy; self-hosted servers never handle APNs credentials directly. It also links to a#ios-notifications-apnsanchor that is not on the page, and addsVOLUME /etc/ntfyto a config directory, which creates an anonymous volume on everydocker runthat omits a mount. Upstream's Dockerfile declares noVOLUME, and the bind mount works without it. Recommend closing #5334.