Skip to the content
Back to Nymchat

Knowledge base Under the hood

Relays

Relays are the only servers in Nostr, and they are dumb on purpose: they accept signed events and hand them to whoever asks. Nymchat talks to about twenty of them at once.

What a relay is

A relay is a WebSocket server that stores events and serves subscriptions. It does not authenticate you, does not own your identity and does not know what your account is, because there is no account. Anyone can run one.

That is why redundancy matters. Your client connects to many relays at once and sends each event to all of them, so one going offline, refusing your event or quietly dropping it costs you nothing. It is also why nothing is guaranteed to persist: a relay may drop old events whenever it likes, and channel messages are explicitly ephemeral event kinds that relays are expected to expire.

Nymchat connects to a core set of roughly twenty relays — including relay.nymchat.app, relay.damus.io, nos.lol, relay.primal.net and offchain.pub — plus geographically located relays chosen for the geohash channels you are actually in.

Managing your relays

The connection indicator under your nym ("Connected (18 relays)") opens Network Stats: how many relays are connected, average latency, event throughput, and data in and out, with per-relay latency and event counts.

The Nymchat network stats panel, listing connected relays with their latency and event counts.
Network stats, with each relay's latency and event count.

If the numbers there look expensive, Low Data Mode — offered right in that panel, and under Settings › Data & Backup — cuts the pool to five core relays and loads geo relays only as you enter a channel. Group Chats & PMs Only Mode, under Settings › Channels, goes further by skipping channel subscriptions altogether.

The privacy proxy

Connecting to twenty relays directly means telling twenty relay operators your IP address. Nymchat's hosted deployment avoids that: relay WebSockets are proxied through its own infrastructure, so relays see the proxy's address rather than yours.

Two forms of it:

  • a single-relay proxy that forwards one connection to one relay;
  • a relay pool, where your client opens one socket and the proxy fans out to every relay behind it, deduplicating events on the way back. One connection from your device instead of twenty, which is a large saving on a phone.

The proxy is a passthrough. Events are signed by you before they reach it and end-to-end encrypted content stays encrypted through it — it cannot read your private messages any more than a relay can.

The same infrastructure fronts media loading and link previews, so fetching an image someone posted does not hand your IP address to whatever host it lives on.

What this does and does not buy you

The proxy moves the trust rather than removing it: relays no longer see your address, and the proxy operator does. It is a real improvement over talking to twenty strangers directly, and it is not anonymity. If you need that, run Nymchat over Tor or a VPN as well, or serve the app yourself and connect to relays directly.