NostrGator is a complete, enterprise-grade Nostr relay infrastructure providing 100% protocol coverage with complete financial sovereignty. Built with proven Docker images and battle-tested relay technology, NostrGator delivers professional-grade performance under your complete control.
- πββοΈ Ultra-Fast: Sub-5ms response time vs 100-500ms for public relays
- π Private & Secure: Localhost-only, your data never leaves your machine
- π Complete Coverage: 11 specialized relays covering every Nostr use case
- β‘ Lightning Wallet: Self-hosted Alby Hub with Nostr Wallet Connect (NWC)
- οΏ½ Professional File Server: NostrCheck-server with full NIP-96 & Blossom support
- οΏ½π Hybrid Sovereignty: Local control with global reach via event mirroring
- π NIP-05 Identity: DNS-based identity verification system
- π΅οΈ Federation Engine: Peer discovery and trust scoring
- π Tor Integration: Anonymous federation without VPN overhead
- π Professional Monitoring: Prometheus metrics and health monitoring
- π‘οΈ Enterprise Security: Multi-layer spam filtering and rate limiting
- π¦ Production Ready: Uses proven Docker images from the Nostr ecosystem
- π± Client Compatible: Works with Primal, Damus, Amethyst, iris.to, etc.
- General Relay (Port 7001): All event types, primary hub
- DM Relay (Port 7002): Private messages with NIP-04 encryption
- Media Relay (Port 7003): Images, videos, file metadata
- Social Relay (Port 7004): Notes, reactions, social interactions
- Cache Relay (Port 7005): High-performance local cache
- File Server (Port 7006): Professional NostrCheck-server with NIP-96 & Blossom protocols
- Long-Form Relay (Port 7007): Articles, blogs, newsletters
- Live Events Relay (Port 7008): Streaming, live activities
- Marketplace Relay (Port 7009): Commerce, classified ads
- Games Relay (Port 7010): Interactive content, gaming
- Bridge Relay (Port 7011): Cross-protocol integration
- Event Mirroring: Hybrid sovereignty with public relay backup
- NIP-05 Service: DNS identity verification (admin@localhost)
- Federation Engine: Peer discovery and trust scoring
- Tor Proxy: Anonymous federation via SOCKS5
- Content Discovery: Search and content recommendation
- Security Monitor: Spam filtering and rate limiting
- Health Monitor: System health and performance monitoring
- Alby Hub: Self-hosted Lightning wallet with Nostr Wallet Connect (NWC)
- Watchtower: Automated container updates
- β Docker Desktop 20.10+ (installed and running)
- β 2GB free RAM, 5GB free disk space
- β Windows/macOS/Linux supported
# Clone the repository
git clone https://github.com/yourusername/nostrgator.git
cd nostrgator
# Copy environment template
cp .env.example .env
# Edit .env with your Nostr public key
# Replace NOSTR_PUBKEY with your actual npub key# Start all services
docker compose up -d
# Verify everything is running
docker compose ps
# Check health status
./scripts/monitor-simple.ps1 # Windows
./scripts/monitor-simple.sh # Linux/macOSβ RECOMMENDED RELAY SETUP:
Essential 3 (Start Here):
ws://localhost:7001 # General (everything)
ws://localhost:7004 # Social (fast social feeds)
ws://localhost:7005 # Cache (fastest responses)
Content Creator Setup:
ws://localhost:7001 # General distribution
ws://localhost:7003 # Media uploads
ws://localhost:7007 # Long-form articles
ws://localhost:7004 # Social engagement
β DO NOT ADD THESE TO CLIENTS:
ws://localhost:7006(Files - HTTP only, not WebSocket)ws://localhost:7081(Security Monitor - internal only)
π§ Initial Wallet Setup:
- Access Alby Hub: Open
http://localhost:7012 - Create Wallet: Set a strong password for your wallet
- Backup Seed: Save your seed phrase securely (encrypted locally)
- Configure Lightning: Choose embedded LDK or connect external node
β‘ Enable Nostr Wallet Connect:
- Generate NWC String: In Alby Hub UI, create a new NWC connection
- Add to Nostr Client: Paste the NWC string in your client's wallet settings
- Test Payment: Try sending/receiving a small amount to verify
π Supported Clients with NWC:
- Damus (iOS): Settings β Wallet β Nostr Wallet Connect
- Amethyst (Android): Settings β Zaps β Wallet Connect
- Primal (Web/Mobile): Settings β Lightning β Connect Wallet
- iris.to (Web): Settings β Lightning Wallet
- Prometheus Web UI:
http://localhost:9090 - Federation Metrics:
http://localhost:9090/metrics - Event Mirror Metrics:
http://localhost:9091/metrics - NIP-05 Service:
http://localhost:3005
- Web Dashboard:
http://localhost:7006(full management interface) - NIP-96 Upload:
http://localhost:7006/api/v1/upload(for NIP-96 clients) - Blossom Upload:
http://localhost:7006/api/v1/blossom(modern protocol) - File Downloads:
http://localhost:7006/api/v1/files/filename - NIP-96 Discovery:
http://localhost:7006/.well-known/nostr/nip96 - Public Gallery:
http://localhost:7006/gallery(uploaded files showcase)
- Web Interface:
http://localhost:7012(wallet management) - API Info:
http://localhost:7012/api/info(wallet status) - Nostr Wallet Connect: Generate NWC connection strings in the UI
- Lightning Address: Configure your Lightning address for receiving payments
# Check status of all services
docker compose ps
# View logs for specific service
docker logs nostr-general --tail=20
# Restart all services
docker compose restart# Update all images
docker compose pull && docker compose up -d
# Create backup
./scripts/backup.ps1 # Windows
./scripts/backup.sh # Linux/macOS
# Database maintenance
./scripts/db-maintenance-simple.ps1 # Windows
./scripts/db-maintenance-simple.sh # Linux/macOS- All Platforms: Windows, macOS, Linux
- One Command:
docker compose up -d - Automatic Updates: Watchtower handles updates
- Isolated Environment: No conflicts with system
Each relay can run natively without Docker:
Requirements per platform:
- Linux: Rust toolchain, SQLite3, nginx
- macOS: Homebrew, Rust, SQLite3, nginx
- Windows: Rust toolchain, SQLite3, nginx
Manual setup steps:
- Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - Clone nostr-rs-relay:
git clone https://github.com/scsibug/nostr-rs-relay.git - Build:
cargo build --release - Configure: Copy config files from
configs/directory - Run:
./target/release/nostr-rs-relay --config config.toml
Native deployment guide: See docs/native-installation.md
nostrgator/
βββ π README.md # This guide
βββ π docker-compose.yml # Container orchestration
βββ π .env.example # Environment template
βββ π configs/ # Service configurations
β βββ general/config.toml # General relay settings
β βββ dm/config.toml # DM relay settings
β βββ event-mirror/ # Event mirroring config
β βββ nip05/ # NIP-05 service config
β βββ ... # Other service configs
βββ π scripts/ # Management scripts
β βββ monitor-simple.ps1 # Windows monitoring
β βββ monitor-simple.sh # Linux/macOS monitoring
β βββ backup.ps1 # Windows backup
β βββ backup.sh # Linux/macOS backup
βββ π docs/ # Documentation
β βββ client-setup.md # Client configuration
β βββ native-installation.md # Non-Docker setup
β βββ troubleshooting.md # Problem resolution
β βββ security.md # Security best practices
βββ π data/ # Persistent data (auto-created)
- Localhost Only: No external network access by default
- Pubkey Whitelisting: Only your key can publish events
- Data Sovereignty: All data remains on your machine
- Tor Integration: Anonymous federation support
- Rate Limiting: Protection against spam and abuse
- Health Monitoring: Automated security monitoring
- Speed: 10-50x faster (sub-5ms vs 100-500ms)
- Privacy: Your data, your server, your rules
- Reliability: 99.9% uptime under your control
- Cost: Free to run, no subscription fees
- Security: No external dependencies or data sharing
- Proven Technology: Uses battle-tested
nostr-rs-relay - Complete Coverage: All NIPs and use cases supported
- Production Ready: Professional monitoring and security
- One-Command Deploy: Automated setup and configuration
- Cross-Platform: Works on Windows, macOS, Linux
NostrGator is designed to complement your existing Nostr usage:
- Primary Storage: Private relays for your main activity
- Discovery: Keep some public relays for finding new content
- Redundancy: Events automatically mirrored to public relays
- Performance: Private relays for speed, public for reach
- π Quick Start: Get running in 5 minutes
- π± Client Setup: Configure popular Nostr clients
- β‘ Lightning Wallet Setup: Alby Hub and NWC configuration
- π§ Native Installation: Run without Docker
- π Troubleshooting: Common issues and solutions
- π‘οΈ Security: Security best practices
- Quick Issues: Check troubleshooting guide
- Client Setup: See client configuration guide
- Logs: Check
docker compose logs --tail=50 - Community: Join the discussion in GitHub Issues
- Configure your client with the recommended relay URLs
- Post a test note and see sub-5ms response times
- Explore advanced features like NIP-05 identity verification
- Join the community and share your experience
NostrGator is built on the shoulders of giants. We extend our deepest gratitude to the open source community and the following projects that make NostrGator possible:
-
- The backbone of NostrGator - High-performance Rust-based Nostr relay
- Powers 10 of our 11 specialized relays with proven reliability and speed
- Excellent NIP coverage and SQLite optimization
-
- Ultra-high performance relay - Powers our cache and content discovery services
- C++ implementation optimized for maximum throughput and minimal latency
- Advanced indexing and search capabilities
- nostrcheck-server by @quentintaranpino
- Complete NIP-96 & Blossom implementation - Professional file hosting solution
- Full web dashboard, user management, and Lightning integration
- AI moderation, public galleries, and enterprise features
- The most comprehensive Nostr file server available
-
- Industry-standard monitoring - Metrics collection and alerting
- Powers our comprehensive system monitoring and performance tracking
- Time-series database with powerful query language (PromQL)
-
Docker by Docker Inc
- Containerization platform - Enables easy deployment across all platforms
- Consistent environments and simplified dependency management
- Foundation for our one-command deployment experience
-
- Privacy and anonymity - Enables anonymous federation without VPN overhead
- SOCKS5 proxy for private peer discovery and communication
-
- Embedded database engine - Reliable, fast, and zero-configuration storage
- Powers all relay databases with ACID compliance and excellent performance
-
nginx by nginx team
- High-performance web server - Reverse proxy and static file serving
- Used in various components for HTTP handling and load balancing
- Watchtower by Containrrr
- Automated container updates - Keeps all services current with latest security patches
- Zero-downtime updates for production environments
-
The Nostr Protocol - Created by @fiatjaf and the Nostr community
- The revolutionary decentralized social protocol that makes all of this possible
- NIPs Repository - Protocol specifications
-
The Open Source Community - Developers worldwide who contribute to these projects
- Without your dedication to open source, projects like NostrGator wouldn't exist
- Thank you for building the tools that enable digital sovereignty
All integrated open source components retain their original licenses:
- MIT License: nostr-rs-relay, nostrcheck-server, Watchtower
- Apache 2.0: Prometheus, Docker components
- BSD License: nginx, SQLite
- GPL: Tor Project components
NostrGator itself is released under the MIT License, ensuring it remains free and open source.
Experience true Nostr sovereignty with NostrGator! π
Built with β€οΈ for the Nostr community
Standing on the shoulders of giants, reaching for digital freedom. π½