home |
name |
text |
tagline |
actions |
khatru |
a framework for making Nostr relays |
write your custom relay with code over configuration |
theme |
text |
link |
brand |
Get Started |
/getting-started |
|
theme |
text |
link |
alt |
Cookbook |
/cookbook/ |
|
|
|
title |
icon |
link |
details |
It's a library |
🐢 |
/getting-started |
This is not an executable that you have to tweak with config files, it's a library that you import and use, so you just write code and it does exactly what you want. |
|
title |
icon |
link |
details |
It's very very customizable |
🎶 |
/cookbook/embed |
Run arbitrary functions to reject events, reject filters, overwrite results of queries, perform actual queries, mix the relay stuff with other HTTP handlers or even run it inside an existing website. |
|
title |
icon |
link |
details |
It plugs into event stores easily |
📦 |
/cookbook/eventstore |
khatru's companion, the `eventstore` library, provides all methods for storing and querying events efficiently from SQLite, LMDB, Postgres, Badger and others. |
|
title |
icon |
link |
details |
It supports NIP-42 AUTH |
🪪 |
/cookbook/auth |
You can check if a client is authenticated or request AUTH anytime, or reject an event or a filter with an "auth-required:" and it will be handled automatically. |
|
title |
icon |
link |
details |
It supports NIP-86 Management API |
🛠️ |
/cookbook/management |
You just define your custom handlers for each RPC call and they will be exposed appropriately to management clients. |
|
title |
icon |
link |
details |
It's written in Go |
🛵 |
https://pkg.go.dev/github.com/fiatjaf/khatru |
That means it is fast and lightweight, you can learn the language in 5 minutes and it builds your relay into a single binary that's easy to ship and deploy. |
|
|