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.
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.
curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | shWorks 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.
VERSION=v0.1.10 curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | shINSTALL_DIR=/usr/local/bin sudo curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | shcurl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh -s -- --forcegit clone https://github.com/iqbqioza/nostrfy.git && cd nostrfy && cargo build --releaseUp 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
nostrfy init
# writes a default nostrfy.toml and exitsnostrfy start
# runs the relay as a daemonnostrfy stats
# live connections, events, database sizecurl 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.
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.
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.