NIP-11

Relay Information Document

final relay

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.

Author
scsibug
Last Updated
31 January 2026
Official Spec
View on GitHub →

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

FieldTypeDescription
namestringRelay name
descriptionstringDescription of the relay
pubkeystringAdmin’s public key
contactstringContact info (email, etc.)
softwarestringRelay software name
versionstringSoftware 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

FieldDescription
max_message_lengthMaximum WebSocket message size (bytes)
max_content_lengthMaximum event content length
max_event_tagsMaximum number of tags per event

Subscription Limits

FieldDescription
max_subscriptionsMaximum concurrent subscriptions
max_filtersMaximum filters per subscription
max_limitMaximum limit in filter queries
max_subid_lengthMaximum subscription ID length

Other Limits

FieldDescription
min_prefixMinimum hex prefix for ID queries
min_pow_difficultyRequired proof-of-work difficulty
auth_requiredWhether NIP-42 auth is required
payment_requiredWhether 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

TypeDescription
admissionOne-time fee to use relay
subscriptionRecurring fee (period in seconds)
publicationFee 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:

  1. For search - Check supported_nips includes 50
  2. For large content - Check max_content_length
  3. For authentication - Check auth_required
  4. For paid features - Check payment_required

For Relay Operators

Implementing NIP-11

  1. Create info document with your relay’s details
  2. Serve at relay URL with Accept: application/nostr+json
  3. Keep updated as capabilities change
  4. 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:

damus primal amethyst snort coracle nostrudel all-relays
View all clients →

Related NIPs

NIP-01 NIP-42 NIP-50
← Browse All NIPs