NoFw: a Nostr Firewall
crisis_alert
The Problem
As Nostr becomes more popular, the number of bad actors trying to sabotage relay networks and/or publish malicious
content increases.
This discourages the community from hosting Nostr relays, due to concerns about potential legal, moral and
technical implications.
See:
experiment
The Solution: NoFw
NoFw is a self-hosted autonomous Nostr relay moderator software that helps relay
operators:
- keep thematic or technical relays on-topic
- filter spam and malicious content
- process NIP-56 reports automatically
Instead of relying on a large entity acting as a censorship authority, or on a team of human moderators (often beyond
the capabilities of small hobbyist relay operators):
NoFw is designed to run locally and
autonomously,
while being fully configurable
by
the operator: the
operator decide what to filter, how and why.
handyman
How it works
NoFw works by applying a series of analyses that produce a score for each event. This score is used to
decide how suitable an event is, and whether it should be relayed and/or stored.
Rules fall into three main categories:
- Static analysis
Uses fixed rules such as regex, keyword matching, and event-shape validation.
- Machine-learning-based content classification
Uses ML models to classify the content of an event.
- NIP-56 reports
In addition to content filtering, NoFw listens for NIP-56
reports from trusted pubkeys and can act on
them automatically.
NoFw is designed to be agnostic: it can be integrated with any Nostr relay implementation (or client)
through a simple HTTP-like API.
A reference plugin implementation is planned for strfry.
remove_selection
What NoFw is not
NoFw is not a censorship layer: it doesn't impose global rules or act as an authority over Nostr.
It's self-hosted, opt-in tooling that lets relay operators and clients enforce policies on their own digital sovereign space.
Policies are local, transparent, and configurable: no trusted third party, no central gatekeeper.