Buzz Desktop: imported nsec never becomes the active identity when connecting to a self-hosted relay
Describe the bug Importing an existing nsec into Buzz Desktop when connecting to a self-hosted relay never actually becomes the app's active signing identity — it silently keeps using its own locally auto-generated device key instead, causing membership-gated actions to fail even though the intended (imported) key is already registered as a relay member/owner.
Steps to reproduce
- Deploy a self-hosted relay via the official deploy/compose/ bundle; register an owner pubkey via buzz-admin add-member --role owner
. - Launch Buzz Desktop, connect to the relay (via "I already have a community" → relay URL, or by launching with BUZZ_RELAY_URL set as an env var).
- When prompted for identity, choose "use an existing key" and paste a valid nsec matching the pre-registered owner.
- Complete onboarding — no error shown.
- Check the app's own profile/identity screen — it shows a different npub than the one just imported.
- Try an action requiring membership (e.g. upload an avatar) — fails with 403 relay_membership_required. The resulting "Not a member yet" screen shows that same different, device-generated npub.
Expected behavior Choosing "use an existing key" and pasting a valid nsec should make that key the app's active signing identity going forward, matching the pubkey registered on the relay.
Version and platform
- Buzz version: 0.4.26
- OS: macOS 26.5.2 (Apple Silicon / arm64)
Logs / additional context
- Relay-side confirmed correct via buzz-admin list-members — the intended owner pubkey is registered properly, so this isn't a server misconfiguration.
- Reproduced across two different onboarding entry points (community picker's "I already have a community", and launching with BUZZ_RELAY_URL set to skip the picker) — same result both times.
- The npub actually used by the device (shown on the "Not a member yet" screen and in the app's own profile) differs from the imported key's npub every time.
Update — found something more precise.
On the Settings → Profile screen, "Identity" section shows:
- Public key: 628dc4ff377a848f4fb6d213b112dc5617c7bf37f35a357d3d5f10f1a3aff363
- Private key: the exact nsec I originally imported via "use an existing key"
The problem: these two do not form a valid keypair. I independently derived the public key that actually corresponds to that displayed private key, and it's a completely different value (bce3947a7acb2bbe07b8b745e8a43ff84bceb9c5e0ca4ec9f77b9f7cfb82c45c) — not the one shown above it. I also confirmed via the relay's own request logs that the pubkey actually signing outgoing requests is 628dc4ff..., matching the displayed "Public key" field, not the imported private key.
So it looks like the imported nsec does get stored somewhere in local app state (enough to be displayed back on this screen), but the app never derives/regenerates the active keypair from it — the original auto-generated device keypair stays active for actual signing, while the Identity screen shows the stored imported private key next to the original public key, with no validation that they match. That mismatch is presumably the actual root cause of the "imported key never becomes active" behavior reported above.
Environment: same as original report (Buzz Desktop 0.4.26, macOS 26.5.2 arm64).
It looks like you have a hex key. About 4 years ago, that's all we had. This key converts to: npub1v2xufleh02zg7nak6gfmzyku2ctu00eh7ddr2lfatug0rga07d3sfludvn
Is that the key you expected?
I got it from nostrcheck.me.