Frequently asked questions

Short answers about running nostrfy. Everything below links into the documentation — and if you prefer, you can compare it with strfry.

What is nostrfy?

nostrfy is an all-in-one Nostr relay server engine written in Rust. It stores events from Nostr clients and serves them in response to subscriptions, implementing every relay-side NIP plus an optional Blossom media server, a read-only REST API and a NIP-86 management API — all in one binary.

Is nostrfy free and open source?

Yes. nostrfy is free software, dual-licensed under MIT or Apache-2.0, at your option. The source code is on GitHub and there are no paid tiers, telemetry or lock-in.

What do I need to run nostrfy?

A single static binary runs on Linux (x86_64 and aarch64) and FreeBSD (x86_64). It has been verified on a 0.25 vCPU / 512 MB VPS. Storage is a local LMDB database — no external database server is required.

How do I install nostrfy?

One line: curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh. The script detects your OS and architecture, downloads the matching pre-built binary, verifies its checksum and puts it on your PATH. You can also build from source with Cargo or copy a ready-made config template.

How is nostrfy configured?

Everything lives in one fully-commented nostrfy.toml file — relay identity, limits, storage, access control, Blossom and RPC. nostrfy check validates it before the relay starts, and most settings reload at runtime on SIGHUP without a restart.

Which NIPs does nostrfy support?

nostrfy implements 36 NIPs, including NIP-01, NIP-09 deletion, NIP-29 groups, NIP-42 auth, NIP-50 search, NIP-57 zaps, NIP-59 gift wrap, NIP-65 relay lists, NIP-77 negentropy, NIP-86 management and NIP-98 HTTP auth. The NIP-11 supported_nips list is dynamic: a NIP disappears when the kinds it needs are blocked or disabled.

Does nostrfy host media files?

Yes. The built-in Blossom file server hosts content-addressed uploads on its own hostname, either on local disk or in an S3-compatible bucket such as AWS S3 or Cloudflare R2. Uploads are authorized with signed kind-24242 events and can be restricted to an allowlist.

Can I migrate from strfry?

Yes. nostrfy migrate-strfry imports a strfry database or JSONL export directly, applying replaceable/addressable semantics, NIP-09 deletions and NIP-29 moderation side effects, and optionally merging equivalent strfry settings into nostrfy.toml. The migration is offline, dry-runnable and safe to re-run.

Can nostrfy run behind a reverse proxy or Cloudflare?

Yes. Configure server.trusted_proxies with your proxy addresses (loopback for nginx or Caddy on the same host, the balancer range in the cloud) so per-IP limits, blockip and the logs see the real client address. TLS is terminated by your proxy or tunnel; nostrfy serves plain HTTP and WebSocket behind it.

Does nostrfy have a REST API?

Yes — a read-only /api/v1 served on the same port as the WebSocket relay, running on its own reader thread so REST traffic can never stall subscribers. It can query events by npub, nevent or naddr and provides counts, author statistics, per-day/monthly breakdowns and full-text search.

How does nostrfy stay up under load or abuse?

Overload protection, dedicated reader threads, panic containment and strict resource bounds. Bounded queues fail fast instead of exhausting memory, per-IP connection caps stop socket floods, and a stalled disk cannot block reads. The relay keeps serving while subsystems are isolated.

How do I manage users, bans and roles?

Through the NIP-86 JSON-RPC management API with a Bearer token or NIP-98 admin key: ban pubkeys, block IPs, manage kind allowlists, roles and invite codes. Method grants let you delegate moderation to other pubkeys without giving them full admin access.