selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

nostr-watch logo

Self-host nostr-watch

worker-relay@v1.3.0

Nostr relay monitoring stack implementing NIP-66

AlphaOpen SourceMIT
Updatedlast year
LanguageTypescript
Setup difficultyAdvanced
Stars
199
Docker
nostrwatch/relaymon
Install with Docker Compose

What is nostr-watch?

This project provides a TypeScript toolkit for watching Nostr relays. It crawls the network, runs health checks on each relay, and publishes the findings as NIP-66 events. Operators can run the monitoring stack themselves using the supplied Docker Compose files, which bundle the relay monitor, a crawler that discovers new relays, a web dashboard, and a state machine offering REST and MCP interfaces. The system works on clearnet, Tor, and I2P. Every component is currently in alpha and the work is funded by an OpenSats grant.

Should you self-host nostr-watch?

nostr-watch scores 42/100 on selfhost.directory (how scoring works) and ranks #84 of 104 in Monitoring & observability. It has 199 GitHub stars.

It shipped 3 stable releases in the past year. The latest, nocap-info-adapter-default@v1.2.0, came out on 11 March 2026.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is grafana (90/100, 77 569 stars). It scores higher overall, so compare the two before you pick. See nostr-watch vs grafana side by side.

Features

  • Browser-based Relay Scanneralpha status
  • Browser Extensionalpha status
  • Docker Compose Stacks
  • Multi-network support
  • Negentropy Set Reconciliationalpha status
  • Relay Capability Discovery (nocap)alpha status
  • Relay Discovery & Crawling
  • Relay Health Checks
  • Relay State Aggregation (route66)alpha status
  • Relay State Machine (rstate)alpha status
  • Relay Validation (auditor)alpha status
  • Web Dashboard (GUI)alpha status
  • Worker Relayalpha status

nostr-watch README

How to install nostr-watch

Install nostr-watch with Docker Compose

Environment variables
RELAYMON_NSEC (required), RELAYMON_KUMA_PUSH_URL, RELAYMON_KUMA_BASE_URL, RELAYMON_KUMA_TOKEN, RELAYMON_HEALTH_AUTH_TOKEN, RELAYMON_MODE, RELAYMON_CONFIG_PATH, RELAYMON_DB_PATH, RELAYMON_SKIP_PID_CHECK, TRAWLER_CONFIG_PATH, TRAWLER_DB_PATH, DEAMON_PUBKEY, DEAMON_PRIVKEY, REDIS_HOST, REDIS_PORT, REDIS_DB, REDIS_PASSWORD

1. Choose a stack

cd apps/docker-stacks/relaymon-clearnet

2. Copy sample files and edit with your values

cp .env.example .env cp config.yaml.example config.yaml

3. Edit .env — at minimum, set RELAYMON_NSEC

Edit config.yaml — set your monitor slug, owner pubkey, and seed relays

4. Start the stack

docker compose up -d

5. View logs

docker compose logs -f

Multiple stacks available: relaymon-clearnet, relaymon-vpn, relaymon-multinet, trawler-relaymon-clearnet, trawler-relaymon-multinet

How to configure nostr-watch

  • DEAMON_PRIVKEYDaemon private key for signing

    Daemon private key for signing

    values: privkey

  • DEAMON_PUBKEYDaemon public key for publishing relay lists

    Daemon public key for publishing relay lists

    values: pubkey

  • REDIS_DB0Redis database number

    Redis database number

    values: number

  • REDIS_HOSTlocalhostRedis host

    Redis host

    values: host

  • REDIS_PASSWORDRedis password

    Redis password

    values: password

  • REDIS_PORT6379Redis port

    Redis port

    values: port

  • RELAYMON_CONFIG_PATH/opt/config.yamlPath to config file inside container

    Path to config file inside container

    values: path

  • RELAYMON_DB_PATH/opt/data/relays.dbPath to RelayMon's SQLite database inside container

    Path to RelayMon's SQLite database inside container

    values: path

  • RELAYMON_HEALTH_AUTH_TOKENAuth token for the health HTTP endpoint

    Auth token for the health HTTP endpoint

    values: token

  • RELAYMON_KUMA_BASE_URLUptime Kuma base URL (used with RELAYMON_KUMA_TOKEN)

    Uptime Kuma base URL (used with RELAYMON_KUMA_TOKEN)

    values: URL

  • RELAYMON_KUMA_PUSH_URLFull Uptime Kuma push URL for health monitoring

    Full Uptime Kuma push URL for health monitoring

    values: URL

  • RELAYMON_KUMA_TOKENUptime Kuma push token

    Uptime Kuma push token

    values: token

  • RELAYMON_MODEclearnetNetwork mode for relay monitoring (clearnet, multinet)

    Network mode for relay monitoring (clearnet, multinet)

    values: clearnet, multinet

  • RELAYMON_NSECPrivate key for signing NIP-66 events and monitor announcements (nsec1... or hex)

    Private key for signing NIP-66 events and monitor announcements (nsec1... or hex)

    values: nsec1... or hex

  • RELAYMON_SKIP_PID_CHECKtrueSkip PID file check (needed in containers)

    Skip PID file check (needed in containers)

    values: true, false

  • TRAWLER_CONFIG_PATH/opt/trawler-config.yamlTrawler config path inside container

    Trawler config path inside container

    values: path

  • TRAWLER_DB_PATH/opt/data/trawler.dbTrawler database path inside container

    Trawler database path inside container

    values: path

nostr-watch releases & version history

More in Network Monitoring

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…