Production Relay
Connect to Shugur Relay
Connect to our distributed HA relay cluster - single endpoint, automatic failover, full redundancy
WebSocketConnectionProduction
What you'll learn:
Connection Details
Connection Examples
Troubleshooting
Connection Details
Single connection point to our distributed relay cluster
Shugur Relay Details
WebSocket URL:
wss://shu01.shugur.net
Status: Production Ready
Uptime: 99.9%+
Supported NIPs: 1, 2, 3, 4, 7, 9, 11, 12, 15, 16, 20, 25, 26, 28, 33, 40, 42, 50, 51, 65
Connection Requirements
- • WebSocket support in your client
- • Valid Nostr event format
- • Proper event signing
- • Rate limiting compliance
Sequence Diagram
Loading chart...
Legend: Client opens WS, subscribes with REQ; Relay streams EVENTs until EOSE; Client publishes EVENT; Relay returns OK.
Connection Examples
Code examples in different programming languages
JavaScript
import { relayInit } from 'nostr-tools'
const relay = relayInit('wss://shu01.shugur.net')
relay.on('connect', () => {
console.log('Connected to Shugur relay!')
})
relay.on('error', () => {
console.log('Failed to connect')
})
await relay.connect()
Python
import asyncio
import websockets
from nostr.tools import relay_init
async def connect():
relay = relay_init('wss://shu01.shugur.net')
await relay.connect()
print('Connected to Shugur relay!')
return relay
relay = asyncio.run(connect())
Troubleshooting
Common issues and solutions
Connection Timeout
If you experience connection timeouts, check your network configuration and firewall settings.
Authentication Errors
Ensure your events are properly signed and follow the Nostr protocol specification.
Rate Limiting
Respect rate limits to avoid being temporarily blocked. Implement exponential backoff for retries.
Ready to Connect?
You're now ready to connect to Shugur relay. Here's what to explore next: