Nostr Relay WebSocket Interface

A Nostr relay is a WebSocket server that accepts signed events, stores them subject to its own policy, and responds to subscription filters from clients. The relay surface is intentionally minimal: no accounts, no shared state, no canonical ordering. Operators choose retention, content policy, paid-access, and authentication (NIP-42) independently. Reference implementations include strfry (C++), nostream (TypeScript), and khatru (Go).

Nostr Relay WebSocket Interface is one of 4 APIs that Nostr publishes on the APIs.io network.

Tagged areas include Relay, WebSocket, strfry, khatru, and nostream.

API entry from apis.yml

apis.yml Raw ↑
aid: nostr:relay-interface
name: Nostr Relay WebSocket Interface
description: 'A Nostr relay is a WebSocket server that accepts signed events,

  stores them subject to its own policy, and responds to subscription

  filters from clients. The relay surface is intentionally minimal:

  no accounts, no shared state, no canonical ordering. Operators

  choose retention, content policy, paid-access, and authentication

  (NIP-42) independently. Reference implementations include strfry

  (C++), nostream (TypeScript), and khatru (Go).

  '
humanURL: https://github.com/nostr-protocol/nips/blob/master/11.md
baseURL: wss://relay.example
tags:
- Relay
- WebSocket
- strfry
- khatru
- nostream
properties:
- type: Specification
  url: https://github.com/nostr-protocol/nips/blob/master/01.md
- type: RelayInfo
  url: https://github.com/nostr-protocol/nips/blob/master/11.md
- type: ReferenceImplementation
  url: https://github.com/hoytech/strfry
- type: ReferenceImplementation
  url: https://github.com/Cameri/nostream
- type: ReferenceImplementation
  url: https://github.com/fiatjaf/khatru