lighthouse

module
v0.0.0-...-3397cd8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: MIT

README

Lighthouse

Self-hosted Nostr indexer for NIP-35 torrent events with federated curation. Comes with a Torznab API so it works with Prowlarr, Sonarr, Radarr, and other *arr apps.

Full Documentation | Quick Start | API Reference

Disclaimer

This software is a Nostr protocol indexer that reads publicly available NIP-35 events from Nostr relays. It does not host, distribute, or provide access to any copyrighted content. The software merely indexes metadata published on the decentralized Nostr network. Users are solely responsible for their use of this software and must comply with all applicable laws in their jurisdiction.

Note: To fully understand the context and use case behind Lighthouse, please read the whitepaper first.

What it does

  • Indexes NIP-35 (Kind 2003) events from Nostr relays
  • Publish metadata events to Nostr relays (parses .torrent file headers only)
  • Filter what is indexed based on tags
  • Web of Trust filtering - only see content from people you trust
  • Federated curation- trust curators who apply moderation rulesets
  • Verification decisions - cryptographically signed accept/reject decisions
  • Report/appeal system - formal channels for content moderation
  • Comments - NIP-35 compatible comment system (Kind 2004)
  • Torznab API for seamless *arr apps integration
  • Auto-fetches metadata from TMDB/OMDB
  • Single Go binary + SQLite, runs anywhere
  • Web UI built with Svelte

Quick start

Needs Go 1.22+ and Node.js 20+

git clone https://github.com/gmonarque/lighthouse.git
cd lighthouse
make build
./build/lighthouse
Docker
git clone https://github.com/gmonarque/lighthouse.git
cd lighthouse
docker-compose up -d

Open http://localhost:9999

Configuration

Lighthouse uses config.yaml. A default one is created on first run:

server:
  host: "0.0.0.0"
  port: 9999
  api_key: ""  # auto-generated

database:
  path: "./data/lighthouse.db"

nostr:
  identity:
    npub: ""
    nsec: ""
  relays:
    - url: "wss://relay.damus.io"
      enabled: true

trust:
  depth: 1  # 0=whitelist only, 1=follows, 2=follows of follows

enrichment:
  tmdb_api_key: ""
  omdb_api_key: ""
  enabled: true
Environment variables

Override any setting with LIGHTHOUSE_ prefix:

LIGHTHOUSE_SERVER_PORT=8080
LIGHTHOUSE_ENRICHMENT_TMDB_API_KEY=your_key

Using with *arr apps

  1. Complete the setup wizard at http://localhost:9999
  2. Go to Settings and copy your API key
  3. In Prowlarr/Sonarr/Radarr, add a new indexer:
    • Type: Torznab
    • URL: http://localhost:9999/api/torznab
    • API Key: paste from step 2
  4. Test and save

Web of Trust

Controls what content shows up based on who uploaded it:

Depth What you see
0 Only whitelisted uploaders
1 Whitelist + people you follow on Nostr
2 Above + friends of friends (use carefully)

From the Trust page you can:

  • Whitelist: manually add trusted uploaders by npub
  • Blacklist: block bad actors (removes all their torrents)
  • Import follows: pull your Nostr contact list

Categories

Full Torznab category support with subcategories.

API Reference

REST API
Endpoint Method Description
/api/stats GET Dashboard statistics
/api/search GET Search torrents
/api/torrents/:id GET Torrent details
/api/torrents/:id DELETE Remove torrent
/api/publish/parse-torrent POST Parse .torrent file
/api/publish POST Publish torrent to relays
/api/trust/whitelist GET/POST/DELETE Manage whitelist
/api/trust/whitelist/{npub}/discover-relays POST Discover user's relays (NIP-65)
/api/trust/blacklist GET/POST/DELETE Manage blacklist
/api/relays GET/POST/PUT/DELETE Manage relays
/api/settings GET/PUT App settings
/api/indexer/start POST Start indexer
/api/indexer/stop POST Stop indexer
/api/indexer/resync POST Resync historical events
Torznab API
Endpoint Parameters Description
/api/torznab?t=caps - Capabilities
/api/torznab?t=search q, cat, limit General search
/api/torznab?t=tvsearch q, season, ep TV search
/api/torznab?t=movie q, imdbid, tmdbid Movie search

Federated Curation

Lighthouse supports federated content curation through trusted curators:

Component Description
Curators Trusted entities that review and validate content
Rulesets Versioned moderation policies (censoring + semantic)
Decisions Cryptographically signed accept/reject decisions
Aggregation Combine decisions from multiple curators (quorum, weighted, etc.)

See Curation Documentation for setup instructions.

Project structure

lighthouse/
├── cmd/lighthouse/        # entry point
├── internal/
│   ├── api/              # HTTP handlers & router
│   ├── comments/         # torrent comments
│   ├── config/           # configuration
│   ├── curator/          # curation engine
│   ├── database/         # SQLite & migrations
│   ├── decision/         # verification decisions
│   ├── explorer/         # relay event discovery
│   ├── indexer/          # torrent indexing
│   ├── models/           # shared data models
│   ├── moderation/       # reports & appeals
│   ├── nostr/            # Nostr client & events
│   ├── relay/            # Nostr relay server
│   ├── ruleset/          # rule engine
│   ├── torznab/          # Torznab protocol
│   └── trust/            # Web of Trust
├── web/                  # Svelte frontend
├── docs/                 # documentation
└── docker/               # Docker stuff

Development

make deps          # install dependencies
make dev           # backend with hot reload
make dev-frontend  # frontend dev server (separate terminal)
make test          # run tests
make build         # production build
make docker        # build docker image

Documentation

License

MIT

Directories

Path Synopsis
cmd
lighthouse command
internal
api
api/apikeys
Package apikeys implements multi-user API key management
Package apikeys implements multi-user API key management
comments
Package comments handles torrent comments (NIP-35 Kind 2004)
Package comments handles torrent comments (NIP-35 Kind 2004)
curator
Package curator provides content curation functionality
Package curator provides content curation functionality
decision
Package decision handles verification decisions from curators
Package decision handles verification decisions from curators
explorer
Package explorer handles discovery and collection of torrent events from Nostr relays.
Package explorer handles discovery and collection of torrent events from Nostr relays.
moderation
Package moderation handles reports and appeals
Package moderation handles reports and appeals
relay
Package relay implements a Nostr relay for torrent events
Package relay implements a Nostr relay for torrent events
ruleset
Package ruleset provides versioned rule definitions for content curation
Package ruleset provides versioned rule definitions for content curation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL