A nostr relay, written in Clojure, backed by sqlite3.
Supported NIPs: NIP-01, NIP-02, NIP-04, NIP-11, NIP-12, NIP-15, NIP-16, NIP-20, NIP-22
Coming Soon: NIP-09, NIP-26, NIP-33, NIP-40
- solid nips coverage & data completeness accuracy
- speed and performance on modest hardware
For a real deployment, you'll want to deploy with ssl termination (e.g. using ngnix) but for local testing, simply:
$ brew install clojure/tools/clojure
$ make run
The relay will be reachable at ws://localhost:9090
and data
in a git-ignored ./n.db
sqlite file
With various app metrics available at http://localhost:9090/metrics
.
Edit ./conf/relay.yaml
to change port, file, etc.
- wss://nostr-relay.untethr.me
- wss://relay.kronkltd.net
Use a latest release from releases.
A released tar.gz
archive has these contents:
me.untethr.nostr-relay.jar
conf/relay.yaml
conf/nip05.json
conf/nip11.json
conf/logback.xml
Unpack on server, update config files to your personal liking (note: leave
the "supported_nips" and "version" as-is in the nip11.json
file), and run
(using java 11 ):
$ java -Xms1g -Xmx1g \
-Dlogback.configurationFile=conf/logback.xml \
-cp me.untethr.nostr-relay.jar \
clojure.main -m me.untethr.nostr.app
This runs the relay on the port specified in conf/relay.yaml
(default 9090).
You'll want your users to hit a reverse proxy, configured to serve SSL traffic (wss://...) and proxy to the relay server.
See Deploy for more information on how to run a real deployment.
The best place to start reading the code is from the -main
method in the
well-documented me.untethr.nostr.app namespace.
If you're developing you can build a jar or deployment archive from latest source, like so:
$ make uberjar
or
$ make deploy-archive