Skip to content

Relay Management Guide

Master Nostr relays. Learn how to choose, configure, and optimize your relay connections for better performance and reach.

12 minutes advanced

How Relays Work (3 minutes)

Relay Network

YOU

wss://relay.damus.io

15,000 users connected

wss://nos.lol

8,200 users connected

wss://relay.snort.social

Not connected to any relays

The Simple Explanation

Relays are servers that store and forward your Nostr messages.

Think of them like post offices:

  • You drop off a letter (your post) at your local post office
  • They forward it to other post offices
  • Recipients pick it up from their local post office

In Nostr:

  • You write a note (post)
  • Client sends it to relays you’ve connected to
  • Relays store it and share with other relays
  • Followers receive it from relays they’re connected to

Why This Matters

No single point of failure:

  • If one relay goes down, others still work
  • Your posts exist in multiple places
  • You control where your data lives

Censorship resistance:

  • No one can delete your posts from all relays
  • You can always switch to different relays
  • Network routes around blockages

Choice and competition:

  • Different relays offer different features
  • Free and paid options
  • Specialized vs general-purpose

Technical Overview [ADVANCED]

Under the hood, relays use WebSocket connections:

Client ←→ WebSocket ←→ Relay Server ←→ Database

When you post:

  1. Client signs the message with your private key
  2. Client sends to connected relays via WebSocket
  3. Relay validates the signature
  4. Relay stores in database
  5. Relay broadcasts to subscribers

Types of Relays (2 minutes)

Free Public Relays

What they are:

  • Run by volunteers or community members
  • No cost to use
  • Open to everyone

Pros:

  • ✅ Free
  • ✅ Easy to start
  • ✅ Large networks

Cons:

  • ❌ Can be slow or unreliable
  • ❌ May have downtime
  • ❌ Less incentive to maintain

Examples:

  • wss://relay.damus.io (most popular)
  • wss://nos.lol
  • wss://relay.snort.social

What they are:

  • Require payment to use
  • Usually higher quality
  • Better performance

Pros:

  • ✅ More reliable
  • ✅ Better performance
  • ✅ Financial incentive to maintain
  • ✅ Often better moderation

Cons:

  • ❌ Cost money
  • ❌ May have usage limits
  • ❌ Not necessary for casual users

Examples:

  • wss://nostr.wine (paid)
  • Various private relays

Specialized Relays

What they are:

  • Focus on specific topics
  • Regional relays
  • Application-specific

Pros:

  • ✅ Topic-focused content
  • ✅ Like-minded communities
  • ✅ Regional relevance

Cons:

  • ❌ Smaller reach
  • ❌ May be niche

Examples:

  • Bitcoin-focused relays
  • Regional relays (Europe, Asia, etc.)
  • Language-specific relays

Choosing Relays (5 minutes)

Connect to these 5 relays for good coverage:

wss://relay.damus.io          (Primary - most popular)
wss://nos.lol                 (Fast, reliable)
wss://relay.snort.social      (Popular client)
wss://nostr.wine              (Quality paid option - optional)

Selection Criteria

1. Uptime/Reliability

  • Look for relays with >99% uptime
  • Check nostr.watch for stats
  • Avoid frequently offline relays

2. Geographic Location

  • Closer = lower latency
  • Choose relays near you
  • Mix of regions for global reach

3. Content Policy

  • Some filter spam
  • Some allow everything
  • Choose based on your preferences

4. Performance

  • Fast connection times
  • Low latency
  • Good bandwidth

5. Community

  • Active operator
  • Responsive to issues
  • Transparent about policies

Where to Find Relays

  • nostr.watch - Relay uptime monitor
  • nostr.info - Relay directory
  • Client recommendations - Many suggest default relays
  • Community lists - Shared in Nostr posts

How Many Relays?

User TypeRecommendedMaximum
Beginner3-510
Active User5-1020
Power User10-1530
Bot/Service20+50+

More isn’t always better:

  • More relays = more bandwidth
  • Diminishing returns after 10-15
  • Quality over quantity

Relay Testing & Exploration

Try before you commit! Test relay speeds and see which ones work best for your location before adding them to your relay list.

Relay Playground

Explore, test, and learn about Nostr relays. Only online relays are shown. No keys required - just open WebSocket connections and see what happens.

0
Online Relays
0
Currently Offline
20
Total Monitored
0ms
Avg Latency
How it works: Click any relay to open a live WebSocket connection. You will see the connection process in real-time without needing any keys. This is exactly how Nostr clients connect to relays behind the scenes.

No online relays found. Click "Refresh All" to check relay status.


Adding Relays (3 minutes)

Generic Steps (Most Clients)

  1. Open Settings

    • Usually gear icon or “Settings” menu
  2. Find Relays Section

    • Look for “Relays” or “Network”
  3. Add New Relay

    • Click ”+” or “Add Relay”
    • Enter WebSocket URL: wss://relay.example.com
    • Save
  4. Verify Connection

    • Should show green dot or “connected”
    • May take a few seconds

Client-Specific Instructions

Damus (iOS):

  1. Profile tab → Settings (gear icon)
  2. “Relays”
  3. Tap ”+”
  4. Enter URL
  5. Tap “Add”

Amethyst (Android):

  1. Side menu → Settings
  2. “Relays”
  3. Tap ”+”
  4. Enter URL
  5. Save

Iris (Web):

  1. Click profile picture → Settings
  2. “Relays” tab
  3. Click “Add Relay”
  4. Enter URL
  5. Add

Primal (Web/Mobile):

  1. Settings → Network
  2. “Add Relay”
  3. Enter URL
  4. Save

Troubleshooting Connection Issues

“Failed to connect”

  • Check URL is correct (starts with wss://)
  • Try http vs https (should be wss://)
  • Relay might be down
  • Try again in a few minutes

“Timeout”

  • Relay is slow or overloaded
  • Try different relay
  • Check your internet connection

No posts loading

  • May need to wait for sync
  • Try refreshing
  • Check if relay has your followers’ posts

Why Pay?

Benefits:

  • Guaranteed uptime
  • Better performance
  • Direct support
  • Financially sustainable
  • Often better features

When to upgrade:

  • You’re serious about Nostr
  • Free relays aren’t meeting needs
  • You want to support infrastructure
  • You need specific features

nostr.wine

  • Cost: ~$5-10/month
  • Features: High performance, good uptime
  • Signup: Website payment

Private Relays

  • Cost: Varies
  • Features: Custom policies, private communities
  • Access: Invitation or payment

Setting Up Paid Relays

  1. Choose provider
  2. Pay (usually Bitcoin/Lightning)
  3. Receive credentials (if required)
  4. Add to client (same as free relays)
  5. Enjoy better performance

Your Own Relay [ADVANCED] (10 minutes)

Why Run Your Own?

Benefits:

  • Complete control
  • Privacy (your data stays with you)
  • Custom policies
  • Learning experience
  • Support the network

Requirements:

  • Server (VPS ~$5-20/month)
  • Technical knowledge
  • Time to maintain

strfry

  • Language: C++
  • Pros: Fast, lightweight
  • Cons: Requires compilation

nostr-rs-relay

  • Language: Rust
  • Pros: Modern, actively developed
  • Cons: Learning curve

nostream

  • Language: TypeScript
  • Pros: Easy setup, good docs
  • Cons: Requires Node.js

Quick Setup (nostream)

Prerequisites:

  • Ubuntu/Debian server
  • Node.js 18+
  • PostgreSQL

Steps:

# Install dependencies
sudo apt update
sudo apt install nodejs npm postgresql

# Clone repository
git clone https://github.com/Cameri/nostream.git
cd nostream

# Install packages
npm install

# Configure
cp .env.sample .env
nano .env  # Edit settings

# Build
npm run build

# Start
npm start

Connect domain:

  1. Point domain to server IP
  2. Set up SSL (Let’s Encrypt)
  3. Configure reverse proxy (nginx)

Maintenance:

  • Monitor disk space
  • Update software regularly
  • Backup database
  • Monitor logs

Troubleshooting (3 minutes)

Common Issues

Feed is empty

  • Not connected to enough relays
  • Relays are down
  • Not following enough people

Fix:

  1. Check relay connections
  2. Add more popular relays
  3. Follow more people

Posts not showing up

  • Relay rejected post (rate limit, content policy)
  • Client not broadcasting
  • Network issues

Fix:

  1. Check relay policies
  2. Try different relay
  3. Restart client

Slow performance

  • Too many relays
  • Slow relays in list
  • Poor connection

Fix:

  1. Remove slow relays
  2. Stick to 5-10 quality relays
  3. Check internet connection

Can’t connect to relay

  • Relay is down
  • URL is wrong
  • Firewall blocking

Fix:

  1. Check relay status on nostr.watch
  2. Verify URL format (wss://)
  3. Try different network

Monitoring Tools

  • nostr.watch - Relay uptime and stats
  • nostr.info - Relay directory and info
  • Client relay status - Most clients show connection status

When to Switch Relays

Switch if:

  • Frequently offline
  • Very slow
  • Censoring content you care about
  • Better alternatives available

Don’t switch just because:

  • One missed post
  • Temporary slowdown
  • Minor inconvenience

Quick Reference

Essential Free Relays:

  • wss://relay.damus.io
  • wss://nos.lol
  • wss://relay.snort.social

Recommended Count: 5-10 relays

Relay Format: wss://domain.com (must start with wss://)

Monitoring: nostr.watch for uptime stats

Support: Add 1-2 paid relays if you’re serious about Nostr


Test Your Relay Management Skills

Think you understand advanced relay concepts?

Advanced Relay Quiz

Relay Types

Question 1 of 5

0/5 answered
What's the main difference between free and paid relays?
Good to Know