Your own relay is coming. Reserve yours, no payment

nostr-rs-relay, the Nostr relay

222 public Nostr relays run nostr-rs-relay, 16% of those that say what they run. A small, steady relay in Rust with a SQLite file. Official Docker image, whitelists and pay-to-relay built in.

By · Last updated

Public relays that run nostr-rs-relay

The 30 with the best 30-day uptime, of 222. Each links to its page on the relay monitor.

RelayStatusVersionUptime, 30 days
backup.keychat.ioUp0.9.0100.0%
bbw-nostr.xyzUp0.10.0100.0%
bridge.tagomago.meUp0.9.0100.0%
bruh.samt.stUp0.9.0100.0%
btc.klendazu.comUp0.10.0100.0%
ciao.rinbal.deSlow0.8.1100.0%
data.relay.vanderwarker.familyUp0.10.0100.0%
dm-test-nostr-rs-42-disabled.samt.stUp0.9.0100.0%
dm-test-nostr-rs-42-enabled.samt.stUp0.9.0100.0%
free.relayted.deSlow0.9.0100.0%
just.my2sats.xyzUp0.10.0100.0%
nip17.unsaltedbutter.aiUp0.10.0100.0%
nostr-dev.wellorder.netUp0.9.0100.0%
nostr-pub.wellorder.netUp0.9.0100.0%
nostr-relay.bitcoin.ninjaUp0.10.0100.0%
nostr-relay.cbrx.ioUp0.8.13100.0%
nostr-relay.corb.netUp0.9.0100.0%
nostr-relay.irgenius.orgUp0.10.0100.0%
nostr-relay.xbytez.ioUp0.10.0100.0%
nostr-relay.zimage.comUp0.9.0100.0%
nostr-rs-relay-qj1h.onrender.comUp0.9.0100.0%
nostr-rs-relay.dev.fedibtc.comUp0.10.0100.0%
nostr-verif.slothy.winUp0.10.0100.0%
nostr-verified.wellorder.netUp0.9.0100.0%
nostr.1312.mediaUp0.9.0100.0%
nostr.1f52b.xyzUp0.8.9100.0%
nostr.256k1.devUp0.8.8100.0%
nostr.2h2o.ioUp0.10.0100.0%
nostr.438b.netUp0.10.0100.0%
nostr.8777.chUp0.9.0100.0%
Which versions they run

From each relay's NIP-11 version. "0.10.0+" is a build from after that release; "other" names no release.

  • 0.10.0121
  • 0.9.076
  • 0.8.139
  • 0.8.17
  • 0.8.83
  • 0.8.122
  • 0.7.151
  • 0.8.21

What it's good for

Pick nostr-rs-relay for a small or personal relay on a cheap server, run with Docker.

  • Whitelist. pubkey_whitelist in config.toml limits who may publish: the simplest private relay. (source)
  • Pay to relay. An admission fee in sats, paid over Lightning, before a key may post. Off by default. (source)
  • External admission over gRPC. Each event can be checked by a service of your own before it's stored. (source)
  • NIP-05 checks and rate limits. It can require posters to have a verified NIP-05 address, and limit how fast anyone may write. (source)

Running nostr-rs-relay yourself

nostr-rs-relay is one of the simpler relays to keep: an official Docker image, one SQLite file, one config file. What stays with you is the rest of the server: pulling new images, keeping the OS and the reverse proxy updated, renewing TLS (Caddy does it for you), watching uptime, and copying the SQLite file off the server, stopped or with SQLite's backup command. If anyone but you can post, you also need limits: a whitelist, NIP-05 checks, rate limits or an admission fee.

If what you want is a relay for your own notes, you don't have to run one: we're opening hosted relays, each one yours and private by default, kept online, updated and backed up nightly. They aren't open yet; reserving is free and commits you to nothing.

How to install it

1. Run the Docker image

The image scsibug/nostr-rs-relay is on Docker Hub. Put config.toml next to an empty data folder; the relay listens on 8080 inside the container. From the repo.

mkdir data
curl -o config.toml https://raw.githubusercontent.com/scsibug/nostr-rs-relay/master/config.toml
docker run -d --name nostr-relay -p 127.0.0.1:7000:8080 \
  --mount src=$(pwd)/config.toml,target=/usr/src/app/config.toml,type=bind \
  --mount src=$(pwd)/data,target=/usr/src/app/db,type=bind \
  scsibug/nostr-rs-relay

2. Or build it

With Rust and Cargo installed (on Debian or Ubuntu also build-essential cmake protobuf-compiler pkg-config libssl-dev): From the repo.

git clone -q https://git.sr.ht/~gheartsfield/nostr-rs-relay
cd nostr-rs-relay
cargo build -q -r
RUST_LOG=warn,nostr_rs_relay=info ./target/release/nostr-rs-relay

TLS and the reverse proxy

The repo's reverse-proxy guide has nginx, HAProxy and Traefik examples. The nginx one passes the WebSocket upgrade (proxy_http_version 1.1, the Upgrade and Connection headers) and sets day-long read and send timeouts.

The full walk-through, with a reverse proxy, DNS and a check at the end, is in the guide to running a Nostr relay.

What it says in NIP-11

nostr-rs-relay puts https://git.sr.ht/~gheartsfield/nostr-rs-relay in the software field; that is how our monitor recognises it. Its version is the Cargo package version (0.10.0 for the latest tag). Its README lists support for NIPs 1, 2, 5, 9, 11, 12, 15, 16, 20, 22, 28, 33, 40, 42.

Alternatives

  • strfry: Fast, single binary, built for big public relays. Write-policy plugins and negentropy sync.
  • HAVEN: A personal relay: four relays in one (private, chat, inbox, outbox), media hosting, imports and backups.
  • pyramid: A community relay where members invite members, set up from a web page after a one-line install.
  • Every relay program, compared

A relay of your own, without running it

We keep it online, updated and backed up every night. Hosted relays aren't open yet: reserving one is free and commits you to nothing.

Sources

  1. nostr-rs-relay on sourcehutsr.ht
  2. GitHub mirror, scsibug/nostr-rs-relaygithub.com
  3. config.toml, every option explainedgithub.com
  4. Reverse proxy guidegithub.com
  5. scsibug/nostr-rs-relay on Docker Hubhub.docker.com
  6. anchorman relay monitoranchorman.lol · the counts on this page