Rust · MIT licensed · latest release v0.1.10

The Nostr relay that never goes down.

nostrfy is an all-in-one Nostr relay server engine. Blazing fast by design. Lean by nature. Powerful by default. Install in one line, configure from a single TOML file, and run it on virtually any VPS.

36+ relay-side NIPs Linux · FreeBSD · containers One binary, no dependencies

Install in one line

The install script detects your OS and architecture, downloads the matching pre-built binary, verifies its sha256 checksum and puts it on your PATH. No clone, no build, no sudo.

sh
curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh

Works without sudo

Installs into ~/.local/bin, ~/bin or ~/.cargo/bin — the first one already on PATH.

Linux + FreeBSD

Pre-built binaries for x86_64 and aarch64 Linux, plus FreeBSD x86_64.

Checksum-verified

The release checksum is fetched and verified before the binary touches disk.

Specific version
sh
VERSION=v0.1.10 curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh
System-wide
sh
INSTALL_DIR=/usr/local/bin sudo curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh
Overwrite existing
sh
curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh -s -- --force
Build from source
sh
git clone https://github.com/iqbqioza/nostrfy.git && cd nostrfy && cargo build --release

Up and running in under a minute

nostrfy ships a daemon, a config validator, live statistics, log rotation and hot reloading — everything a relay operator needs, in one binary.

  • nostrfy init writes a default, fully-commented nostrfy.toml
  • nostrfy check validates the config before you start
  • SIGHUP reloads most settings without a restart
  • nostrfy upgrade updates the binary to the latest release
Open the quick start guide
sh
nostrfy init
# writes a default nostrfy.toml and exits
sh
nostrfy start
# runs the relay as a daemon
sh
nostrfy stats
# live connections, events, database size
sh
curl http://localhost:8080/health
# {"status":"ok"}

Point any Nostr client at ws://<host>:8080 — done.

Built for real-world relays

Every feature is designed around two goals: never go down, and be spec-complete. The result is a relay that survives abuse, stalled disks and memory-constrained hosts.

Spec-complete

All relay-side NIPs implemented and verified against the official specifications — 36+ NIPs plus the Blossom file server.

Never goes down

Overload protection, dedicated reader threads, panic containment and strict resource bounds keep the relay serving under sustained abuse.

Blossom media server

SHA-256-addressed uploads on their own hostname — local disk or S3-compatible buckets (AWS S3, Cloudflare R2), with owner-signed deletes.

REST API

A read-only /api/v1 for querying events by npub1, nevent1 or naddr1 — its own reader thread means REST traffic can never stall WebSocket subscribers.

LMDB persistence

Durable, crash-safe storage via heed. The memory map is a sparse reservation opened at its ceiling — no runtime resize, tiny physical footprint.

Everything configurable

Every setting lives in nostrfy.toml — no compile-time options. Edit, SIGHUP, done. Limits, NIP toggles, storage and more.

Works behind TLS proxies

nginx, Caddy, Cloudflare Tunnel — WebSocket upgrades and X-Forwarded-Proto are honored, so wss:// just works in front of any proxy.

Rust + FreeBSD

A single static Rust binary for Linux x86_64, Linux aarch64 and FreeBSD x86_64 — verified to run on a 0.25 vCPU / 512 MB VPS.

Measured performance

Release build, fresh database, 8-thread laptop. Publish speed is bounded by a single LMDB writer thread and batched, fsync-free commits; readers never block it.

~21k
events/sec ingest
single connection
100%
live fan-out
10,000 / 10,000 deliveries
0.32s
stored query
20,000 events
0.26s
NIP-50 search
10,000 results
7.9 MB
private RSS
with a 252 MB database

Reproduce with the bundled benchmarks — see the performance notes.

Spec-complete NIP support

Every relay-side NIP is implemented and verified. The advertised NIP-11 list is dynamic — dropped automatically when a NIP's kinds are blocked.

Full NIP reference
19111317222628293233344042434546475057596265666770777884858687889498A3Blossom

An ecosystem of great clients

nostrfy speaks the open NIP standards clients rely on — so the best Nostr apps plug in and get the full experience. Any NIP-compliant client works with your relay.

Building on Nostr? Point any client at your relay — see the full NIP reference.

Run your own relay in minutes

From a tiny VPS to a global fleet — the pre-built binary, the config validator and the deployment guides make it painless.