fix(ntfy): publish ntfy host port so the external reverse proxy can reach it #95
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/ntfy-published-port"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
ntfyservice indocker-compose.ymlwas configured with no published host port, on the assumption that the public reverse proxy (Pangolin) sits on the compose network and can dialntfy:80directly.That assumption is false for this deployment. Pangolin runs outside the compose network and reaches every service through a published host port — which is exactly why the
appservice publishes3000:3000and binds0.0.0.0. With ntfy publishing nothing, the notification subdomain has nothing to forward to, so push delivery could never work in production.Fix
:80on a host port:${NTFY_HOST_PORT:-2586}:80, binding0.0.0.0likeapp. The reverse proxy now mapsnotify.<host>→host:NTFY_HOST_PORT→ntfy:80.docker-compose.ymlandntfy/server.yml. In the current code the backend fans tickles out by POSTing to each device's registered public endpoint (utils/pushDispatch.js), gated byNTFY_ALLOWED_ORIGINS— there is no separate internal publish path, so both the app (SSE subscribe) and the backend reach ntfy on the same public origin.NTFY_HOST_PORTin.env.example.Contrast with
INTERNAL_PORT/ the bot, which are deliberately unpublished because they must never be public. ntfy is device-facing, so it is supposed to be reachable through the proxy — the removed comment conflated the two.Deploy-config only — no code change. Validated
docker compose configrendersntfypublishing2586.Docs updated in a companion PR:
RunicGateway/docs#37(android/PLAN.md§11/§13 andwebsite/BACKEND_DESIGN.md).🤖 Generated with Claude Code