NOSTR is a protocol

that many things can be built upon

Nostr is not an app. It is a lightweight, simple yet extensible open protocol that allows building truly censorship-resistant and decentralized social media platforms.

This protocol is based on relays. Relays are servers that can be operated by anyone. By opening a persistent connection with the server, clients (or apps) can push and pull events in real time.

🍀 Content

Accounts | Events | Relays | What can Nostr do?

🤸 Accounts

In nostr you don't need to register for an account by using personal data.

Like in Bitcoin, you just need a set of keys. Two keys to be precise:

Getting a set of keys is very easy! You just need to choose a client for the nostr protocol such as snort (web), damus (iOS) or Amethyst (Android) and it will generate it for you.

If you are on the web, an additional security measure is to use an external signer application like the Alby browser extension or the nos2x extension. You can also generate custom private keys with tools like rana.

You should save your private key as it is the only way to recover and re-login to your account in the future!

➡️ More about accounts (verification, customization...)

💡 The Nostr protocol is extensible through Nostr Implementation Possibilities (NIPs). NIPs are what we refer to when we talk about Nostr protocol extensions such as the verification of public keys.

📝 Events

The only object type that exists in nostr is the event. Events are small text-only structures. These are what clients send to the relays.

Here's what an event looks like:

"id": "c011...4c43",
"pubkey": "dec1...4fb3",
"created_at": 1671551112,
"kind": 1,
"tags": [],
"content": "good morning!",
"sig": "e1dc...5f1"

We can break down this data:

For the content and created_at fields there's not much to say.

🪪 The id is a unique identifier for the event. It's a way to uniquely refer to this event in the network. The pubkey field, contains the public key (user) that was used to create the event.

1️⃣ The event kind is one of the most interesting parts of nostr. It is a field that specifies what type of event it is. You may ask why is this interesting... Well, the best part is that event kinds are not limited, so we can engineer any kind we want.

For example, there's the event kind 1 which is just a plain text note. A "tweet" if you want to call it like that. But we also have the kind 4 which are end-to-end encrypted messages!

You see? There are so many possibilities!

🖋 The sig field (signature) is a cryptographic proof that whoever published the event is the owner of the private key associated with that public key.

🏷 The tags field can contain any arbitrary tags we want. This gives a lot of possibilities to developers! A common use, for example, is when you reply to a certain message (event), the id of that event is set to a tag called "the e tag".

📡 Relays

Relays are an essential piece of the nostr protocol. They store the events, which are received from clients.

Relays don't talk to each other. Only the relays you are connected to will receive and store your events.

This is an important aspect of Nostr. Relays don't communicate between them. For this reason, you should connect to as many relays as you want to send your data to.

Clients (should always) allow users to connect to as many relays as they want. Users can also choose if they want to read, write or both from/to the relays they are connected. This means I can connect to a certain relay to retrieve content, but I can choose not to publish my events there, or vice versa.

If I'm only connected to relay A and you are only connected to relay B, we will not be able to see each other's events even though we are both using nostr!

In order to see each other's events, users must connect to at least one shared relay. This means that if I wanted to see your events in the scenario above, I would need to connect to relay B (or you could connect to relay A) and then we would be able to see each other!

This may seem a bit confusing at first, but it is a very powerful aspect. You can host a relay that you never share with anyone and publish all your events there (along with many other relays). This way, you can have a backup of only your events in your own relay.

Maybe there is a relay devoted to talking about football and if I don't want to be part of it, I just don't add it to my clients. At the same time I could still talk to a user that is both on the football relay and a generic relay that I'm also part of.

✊ Nostr can help fight censorship. Imagine you have the power to create portals anywhere you want. If someone tries to put you in jail, you can simply create a new portal and escape.

Something similar happens with nostr as setting up a relay is cheap and easy. In fact, a relay could run on a low-end smartphone! Also, the fact that relays don't talk to each other helps with this: a censoring a relay does not affect other relays!

There are more than 500 relays spread around the globe and growing.

➡️ Guide: How to set up a Nostr relay

🔨 What can Nostr do?

As mentioned before, nostr is a very powerful protocol to share data. This means people can build whatever they want with it.

Nostr is young, and has yet to mature, but here are some of the already implemented and working possibilities:

🐦 Twitter Alternative

Nostr was born as a protocol to create an alternative to Twitter so many clients exist with this purpose.

To achieve this, such clients make use of events of kind 1, which are plain-text notes. Some clients are: noStrudel, snort, iris, damus (iOS), Amethyst (Android) and many more...

Just try them out!

📜 E2EE Text sharing

Sendstr is an online tool where you can share end-to-end encrypted text data between two devices through the nostr protocol.

📝 Blogs

Blogstack - Write decentralized blogs over relay using nostr w/ ⚡ lightning tips.

🔐 E2EE Chat

You can also send private end-to-end encrypted messages to users in most clients. This is achieved by using events of kind 4.

💬 Telegram alternative

By using the kinds 40-44 it is possible to implement public channels just like in Telegram. is web app that implements a clone of Telegram. You can create public channels that anyone can join and chat.

🤖 Reddit Alternative

Nostr can also act as a Reddit alternative where you can publish posts and users can cast votes on such posts.

noStrudel Communities is an implementation of such platform in nostr!

🧩 Online Games

Another interesting use of nostr is to create simple online multiplayer games.

A working implementation of such concept is Jester, a platform where you can play chess online with other users through Nostr!

✨ Amazing right? Let's build! ✨

Here you have some awesome resources to get started:

Nostr protocol specification

Nostr NIPS

Awesome Nostr list

Projects built with Nostr

Nostr relay list

Guide: How to set up a Nostr relay

💡 "Noster" means "our" in Latin. Seemingly, "Nostra" means "our" in Italian, and "Nostre" in Catalan.

🌱 Source