Docs
rly9 is a nostr relay at wss://rly8.com that reads from the most-used online relays and keeps only the events whose author has a real profile. Subscribers read the whole clean stream and publish to it.
Connecting
- Pay for your npub on the home page (21,000 sats for a year).
- Add
wss://rly8.comto your client's relays. - Allow the client to authenticate to rly9 when it asks. Most clients (Amethyst, Coracle, noStrudel, Damus, Nostur) support NIP-42; some need it switched on per relay.
On connect rly9 sends an AUTH challenge. Until the connection has authenticated as a subscribed pubkey, every REQ and COUNT is answered with:
["CLOSED", "<sub id>", "auth-required: rly9 is for subscribers, …"]
Clients that support NIP-42 then sign the challenge and send the REQ again. A connection that authenticates as a key without a subscription gets restricted: instead.
The spam check
Every event the fetcher collects is checked against profilestr, which indexes nostr profiles across the network. If profilestr has no profile for the author, the event is dropped: throwaway keys made by spam bots don't have one.
- Lookups are batched, 100 keys per request, and cached: a found profile for 7 days, a missing one for an hour, so new people get in as soon as they're indexed.
- Gift wraps (kind 1059) are signed by random keys by design, so they are checked against the recipient instead. Zap receipts (kind 9735) are checked against the person zapped.
- Subscribers always pass, whether or not profilestr has indexed them yet.
- If profilestr can't be reached, events are refused rather than let through, and nothing is cached.
- Ephemeral events (20000–29999) and protected events (NIP-70) from other relays are never copied.
- Gift-wrapped DMs (kind 1059) can only be read by their recipient, so rly9 keeps them only when they're addressed to a subscriber. Anyone can deliver a DM to a subscriber here, so you can list rly9 as one of your DM relays (kind 10050).
The relays come from profilestr's live list (onlineRelays, most-used first), refreshed every 15 minutes. Relays that need payment or auth to read are left alone for a day.
Publishing
Events signed by a subscribed key are stored and sent live to every subscriber. You don't need to authenticate to publish your own events; the signature is enough.
- A connection authenticated as a subscriber may also publish events signed by other keys (reposting someone else's note to rly9, for example), as long as their author passes the spam check.
- Ephemeral events (NIP-46 remote signing, NWC) are relayed live and never stored, for subscribed authors and for connections authenticated as a subscriber.
- Replaceable and addressable events keep their newest version. Deletions (NIP-09) remove your earlier events and stop deleted ones from being stored again.
| Answer | Means |
|---|---|
restricted: | The author has no active subscription. |
blocked: | Republished event whose author has no profile, or one its author deleted. |
rate-limited: | More than 60 events in a minute from one key. |
auth-required: | A protected (NIP-70) event; authenticate as its author first. |
duplicate: | Already stored, or a newer version of a replaceable event is. Counts as accepted. |
Supported NIPs
| NIP-01 | Events, filters, subscriptions |
| NIP-09 | Event deletion |
| NIP-11 | Relay information document |
| NIP-40 | Expiration |
| NIP-42 | Authentication (how subscribers read) |
| NIP-45 | COUNT |
| NIP-70 | Protected events |
Search (NIP-50) isn't supported: filters with search return nothing.
Limits and retention
| Events per filter | 500 at most, 100 without a limit |
| Filters per REQ | 10 |
| Open subscriptions per connection | 32 |
| Event size | 512 KB |
| Publishing | 60 events per minute per key |
| Retention | Regular events from the network are kept 30 days. Profiles, follow lists, relay lists and other replaceable events, and everything subscribers sign, are kept. |
| Storage cap | The database is capped at 100 GB. When it fills up, the oldest regular events from the network go first; profiles, lists and subscribers' events are kept. |
HTTP API
GET /api/subscription/:pubkey
npub or hex. Open CORS.
curl https://rly8.com/api/subscription/npub1…
{"pubkey":"…","active":true,"expiresAt":1767225600,"eventsSent":42,"lastEventAt":1735689600}POST /api/invoice
A one-year lightning invoice for a pubkey. Poll the next endpoint until it's paid.
curl -X POST https://rly8.com/api/invoice -H 'Content-Type: application/json' -d '{"pubkey":"npub1…"}'
{"paymentHash":"…","bolt11":"lnbc…","amountSats":21000,"expiresAt":…,"paid":false}GET /api/invoice/:paymentHash
Whether the invoice is paid, checked with the wallet. Paying credits the year even if nobody polls.
GET /api/stats
Events stored, authors with profiles, relays connected, and the fetcher's counters since it started.
NIP-11
curl -H 'Accept: application/nostr+json' https://rly8.com