Comparison
nostrfy vs strfry
Both are single-binary Nostr relays that store events in LMDB and speak the same protocol. They make different trade-offs: strfry is the mature C++ relay with a write-policy plugin system, while nostrfy is a Rust engine that ships the operator features — groups, media, REST, management — in one binary and one config file.
At a glance
| nostrfy | strfry | |
|---|---|---|
| Language | Rust | C++ |
| License | MIT OR Apache-2.0 | GPL-3.0 |
| Storage | LMDB (no external database) | LMDB (no external database) |
| Configuration | One nostrfy.toml, hot reload (SIGHUP) | strfry.conf, hot reload |
| Advertised NIPs | 34 (36 implemented, incl. opt-in) | 11 core NIPs |
| NIP-29 groups + LiveKit | Built in | — |
| Blossom media server | Built in (local disk or S3/R2) | — |
| REST API | Built in at /api/v1 | — |
| Management API | NIP-86 JSON-RPC, delegated admins | — |
| Negentropy (NIP-77) | Yes | Yes — strfry originated it |
| Write policies / plugins | Built-in allow/deny lists + NIP-86 | Write-policy plugin interface |
| Migration tooling | nostrfy migrate-strfry | strfry import / export / sync |
Licensing
strfry is licensed under GPL-3.0, which requires derivative works to be released under the same terms. nostrfy is dual-licensed under MIT or Apache-2.0, so it can be embedded in closed-source products and relicensed freely. If your relay is part of a commercial or otherwise licensed stack, this is often the deciding difference.
Configuration and operations
- nostrfy is configured by a single, fully-commented
nostrfy.toml: identity, limits, storage, access control, Blossom and RPC in one place. Most settings hot-reload on SIGHUP. - Every option is validated by
nostrfy checkbefore the relay starts — wrong types, impossible limits and lockout combinations are reported with fixes. - The daemon ships with log rotation, live statistics, a health endpoint and Prometheus metrics; the CLI manages access lists, upgrades and migrations.
Built-in features
Instead of bolting on sidecars, nostrfy includes the services a public relay usually needs:
NIP-29 groups + LiveKit
Relay-enforced groups, moderation events and relay-signed group metadata, plus audio/video rooms via LiveKit.
Blossom media server
Content-addressed uploads on their own hostname, backed by local disk or an S3-compatible bucket (AWS S3, Cloudflare R2).
REST API
A read-only /api/v1 on its own reader thread — query events by npub, nevent or naddr, with counts, stats and search.
NIP-86 management
A JSON-RPC management API with Bearer or NIP-98 auth, delegated method grants and invite codes.
Where strfry shines
strfry remains an excellent choice: it originated the negentropy protocol, supports zero-downtime restarts and optional websocket compression, and its write-policy plugin interface lets you run arbitrary logic on every publish. If you need a plugin sandbox and nothing else on this list, strfry is a great fit. If you would rather have groups, media, REST and management in the box — or need a permissive license — nostrfy is the shorter path.
Migrating from strfry
You do not have to start over. nostrfy migrate-strfry reads strfry's own export format, verifies every event, and imports the whole database —
including NIP-09 deletions, NIP-29 moderation side effects and first-seen timestamps. It is
offline, dry-runnable and safe to repeat.