Introduction
What nostrfy is, what it does out of the box, and the ideas that shape how it is built and run.
nostrfy is a relay server for the Nostr protocol. It stores events (posts, reactions, profiles, …) sent by clients and delivers them in response to subscription requests.
Key features
- Simple and stable — written in Rust; a single binary does everything.
- Fast storage and search — LMDB database with a full-text search index (NIP-50).
- Broad NIP support — 36 NIPs implemented, plus the Blossom file server: deletion, proof-of-work, delegation, groups, search and a management API.
- Easy to operate — daemon mode, log rotation, hot configuration reload (SIGHUP), live statistics, a REST API and Prometheus metrics.
What you get out of the box
A single nostrfy binary on one port serves:
- The WebSocket relay and the NIP-11 information document.
- A read-only REST API at
/api/v1/...— its own reader thread means REST traffic can never stall WebSocket subscribers. - The Blossom file server (media hosting) on its own hostname.
- The NIP-86 management RPC, health check and Prometheus
/metrics.
Resource profile
nostrfy is verified to run on a 0.25 vCPU / 512 MB VPS. The LMDB memory map is a sparse 1 TiB virtual reservation — physical disk grows only with real data — and process memory stays flat: a relay with a 252 MB database held 7.9 MB of private RSS.
A quick feel for it
Install, initialize and start in three commands:
sh
curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh
nostrfy --config nostrfy.toml init
nostrfy --config nostrfy.toml startThen verify the relay is up:
sh
curl http://127.0.0.1:8080/healthAnd fetch its NIP-11 document:
sh
curl -H "Accept: application/nostr+json" http://127.0.0.1:8080/