scsibug/nostr-rs-relay

By scsibug

Updated 24 days ago

A minimal and fast relay for the Nostr decentralized chat protocol.

Image
Networking
Message queues
Databases & storage
11

100K+

scsibug/nostr-rs-relay repository overview

Quick Reference

What is Nostr-rs-relay?

Nostr-rs-relay is a Nostr ("Notes and Other Stuff Transmitted by Relays") server that stores and relays data for users. Relays are used to store events, and answer queries from users to find the events they are interested in.

Design goals of this relay include:

  • Suitable for running on small VPSes or other resource-constrained devices like a RaspberryPi.
  • Minimal dependencies, no external datastores need to be configured.
  • Configurable for most basic needs, such as whitelisting addresses, rate limiting, etc.
  • Fully support all Nostr Improvement Proposals (NIP).

How to use this image

Starting a relay to listen on host port 7000 is easy:

$ docker run -p 7000:8080 nostr-rs-relay

Use a bind mount to store the SQLite database outside of the container image, and map the container's 8080 port to a host port (7000 in the example below).

$ docker run -it -p 7000:8080 \
  --mount src=$(pwd)/data,target=/usr/src/app/db,type=bind \
  scsibug/nostr-rs-relay:latest

Add a config file on the host with another bind mount to config.toml:

$ docker run -it -p 7000:8080 \
  --mount src=$(pwd)/config.toml,target=/usr/src/app/config.toml,type=bind \
  --mount src=$(pwd)/data,target=/usr/src/app/db,type=bind \
  scsibug/nostr-rs-relay:latest

Configuration template

The latest config.toml configuration file template is available from the git repo. It allows setting maximum event sizes, rate limits, alternate ports, and internal buffer sizes.

Tag summary

Content type

Image

Digest

sha256:48d54c2d2

Size

48.1 MB

Last updated

24 days ago

Requires Docker Desktop 4.37.1 or later.