buzz icon indicating copy to clipboard operation
buzz copied to clipboard

The official self-host compose never starts the pairing sidecar, so mobile pairing 404s

Open meeveem opened this issue 2 months ago • 2 comments

Severity: high — affects every self-hoster.

deploy/compose/compose.yml defines only relay, postgres, redis, minio and minio-init. deploy/compose/Caddyfile routes everything to relay:3000. The relay advertises NIP-43 in its NIP-11, so Desktop derives the legacy pairing path <relay>/pair (desktop/src-tauri/src/commands/pairing.rs, resolve_pairing_relay_url) — but nothing serves it.

Reproduction:

curl -s -o /dev/null -w '%{http_code}\n' --http1.1 \
  -H 'Connection: Upgrade' -H 'Upgrade: websocket' \
  -H 'Sec-WebSocket-Version: 13' -H 'Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==' \
  https://<relay>/pair        # 404

Desktop shows WebSocket connection failed: HTTP error: 404 Not Found and the QR flow times out.

The binary is already in the image (/usr/local/bin/buzz-pair-relay), so the fix is a service plus a Caddy route. Two notes for whoever writes it:

  • The image sets ENTRYPOINT=["/usr/local/bin/buzz-relay"], so the service must override entrypoint, not command — otherwise the relay binary runs again and crash-loops on the missing relay private key.
  • The sidecar accepts any path (crates/buzz-pair-relay/src/lib.rs), so a plain /pair* reverse proxy works.

meeveem avatar Sep 18 '26 05:09 meeveem

Independently reproduced on a self-hosted (non-Helm) relay: / upgrades with 101, /pair returns 404, NIP-11 advertises NIP-43 and no pairing_relay_url, Desktop falls to LegacyPath. The diagnosis above is exact.

One client-side addition worth folding into the fix: Desktop surfaces the raw transport error (WebSocket connection failed: HTTP error: 404 Not Found) with a Try again button that can never succeed. When the probe resolves to LegacyPath and the upgrade answers 404, the Mobile page could say so directly — "this relay does not offer mobile pairing (no pairing relay advertised)" — which turns an apparent client bug into an actionable operator message.

loviswaternakamoto avatar Sep 18 '26 10:09 loviswaternakamoto

+1 also confirmed on a self-hosted instance (also non-Helm). Fixed by setting ENTRYPOINT as described above. Same as: #2734 #3842 #3875 #3779

dylbertram avatar Sep 22 '26 06:09 dylbertram