Self-hosted Nostr indexer for NIP-35 torrent events with federated curation
Complete configuration reference for Lighthouse.
Lighthouse uses config.yaml in the working directory. A default configuration is created on first run.
server:
host: "0.0.0.0"
port: 9999
api_key: "" # auto-generated if empty
database:
path: "./data/lighthouse.db"
nostr:
identity:
npub: "" # your public key
nsec: "" # your private key (keep secret!)
relays:
- url: "wss://relay.damus.io"
name: "Damus"
preset: "public"
enabled: true
trust:
depth: 1 # 0=whitelist only, 1=follows, 2=follows of follows
indexer:
tag_filter: []
tag_filter_enabled: false
enrichment:
enabled: true
tmdb_api_key: ""
omdb_api_key: ""
| Option | Type | Default | Description |
|---|---|---|---|
host |
string | "0.0.0.0" |
Listen address |
port |
integer | 9999 |
Listen port |
api_key |
string | (generated) | API key for Torznab authentication |
| Option | Type | Default | Description |
|---|---|---|---|
path |
string | "./data/lighthouse.db" |
SQLite database file path |
| Option | Type | Default | Description |
|---|---|---|---|
identity.npub |
string | "" |
Your Nostr public key (npub format) |
identity.nsec |
string | "" |
Your Nostr private key (nsec format) |
Security Note: Keep your nsec private! Never share it or commit it to version control.
Relays are configured as an array:
nostr:
relays:
- url: "wss://relay.example.com"
name: "My Relay"
preset: "public"
enabled: true
| Option | Type | Description |
|---|---|---|
url |
string | WebSocket URL of the relay |
name |
string | Display name |
preset |
string | Category: public, private, censorship-resistant |
enabled |
boolean | Whether to connect to this relay |
| Option | Type | Default | Description |
|---|---|---|---|
depth |
integer | 1 |
Web of Trust depth |
Trust depth values:
| Depth | Behavior |
|---|---|
0 |
Only whitelisted publishers |
1 |
Whitelist + people you follow |
2 |
Above + friends of friends |
| Option | Type | Default | Description |
|---|---|---|---|
tag_filter |
array | [] |
Tags to filter (include only these) |
tag_filter_enabled |
boolean | false |
Enable tag filtering |
When tag filtering is enabled, only torrents with matching tags are indexed.
| Option | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | true |
Enable metadata enrichment |
tmdb_api_key |
string | "" |
The Movie Database API key |
omdb_api_key |
string | "" |
Open Movie Database API key |
Override any configuration option using environment variables with the LIGHTHOUSE_ prefix.
Convert the YAML path to uppercase with underscores:
server.port → LIGHTHOUSE_SERVER_PORTnostr.identity.npub → LIGHTHOUSE_NOSTR_IDENTITY_NPUBenrichment.tmdb_api_key → LIGHTHOUSE_ENRICHMENT_TMDB_API_KEY# Change port
export LIGHTHOUSE_SERVER_PORT=8080
# Set API keys
export LIGHTHOUSE_ENRICHMENT_TMDB_API_KEY=your_key_here
export LIGHTHOUSE_ENRICHMENT_OMDB_API_KEY=your_key_here
# Set trust depth
export LIGHTHOUSE_TRUST_DEPTH=2
# Run
./lighthouse
# docker-compose.yml
services:
lighthouse:
image: lighthouse
environment:
- LIGHTHOUSE_SERVER_PORT=9999
- LIGHTHOUSE_TRUST_DEPTH=1
- LIGHTHOUSE_ENRICHMENT_TMDB_API_KEY=your_key
Some settings can be changed at runtime through the web UI:
The default data directory is ./data/. It contains:
| File | Description |
|---|---|
lighthouse.db |
SQLite database with all indexed data |
# Stop the service first
sqlite3 ./data/lighthouse.db ".backup ./data/backup.db"
Change the database location:
database:
path: "/var/lib/lighthouse/lighthouse.db"
The API key is used for:
Best practices:
Your nsec is your Nostr identity. Protect it:
server:
port: 9999
database:
path: "./data/lighthouse.db"
trust:
depth: 1
server:
host: "127.0.0.1" # Behind reverse proxy
port: 9999
database:
path: "/var/lib/lighthouse/lighthouse.db"
trust:
depth: 1
enrichment:
enabled: true
server:
port: 9999
trust:
depth: 0 # Strict whitelist
indexer:
tag_filter_enabled: true
tag_filter:
- movies
- tv
# Check database integrity
sqlite3 ./data/lighthouse.db "PRAGMA integrity_check;"
# Vacuum to optimize
sqlite3 ./data/lighthouse.db "VACUUM;"
# Fix ownership
chown -R lighthouse:lighthouse /opt/lighthouse
# Fix permissions
chmod 600 config.yaml
chmod 700 data/