A lightweight, high-performance Nostr relay implementation for Ruby 3.0+.
This relay supports the following Nostr Implementation Possibilities (NIPs):
- NIP-01: Basic protocol flow
- NIP-02: Contact List and Petnames
- NIP-04: Encrypted Direct Messages (relay side)
- NIP-09: Event deletion (kind 5)
- NIP-11: Relay Information Document
- NIP-12: Generic tag queries (#e, #p, etc)
- NIP-15: Marketplace
- NIP-16: Event Treatment (ephemeral events 20000-29999)
- NIP-20: Command results (OK messages)
- NIP-22: Event created_at limits (timestamp validation)
- NIP-28: Public Chat
- NIP-33: Parameterized Replaceable Events (kind 30000-39999)
- NIP-40: Expiration Timestamp
- NIP-62: Request to vanish (complete data removal)
- NIP-70: Protected Events (rejects events with "-" tag)
bundle exec ruby main.rbThe relay will start on ws://localhost:8080 by default.
git clone <repository-url>
cd ruby-nostr-relay
bundle install- Ruby 3.0 or higher
- PostgreSQL
- Bundler
MIT License
Yasuhiro Matsumoto (a.k.a. mattn)