Nostr - microblogging for the free

I have a love/hate relationship with Twitter. I love it for the way I can follow people I find interesting, I like glancing at new updates and generally following topics I like. But I find it irritating that in the end of the day it’s just a platform that exploits my attention to make me look at ads.

I was looking for an alternative that is more open and free of the corporate control. I found Nostr. It has a public protocol and all implementations I’ve seen are opensource. What got me interested is not just that is decentralised but also how simple it is. It uses web sockets and messages of given type. Relays are exchanging those messages between them and users can decide which relays to use. Having that simplicity is a good starting point because it makes it easy to adopt and start using even from development perspective.

I noticed there is a nice Go library that can be used to implement a relay -

I gave it a quick test and got to a working proof-of-concept code within minutes. Here’s a fully working relay demo:

But if you ever want to try it out with a Nostr client keep in mind that web sockets just like http have a way to work with or without TLS. In other words:

  • Use ws:// when you want insecure connection similar to http://
  • Use wss:// when you want secure (TLS/SSL) connection similar to https://

Having to terminate SSL during development is tedious but most clients should support ws:// so you can experiment with relays if you want.

Another interesting library used in the relayer is this one:

That’s the most feature rich library I’ve seen for Go. There are other implementations in other languages too so it seems that the ecosystem around Nostr is growing. It is also being complimented by the ability to send zaps (SATS or Satoshi) which is small pieces of a bitcoin. The Satoshi (named after the creator of Bitcoin) is actually the smallest amount (denomination) of Bitcoin and is equal 0,00000001 BTC. That is a pretty small value and people often use it to zap posts made on Nostr which creates a value-for-value system. You like a post, you can zap it. This gives a few Satoshi coins to the creator of the post which is a great way for us to support one another.

What is more important is that we have building blocks that enable many use cases. We have:

  • Ability to connect with one another and share messages
  • Ability to decentralise the system that spreads the messages so it is protected from censorship
  • Ability to encrypt private messages
  • Ability to integrate value transfer by means of Bitcoin lightning transactions

This can be foundation to many use case implementations - shops, games, services, etc. I hope to see this system used for great new things.