Relay Manager Docs

Overview

Relay Manager — visual orchestration for Nostr relay operators. No terminal required.

BitMacro Relay Manager

Running a Nostr relay in production today usually means bash scripts, raw CLI, and almost no operational visibility.

# This is what managing a relay looks like today
strfry scan --filter '{"authors":["abc123..."]}' | jq .
nak req -k 0 wss://relay.example.com | grep spam
vim /etc/strfry/whitelist.txt && systemctl reload strfry

Relay Manager eliminates this. A visual panel, a central API, a stateless agent on your box, and documented flows for NIP-07 (browser extension) and NIP-46 (remote signer) where users need to sign without pasting keys into the web app.

The public product story and CTAs live on bitmacro.io/relay-manager. These pages are the technical companion: architecture, modules, protocol notes, and a consolidated API reference.


The problem space

Operators typically juggle:

  • Whitelists edited by hand on the server
  • Spam and moderation via CLI-only tools
  • No single place for disk usage, uptime, or kind breakdown
  • Paid relay flows reinvented per deployment

There is no maintained, relay-agnostic visual tool in the vein of abandoned strfry-web-ui. Relay Manager targets strfry first (broad deploy base) with a clean agent API so other backends can follow later.


Ecosystem

Five public-moving parts plus one private hub:

ComponentInternal NameLicenseHosting
Admin panelrelay-panelBSL 1.1Vercel
Central hub + proxyrelay-api (Web Server)PrivateVercel
Local relay interfacerelay-agent (Relay Server Agent)MITOperator's server
Connect UIrelay-connect-webMITVercel / self-hosted
Client SDK@bitmacro/relay-connectMITnpm

Roadmap: @bitmacro/connect will centralise /signer and NIP-46 helpers for panel, connect, and third-party apps; until then @bitmacro/relay-connect is the npm surface (see relay-connect).


Authentication: three layers you should not confuse

LayerMechanismUsed for
Operator / adminNextAuth + GitHub on relay-panelWho owns rows in relay_configs; X-Provider-User-Id
End-user, same browserNIP-07 (window.nostr)Extension signing + optional kind 0 profile in connect UI
End-user, remote phoneNIP-46 + /signer/* + bridge relayQR / Amber / remote signer; rows in nip46_sessions

Panel login is not NIP-07. Connect flows are where NIP-07 and NIP-46 ship today — see NIP-07 and NIP-46.


Core Principle

The panel never speaks directly to the agent or to Supabase.
All orchestration goes through the Web Server (relay-api).

Browser


relay-panel (Next.js)          ← UI only; zero direct DB/agent access
  │  X-API-Key + X-Provider-User-Id

relay-api [Web Server]         ← Supabase CRUD + agent proxy + /signer NIP-46
  │  Bearer token per relay

relay-agent [Relay Server Agent]   ← strfry CLI abstraction; stateless


strfry / nostr-rs-relay        ← the actual relay process

What v0.2.0 Solves

BeforeAfter
Edit whitelist in bashToggle allow/block in UI
strfry delete --id <event>Click delete in Events table
Zero disk/event visibilityDashboard: DB size, uptime, event count
1 agent per relay = N containers1 agent × N relays via RELAY_INSTANCES
Manual paid relay setupLightning invoice → auto-access (v1.0)

Current Production State

BitMacro operates three relays on a single Relay Server Agent (port 7810):

RelayURLagent_relay_idAccess
Publicrelay.bitmacro.cloudpublicOpen write + moderation
Privaterelay.bitmacro.ioprivateWhitelist via UI
Paidrelay.bitmacro.propaidLightning (v1.0)

Health monitoring: Uptime Kuma on https://relay-agent.bitmacro.io/health — HTTP keyword "status":"ok".


Licenses and open source strategy

RepoLicenseRationale
relay-agentMITMaximum adoption; operators self-host with zero friction
relay-connect + relay-connect-webMITReference stack for signing flows
relay-panelBSL 1.1Source-visible; commercial competing SaaS restricted without a licence
relay-apiPrivateSupabase schema, keys, product logic

BSL code can still be self-hosted; the hosted panel on BitMacro optimises for convenience.


Roadmap (condensed)

Done (v0.2.x)

  • Multi-relay Relay Server Agent — one process, RELAY_INSTANCES, /:relayId/… API
  • relay-api CRUD + proxy and /signer + nip46_sessions
  • relay-panel 0.2 — create relay with agent_relay_id, full dashboard
  • relay-connect-web — server-side proxy, NIP-46 QR flow, NIP-07 extension path

Next

  • v1.0 — Lightning — invoice, webhook, auto-access after payment (LNbits / LND family)
  • @bitmacro/connect npm package — shared /signer client
  • Optional: nostr-rs-relay backend, metrics, richer alerts

TopicPage
Topology + SupabaseArchitecture
strfry RESTRelay Server Agent
Panel + GitHubrelay-panel
Connect + env varsrelay-connect
Extension signingNIP-07
Remote signingNIP-46
All HTTP routesAPI reference