Skip to content

Shugur-Network/relay

Shugur Relay Banner

High-performance, reliable, and scalable Nostr relay.


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.

What is Nostr?

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.

πŸ“‹ Nostr Protocol Support

Supported NIPs (Nostr Improvement Proposals)

Shugur Relay implements the following NIPs for maximum compatibility with Nostr clients:

Core Protocol

  • 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

Enhanced Features

Advanced Features

Protocol Features

  • 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)

πŸš€ Features

  • 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.

⚑ Quick Start

Distributed Installation (Recommended)

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

Standalone Installation

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.

πŸ—οΈ Build from Source

# 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

🐳 Docker Quick Start

# 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

πŸ“š Documentation

Comprehensive documentation is available in our documentation and documentation repository:

🀝 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines and Code of Conduct before getting started.

πŸ”’ Security

Security is a top priority. If you discover a security vulnerability, please follow our Security Policy for responsible disclosure.

License

Shugur Relay is open-source software licensed under the MIT License.