Shugur Relay is a production-ready Nostr relay built in Go with CockroachDB for distributed storage. It's designed for operators who need reliability, observability, and horizontal scale.
Nostr (Notes and Other Stuff Transmitted by Relays) is a simple, open protocol that enables a truly censorship-resistant and global social network. Unlike traditional social media platforms, Nostr doesn't rely on a central server. Instead, it uses a network of relays (like Shugur Relay) to store and transmit messages, giving users complete control over their data and communications.
Key benefits of Nostr:
- Censorship Resistance: No single point of control or failure
- Data Ownership: Users control their own data and identity
- Interoperability: Works across different clients and applications
- Simplicity: Lightweight protocol that's easy to implement and understand
Learn more in our Nostr Concepts documentation.
Shugur Relay implements the following NIPs for maximum compatibility with Nostr clients:
- NIP-01: Basic protocol flow description
- NIP-02: Contact List and Petnames
- NIP-03: OpenTimestamps Attestations for Events
- NIP-04: Encrypted Direct Message
- NIP-09: Event Deletion
- NIP-11: Relay Information Document
- NIP-15: End of Stored Events Notice
- NIP-16: Event Treatment
- NIP-17: Private Direct Messages
- NIP-20: Command Results
- NIP-22: Event
created_at
Limits - NIP-23: Long-form Content
- NIP-24: Extra metadata fields and tags
- NIP-25: Reactions
- NIP-26: Delegated Event Signing
- NIP-28: Public Chat
- NIP-33: Parameterized Replaceable Events
- NIP-40: Expiration Timestamp
- NIP-44: Encrypted Payloads (Versioned)
- NIP-45: Counting Events
- NIP-50: Search Capability
- NIP-59: Gift Wrap
- NIP-65: Relay List Metadata
- NIP-78: Application-specific data
- WebSocket Connection: Real-time bidirectional communication
- Event Validation: Cryptographic signature verification
- Subscription Management: Efficient filtering and real-time updates
- Rate Limiting: Protection against spam and abuse
- Event Storage: Persistent storage with CockroachDB
- Search Support: Full-text search capabilities (NIP-50)
- Relay Information: Discoverable relay metadata (NIP-11)
- Production-Ready: Built for reliability and performance with enterprise-grade features.
- Horizontally Scalable: Stateless architecture allows easy scaling across multiple nodes.
- Distributed Database: Uses CockroachDB for high availability and global distribution.
- Advanced Throttling: Sophisticated rate limiting and abuse prevention mechanisms.
- NIP Compliance: Implements essential Nostr Improvement Proposals (NIPs).
- Observability: Built-in metrics, logging, and monitoring capabilities.
- Easy Deployment: One-command installation with automated scripts.
- Configurable: Extensive configuration options for fine-tuning behavior.
Get a distributed Shugur Relay cluster running with one command:
curl -fsSL https://github.com/Shugur-Network/relay/raw/main/scripts/install.distributed.sh | sudo bash
For a single-node setup:
curl -fsSL https://github.com/Shugur-Network/relay/raw/main/scripts/install.standalone.sh | sudo bash
For manual setup or other installation methods, see our Installation Guide.
# Clone and build
git clone https://github.com/Shugur-Network/Relay.git
cd Relay
# Build the binary
go build -o bin/relay ./cmd
# Run the relay
./bin/relay
# Using official Docker image
docker run -p 8080:8080 ghcr.io/shugur-network/relay:latest
# Or using Docker Compose (for development)
git clone https://github.com/Shugur-Network/Relay.git
cd Relay
docker-compose up -d
Comprehensive documentation is available in our documentation and documentation repository:
We welcome contributions from the community! Please read our Contributing Guidelines and Code of Conduct before getting started.
Security is a top priority. If you discover a security vulnerability, please follow our Security Policy for responsible disclosure.
Shugur Relay is open-source software licensed under the MIT License.