Files
c-relay/NOSTR_RELEASE.md
2025-10-30 06:52:05 -04:00

2.9 KiB

Relay

I am releasing the code for the nostr relay that I wrote use myself. The code is free for anyone to use in any way that they wish.

Some of the features of this relay are conventional, and some are unconventional.

The conventional

This relay is written in C99 with a sqlite database.

It implements the following NIPs.

  • NIP-01: Basic protocol flow implementation
  • NIP-09: Event deletion
  • NIP-11: Relay information document
  • NIP-13: Proof of Work
  • NIP-15: End of Stored Events Notice
  • NIP-20: Command Results
  • NIP-33: Parameterized Replaceable Events
  • NIP-40: Expiration Timestamp
  • NIP-42: Authentication of clients to relays
  • NIP-45: Counting results
  • NIP-50: Keywords filter
  • NIP-70: Protected Events

The unconventional

The binaries are fully self contained.

It should just run in linux without having to worry about what you have on your system. I want to download and run. No docker. No dependency hell.

I'm not bothering with other operating systems.

The relay is a full nostr citizen with it's own public and private keys.

For example, you can see my relay's profile (wss://relay.laantungir.net) running here:

Primal link

What this means in practice is that when you start the relay, it generates keys for itself, and for it's administrator (You can specify these if you wish)

Now the program and the administrator can have verifed communication between the two, simply by using nostr events. For example, the administrator can send DMs to the relay, asking it's status, and changing it's configuration through any client that can handle nip17 DMs. The relay can also send notifications to the administrator about it's current status, or it can publish it's status on a regular schedule directly to NOSTR as kind-1 notes.

Also included is a more standard administrative web front end. This front end communicates to the relay using an extensive api, which again is nostr events signed by the administrator. You can completely control the relay through signed nostr events.

Screenshots

Main page with real time updates.

Set your configuration preferences.

View current subscriptions

Add npubs to white or black lists.

Run sql queries on the database.

Light mode.