What Is A Nostr Relay?

Nostr relay explained

Share this article

The issues with social media are well documented; Facebook and Twitter started out as information distribution networks, but through censorship and algorithmic curation, the experience they used to provide continues to be tainted by politics and biases. Certain narratives are surprising; certain personalities are de-platformed, and all the while, advertisers are in a race to bid for your eyeballs on every scroll.

Since the decay of legacy social media, many apps have tried to break their network effects with little or no success. Platforms like Gab, Truth Social and Mastadon launched with massive fanfare but have slowed down in recent years.

While Nostr is being hailed as the next big alternative to social media apps like Twitter as its first use case for the protocol. While the platforms mentioned above specifically target a certain social media user Nostr doesn’t; it can’t. Nostr is only a protocol for relaying data between different users; how clients display this data is up to them.

  • You could have a client that focuses on short-form content like Twitter
  • You could have a client that focuses on Direct Messages like Telegram
  • You could have a client that focuses on formats data as a messageboard like Reddit

It really is all up to how the client/user interface wants to display the data it extracts from the various Nostr relays it supports.

Nostr relies on relays.

There is no Nostr app, there is no Nostr website; there is no Nostr company. Nostr is a protocol that provides censorship-resistant communications on the internet. Nostr uses dumb relays forward messages from one user to another.

Anyone can spin up a private and public key pair, connect to a relay via a client of their choice and broadcast their information, in many cases a post, to one or several relays.

Instead of logging into Twitter and posting your text message to their cloud storage servers, which is then recalled by others who use Twitter and wish to see your content, with Nostr, you’re posting your content to relays that allow for public submissions. You can get public relays or private relays that are invite-only or you can run your own relay and have a party of one; it’s all up to your preference.

How does Nostr work?

  • Every user is identified by a public key. Every post is signed. Every client validates these signatures.
  • Clients fetch data from relays of their choice and publish data to other relays of their choice. A relay doesn’t talk to another relay, only directly to users.
  • For example, to “follow” someone, a user just instructs their client to query the relays it knows for posts from that public key.
  • On startup, a client queries data from all relays it knows for all users it follows (for example, all updates from the last day), then displays that data to the user chronologically.
  • A “post” can contain any kind of structured data, but the most used ones are going to find their way into the standard so all clients and relays can handle them seamlessly.

How is Nostr different?

Nostr takes another stab at a decentralised social network without the need for a blockchain or the need for you to spin up a subdomain on a server. Unlike Mastodon, where user identities are attached to servers and servers have a degree of control over registered users, Nostr is far more open and fluid thanks to its reliance on relays.

There are two components at play on Nostr: Clients and Relays.

  • Each user interacts with a client they prefer; this could be a web app, iOS app, Android app or Desktop application.
  • While anyone can run a relay, think of this as a storage system that you can use or allow others to use to house their posts.

Clients can publish data (i.e. create posts, likes, re-shares etc.) on any number of relays and fetch data from other relays to see what accounts they follow are up to online.

Each user is assigned a public key. When a user follows someone, the user’s client fetches posts associated with that someone’s public key from the associated relay. This process is repeated on start-up, with the client querying data from all relays it knows for all users it follows.

The fetched data is then displayed to the user chronologically to make up a feed.

Nostr has built-in censorship resistance.

It sounds complicated, but such an implementation solves several flaws, such as the ability to back up your content locally and choosing which relays to broadcast on and which to ignore. That means when a relay rejects your content or shuts down, your data and account are still safely stored on your local or any relays that are still happy to house your content.

Nostr users are identifiable by public keys, and as long as there is a relay that holds data tied to that public key, a client can pull up that information and display it publicly.

It’s nearly impossible to boot a person off the platform completely unless all relays ban them, and the more relays spun up, the harder it gets to ban someone. Nostr allows the free market for information to run its course since “there will always be some Russian server willing to take your money in exchange for serving your posts.”

If you’re a provocative character that certain clients and relays don’t wish to display, the ones that do will attract those users and traffic to their relay and client. Trying to chase your information down and pin it to one source becomes a game of whack-a-mole.

Where can I find Nostr relays?

If you’re looking for Nostr relays to connect with your preferred client, you can find a list of them here

Run your own Nostr relay

If you like the sound of Nostr and want to get involved in supporting the network, or you refuse to trust anyone with your data and prefer to run your own relay instead, check out the following guides on how to set up one for yourself.

  1. Set up a Nostr Relay server in under 5 minutes
  2. GitHub

Do your own research.

If you’d like to try out Nostr or want to learn more about it, we recommend checking out the following resources to kickstart your research.

Are you on Nostr?

If you are a Nostr user and want to hang out and chat with us or follow our content on your preferred Nostr front end, feel free to add us using the PubKey below.

7ecd3fe6353ec4c53672793e81445c2a319ccf0a298a91d77adcfa386b52f30d

The Bitcoin Manual’s Nostr Pubkey

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

Datum Launch

What Is DATUM?

Let’s take a journey back to Bitcoin’s early days, when mining was a solitary pursuit. The Bitcoin core of yesteryear was all-encompassing, serving as the

BTC simplicity

What Is Simplicity?

One of the criticisms often levelled at Bitcoin is its limited scripting capabilities, which restrict the complexity of smart contracts. If you ever speak to

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.