Nostrodomo is a lightweight and fast Nostr relay designed to be a drop-in replacement for message brokers like RabbitMQ and Kafka. Born out of a weekend coding frenzy, Nostrodomo leverages the Nostr protocol to efficiently handle message brokering with minimal overhead.
While exploring the Nostr protocol, it became evident that its design perfectly suited the needs of a message broker. With this realization, Nostrodomo was created as a powerful yet simple solution for message brokering. The project started with the goal of being a drop-in replacement for more complex systems like RabbitMQ and Kafka, offering the same functionality with reduced complexity.
Although Nostrodomo is still in its early stages and barely NIP-01 compliant, the future looks bright for this little relay that could. With continued development and community support, Nostrodomo aims to become a robust and feature-rich Nostr relay.
- Lightweight: Minimal resource usage, perfect for small to medium-sized applications.
- Fast: Optimized for speed, ensuring quick message delivery and handling.
- Nostr Protocol: Built on the Nostr protocol, making it highly interoperable with other Nostr clients and services.
- Go 1.20+
- A supported SQL database (PostgreSQL, MySQL, SQLite3)
-
Clone the repository:
git clone https://github.com/chebizarro/nostrodomo.git cd nostrodomo
-
Install dependencies:
go mod tidy
-
Set up your configuration file: Create a
config.yaml
file in the root directory with your settings. You can find an example configuration inconfig.example.yaml
. -
Run the server:
go run main.go
Nostrodomo uses Viper for configuration management, allowing you to specify settings via command line arguments, environment variables, or a configuration file. The configuration file should be in YAML format and located at the root directory.
relay:
write_wait: 10s
ping_period: 54s
storage:
type: postgres
host: localhost
port: 5432
user: user
password: password
name: nostrodomo
clients:
max_message_size: 512
Connect your Nostr clients to the relay using the WebSocket endpoint:
const socket = new WebSocket("ws://localhost:8080/ws");
Contributions are welcome! Please fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to the Nostr protocol developers and the open-source community for their invaluable contributions and support.