Relay Information Document
NIP-11 allows relays to publish a JSON document describing their features, supported NIPs, limitations, and operator information. Clients use this to understand what each relay offers.
NIP-11: Relay Information Document
Status: Final Author: scsibug Category: Relay
Overview
NIP-11 defines how relays publish information about themselves. When you request a relay’s URL with an Accept: application/nostr+json header, it returns a JSON document describing:
- Relay name and description
- Supported NIPs
- Limitations (event size, rate limits, etc.)
- Payment requirements
- Contact information
This helps clients choose appropriate relays and adapt behavior based on relay capabilities.
Why NIP-11 Matters
For Clients
- Feature detection - Know what NIPs a relay supports
- Error prevention - Avoid sending unsupported event kinds
- User information - Display relay details to users
- Optimization - Choose best relays for specific tasks
For Relay Operators
- Announce capabilities - Tell the world what you support
- Set expectations - Publish limitations upfront
- Professional presence - Provide contact info and policies
How to Access
HTTP Request
curl -H "Accept: application/nostr+json" https://relay.example.com
Response
{
"name": "Example Relay",
"description": "A fast, reliable Nostr relay",
"pubkey": "relay_operator_pubkey",
"contact": "admin@example.com",
"supported_nips": [1, 2, 4, 9, 11, 12, 15, 16, 20, 22, 33, 40],
"software": "nostr-rs-relay",
"version": "0.8.0",
"limitation": {
"max_message_length": 16384,
"max_subscriptions": 20,
"max_filters": 100,
"max_limit": 5000,
"max_subid_length": 100,
"min_prefix": 4,
"max_event_tags": 100,
"max_content_length": 8196,
"min_pow_difficulty": 0,
"auth_required": false,
"payment_required": false
}
}
Standard Fields
Basic Information
| Field | Type | Description |
|---|---|---|
name | string | Relay name |
description | string | Description of the relay |
pubkey | string | Admin’s public key |
contact | string | Contact info (email, etc.) |
software | string | Relay software name |
version | string | Software version |
Supported NIPs
{
"supported_nips": [1, 2, 4, 9, 11, 15, 20, 22, 28, 33, 40, 42, 50]
}
This array lists all NIPs the relay implements.
Limitations Object
The limitation field describes relay limits:
Size Limits
| Field | Description |
|---|---|
max_message_length | Maximum WebSocket message size (bytes) |
max_content_length | Maximum event content length |
max_event_tags | Maximum number of tags per event |
Subscription Limits
| Field | Description |
|---|---|
max_subscriptions | Maximum concurrent subscriptions |
max_filters | Maximum filters per subscription |
max_limit | Maximum limit in filter queries |
max_subid_length | Maximum subscription ID length |
Other Limits
| Field | Description |
|---|---|
min_prefix | Minimum hex prefix for ID queries |
min_pow_difficulty | Required proof-of-work difficulty |
auth_required | Whether NIP-42 auth is required |
payment_required | Whether payment is required |
Payment Information
Paid relays can include payment details:
{
"payments_url": "https://relay.example.com/payments",
"fees": {
"admission": [{"amount": 1000, "unit": "sats"}],
"subscription": [{"amount": 100, "unit": "sats", "period": 2592000}],
"publication": [{"amount": 1, "unit": "sats"}]
}
}
Fee Types
| Type | Description |
|---|---|
admission | One-time fee to use relay |
subscription | Recurring fee (period in seconds) |
publication | Fee per event published |
Icon and Branding
Relays can include visual branding:
{
"icon": "https://relay.example.com/favicon.png"
}
Checking Relay Info in Code
JavaScript Example
async function getRelayInfo(relayUrl) {
const httpUrl = relayUrl.replace('wss://', 'https://').replace('ws://', 'http://');
const response = await fetch(httpUrl, {
headers: { 'Accept': 'application/nostr+json' }
});
if (!response.ok) throw new Error('Failed to fetch relay info');
return await response.json();
}
// Usage
const info = await getRelayInfo('wss://relay.example.com');
console.log(`Relay: ${info.name}`);
console.log(`Supported NIPs: ${info.supported_nips.join(', ')}`);
Client Usage
Feature Detection
const info = await getRelayInfo(relayUrl);
// Check if relay supports NIP-50 search
const supportsSearch = info.supported_nips?.includes(50);
// Check if auth is required
const needsAuth = info.limitation?.auth_required;
// Check message size limit
const maxSize = info.limitation?.max_content_length || 8196;
Relay Selection
Use NIP-11 to choose appropriate relays:
- For search - Check
supported_nipsincludes 50 - For large content - Check
max_content_length - For authentication - Check
auth_required - For paid features - Check
payment_required
For Relay Operators
Implementing NIP-11
- Create info document with your relay’s details
- Serve at relay URL with
Accept: application/nostr+json - Keep updated as capabilities change
- Include contact info for user support
Example Configuration (nostr-rs-relay)
[info]
name = "My Relay"
description = "A personal Nostr relay"
pubkey = "your_pubkey_here"
contact = "admin@example.com"
Tools
nostr.watch
nostr.watch uses NIP-11 to display:
- Relay health and uptime
- Supported NIPs
- Geographic location
- Payment requirements
Relay Testing
Many clients show relay info in settings:
- Connection status
- Supported features
- Limitations
- Operator info
Common Questions
What if a relay doesn’t support NIP-11?
Clients should handle missing info gracefully. Assume basic NIP-01 support and handle errors for unsupported features.
How often should I check relay info?
Cache the info and check periodically (hourly is reasonable). Relay capabilities rarely change.
Can relay info be verified?
The pubkey field allows signing announcements, but currently the info document itself isn’t signed. Trust depends on HTTPS and relay reputation.
Summary
NIP-11 enables relay discovery and feature detection:
- Clients understand what relays offer
- Operators advertise their capabilities
- Users make informed relay choices
- Ecosystem becomes more interoperable
Every relay should implement NIP-11 for a better Nostr experience.
Last updated: January 2026 Official specification: GitHub
Client Support
This NIP is supported by the following clients: