πΎ G.R.A.I.N.
Go Relay Architecture for Implementing Nostr
A highly configurable Nostr relay implementation with a powerful Go client library and built-in web frontend for relay status and client features.
πΎ Try it Now: wss://wheat.happytavern.co
My public GRAIN instance is live! Connect your Nostr client and start using it today.
Storage Policy: This relay accepts any event and stores them for a set time before removal.
Want permanent storage? Get a Happy Tavern Membership for whitelist access!
Why GRAIN?
The key to GRAIN is being highly configurable to fit multiple use cases.
GRAIN was created because existing Nostr relay solutions didn't offer the flexibility needed for diverse deployment scenarios. At its core, GRAIN is a powerful, production-ready Nostr relay that you can configure to meet any needβwhether you're running a public relay, a private community relay, or a specialized relay with custom rules.
But GRAIN is more than just a relayβit's also a comprehensive Go library for building all sorts of Nostr applications and tools. The client library handles connection pooling, event management, authentication, and more, so you can focus on building your application instead of reinventing the wheel.
πΎ GRAIN is Open Source
GRAIN is completely free and open source. You can run your own relay, customize it however you want, and contribute to the project. That's what GRAIN is all aboutβgiving you the freedom and tools to build on Nostr your way.
Nostr Relay
- β Highly configurable via YAML settings
- β MongoDB-backed event storage
- β Advanced rate limiting & resource controls
- β Whitelist/blacklist filtering
- β Hot configuration reloading
- β Event purging with retention policies
- β NIP support: 1, 2, 9, 11, 40, 42, 65
Go Client Library
- β Connection pooling & relay management
- β Event signing & broadcasting
- β Subscription management with filters
- β Key generation & conversion utilities
- β Session-based authentication
- β Perfect for building Nostr apps in Go
- β Production-grade with error handling
Get Started with GRAIN
GRAIN is open source and built with β€οΈ for the Nostr community. Contributions and feedback are always welcome!
π₯οΈ Built-in Web Frontend
Relay Dashboard
- β’ Real-time relay status
- β’ Configuration management
- β’ Connection monitoring
- β’ Hot-reload interface
Event & Profile Viewer
- β’ View user profiles
- β’ Display event details
- β’ Search functionality
- β’ Profile caching
Client Tools
- β’ Relay ping/latency testing
- β’ Key generation & conversion
- β’ Event publishing
- β’ Multiple auth methods
βοΈ Configuration Examples
GRAIN is designed for simplicity and flexibility. Customize settings to suit your requirements by editing the YAML configuration files.