Benefits
Full Control
Complete ownership of signaling infrastructure
Privacy
Signaling metadata stays on your infrastructure
Reliability
No dependency on public relay availability
Customization
Configure access control, rate limiting, and retention policies
Quick Start (Under 5 Minutes)
This guide deploys a Nostr relay using nostream on an Ubuntu VM with Nginx and HTTPS.Prerequisites
- Cloud VM (DigitalOcean, Linode, AWS, etc.)
- Domain name with DNS access
- Basic server administration familiarity
Step 1: Provision VM
Create and access an Ubuntu server, then install packages:Step 2: Install Docker
Step 3: Clone nostream
Step 4: Configure Nginx
Remove default config:Step 5: Configure DNS
Add an A record pointingrelay.example.com to your VM IP.
Step 6: Enable HTTPS with Certbot
Step 7: Start the Relay
Ctrl+B, then DReattach:
tmux a
Step 8: Test Your Relay
Use any WebSocket testing tool to connect:Use Your Relay in GenosDB
Production Considerations
Event Limits and Retention
Event Limits and Retention
Configure in
nostream settings to limit storage and manage retention policies.Authentication and Access Control
Authentication and Access Control
Restrict relay access to known clients using authentication mechanisms.
Monitoring and Logging
Monitoring and Logging
Set up monitoring for relay health, connection counts, and error rates.
Regular Updates
Regular Updates
Keep Docker images and dependencies updated for security patches.
Related Pages
GenosRTC Architecture
P2P networking overview
Fallback Server
Optional reliability enhancement