Nostr

Notes and Other Stuff Transmitted by Relays

A decentralized protocol designed for social media applications. Rather than a strict, highly prescriptive protocol, Nostr starts with a very simple, basic protocol for how data is structured and shared, followed by Nostr Implementation Possibilities (NIPs)—authored similar to Python PEPs—describing mandatory rules for common use cases and many optional guidelines and suggestions.

The basic concept is "smart clients, dumb servers." Clients are where users manage their accounts, identified by a public/private key pair; create content ("events"), publishing them to relay servers via websockets; and subscribe to events they want to see from other users. Relays collect events, share them with other relays they are aware of via websockets, and aggregate events that users have requested based on their subscription preferences.

Events are JSON objects with a simple, mostly flat structure, and include a cryptographic signature as proof that they were created by a particular user.

Private, encrypted messages to a single recipient or group of recipients are supported. NIP-17 describes the structure of a private message, and how to encrypt it so that almost all metadata, including sender and recipients, are not visible to the public.

Images, videos, and other larger files are typically not uploaded to relays. It is expected that they are stored on third-party storage and shared via publicly-downloadable URLs. These files can be encrypted to protect their contents from public consumption, with decryption metadata included in the event so that their intended audience can consume them.