Your own relay is coming. Reserve yours, no payment

strfry, the Nostr relay

395 public Nostr relays run strfry, 28% of those that say what they run. Fast, single binary, built for big public relays. Write-policy plugins and negentropy sync.

By · Last updated

Public relays that run strfry

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

RelayStatusVersionUptime, 30 days
140.f7z.ioUp1.0.4100.0%
21milionidinostr.duckdns.orgUp1.1.0-96-g7984f80100.0%
airchat.nostr1.comUpstrfry v315-3cff8c9100.0%
aplaceinthesun.nostr1.comUpstrfry v315-3cff8c9100.0%
aquaticchickentheory.nostr1.comUpstrfry v315-3cff8c9100.0%
archive.unrug.techSlow1.1.3100.0%
articles.layer3.newsUp1.1.3100.0%
asia.azzamo.netUp1.0.3-1-g60d35a6100.0%
auth.nostr1.comUpstrfry v315-3cff8c9100.0%
bitchat.nostr1.comUpstrfry v315-3cff8c9100.0%
bitcoiner.socialUp1.1.0100.0%
bitcoinmajlis.nostr1.comUpstrfry v315-3cff8c9100.0%
budabit.nostr1.comUpstrfry v315-3cff8c9100.0%
chadf.nostr1.comUpstrfry v315-3cff8c9100.0%
chat-relay.zap-work.comUp1.0.4100.0%
chat.boom.moneyUp1.1.0-4-ge53d8de100.0%
chat.tldr-btc.comUp1.1.3100.0%
chillstr.nostr1.comUpstrfry v315-3cff8c9100.0%
christpill.nostr1.comUpstrfry v315-3cff8c9100.0%
cloud.feeds.relay.toolsUp1.1.2-148-g4cd3cf6100.0%
crays.relays.nuts.cashUpv1-5d3ba7b100.0%
cs-relay.nostrdev.comUp1.0.4100.0%
cyberspace.nostr1.comUpstrfry v315-3cff8c9100.0%
czas.topUp1.0.4100.0%
data-space.world/relaySlow1.1.0100.0%
david.nostr1.comUpstrfry v315-3cff8c9100.0%
dcosl.brainstorm.worldUp1.0.4100.0%
dev-relay.nostr.spaceUp1.1.0100.0%
directory.yabu.meUp1.0.4100.0%
dkkc.nostr1.comUpstrfry v315-3cff8c9100.0%
Which versions they run

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

  • 1.0.468
  • 1.1.366
  • 1.1.0+48
  • 1.1.2+47
  • 1.1.030
  • 1.1.1+15
  • 1.1.113
  • 1.0.4+9

What it's good for

Pick strfry for a busy public relay, or a relay that syncs with others.

  • Write-policy plugins. A plugin is any program that reads events as JSON lines on stdin and answers accept, reject or shadowReject. That's how most strfry relays filter spam or keep a whitelist. (source)
  • Negentropy sync. strfry sync wss://other.relay compares two relays' events efficiently and copies only what's missing, in one or both directions (NIP-77). (source)
  • Durable writes. It only answers OK once an event is committed to the database, and restarts without dropping connections (SIGUSR1 with REUSE_PORT). (source)
  • Metrics and export. Prometheus metrics at /metrics, and import or export of the whole database as JSON lines. (source)

Running strfry yourself

strfry is built for relays that many people post to, and those are the most work to run. You build it from source and rebuild for each release, and you keep a reverse proxy, TLS and the server itself updated. A public relay also needs a spam policy from day one: strfry leaves that to write-policy plugins you write or adopt. LMDB is fast but grows with every event, so watch the disk, and copy the database somewhere else regularly (strfry export), because a dead disk takes every note with it.

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. For a big public relay, strfry on your own server is still the usual choice.

How to install it

1. Build it (Debian or Ubuntu)

strfry needs a C++20 compiler. Its README gives these steps; FreeBSD and macOS variants are there too. From the repo.

sudo apt install -y git g++ make libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev libzstd-dev
git clone https://github.com/hoytech/strfry && cd strfry/
git submodule update --init
make setup-golpe
make -j4

2. Run it

It reads ./strfry.conf and stores data in ./strfry-db/. By default it listens on port 7777 on localhost only, which is what you want behind a reverse proxy. From the repo.

./strfry relay

3. Or with Docker

The repo ships a Dockerfile and a sample compose file that builds it, but there's no official prebuilt image: build it yourself. In the strfry.conf you mount, set bind = "0.0.0.0", or the relay only listens inside the container. From the repo.

git clone https://github.com/hoytech/strfry && cd strfry/
docker build -t strfry .
docker run -d -p 127.0.0.1:7777:7777 \
  -v $(pwd)/strfry.conf:/etc/strfry.conf \
  -v $(pwd)/strfry-db:/app/strfry-db strfry

TLS and the reverse proxy

strfry's deployment guide uses nginx with certbot for TLS. In strfry.conf, set bind to 127.0.0.1, realIpHeader to the header your proxy sets (x-real-ip or x-forwarded-for), and keep autoPingSeconds below your proxy's idle timeout.

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

strfry puts git+https://github.com/hoytech/strfry.git in the software field; that is how our monitor recognises it. Its version is the git version it was built from (git describe), so dev builds read like 1.1.2-148-g4cd3cf6. Its README lists support for NIPs 1, 2, 4, 9, 11, 28, 40, 42, 45, 70, 77.

Alternatives

  • nostr-rs-relay: A small, steady relay in Rust with a SQLite file. Official Docker image, whitelists and pay-to-relay built in.
  • 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. hoytech/strfry on GitHubgithub.com
  2. strfry deployment guide (nginx, certbot, systemd)github.com
  3. strfry.conf, the default configurationgithub.com
  4. strfry's NIP-11 response in RelayWebsocket.cppgithub.com
  5. anchorman relay monitoranchorman.lol · the counts on this page