# kindexr A Nostr-native Torznab indexer. Subscribes to NIP-35 torrent events on the Nostr relay network and serves them through the Torznab API that Sonarr, Radarr, Lidarr, Readarr, and Prowlarr already speak. Fills the same slot as Jackett or Prowlarr — it sits between Nostr and your *arr apps. Not a frontend, not a relay, not a downloader. ## What it does - Connects to Nostr relays and indexes torrent posts into a local SQLite database - Serves that content through the Torznab API for Sonarr, Radarr, etc. - Enriches metadata via TMDB so movies and TV shows match properly in *arr apps - Scores publishers based on who you follow on Nostr, with manual block controls - Watches qBittorrent or Deluge for finished downloads and posts them to Nostr automatically - Fetches publisher profiles so you see names and avatars instead of raw pubkeys - Web UI at `/ui` — dashboard, content browser, publisher management, publish queue, settings ## Quick start ### Build ```sh just build # produces target/release/kindexr and target/release/kindexr-cli ``` ### Configure ```sh sudo mkdir -p /etc/kindexr /var/lib/kindexr sudo cp deploy/kindexr.example.yaml /etc/kindexr/config.yaml sudo $EDITOR /etc/kindexr/config.yaml ``` Create the service user: ```sh sudo useradd --system --no-create-home --shell /usr/sbin/nologin kindexr sudo chown kindexr:kindexr /var/lib/kindexr ``` ### Install and start ```sh sudo just install sudo systemctl daemon-reload sudo systemctl enable --now kindexr sudo journalctl -u kindexr -f ``` ### Verify ```sh curl http://localhost:9117/health # {"status":"ok","version":"0.1.0","db_ok":true,"relays_configured":7,"relays_connected":7,"uptime_seconds":12} ``` ### Add to Sonarr / Radarr / Prowlarr Add kindexr as a Torznab indexer: - URL: `http://127.0.0.1:9117` (or your public URL if behind nginx) - API key: generate one at `/ui/settings` or run `kindexr-cli apikey create --label sonarr` ## Publishing to Nostr kindexr can watch a torrent client for finished downloads and post them to Nostr automatically. ### qBittorrent ```yaml publisher: enabled: true identity: nsec: "nsec1..." qbittorrent: url: "http://127.0.0.1:8080" username: "admin" password: "yourpassword" poll_interval_secs: 60 categories: ["publish-nostr"] # empty = publish everything that finishes ``` ### Deluge Enable the Web UI plugin in Deluge preferences and log in at least once in a browser to set a password. Then: ```yaml publisher: enabled: true identity: nsec: "nsec1..." deluge: enabled: true url: "http://127.0.0.1:8112" password: "yourpassword" poll_interval_secs: 60 labels: ["publish-nostr"] # empty = publish everything that finishes ``` ### Manual publish ```sh kindexr-cli publish --from /path/to/file.torrent kindexr-cli publish --from /path/to/directory/ # scans for all .torrent files ``` ## CLI ```sh # API keys kindexr-cli apikey create --label sonarr # Publisher identity (needed for publishing to Nostr) kindexr-cli identity init # generate a fresh keypair kindexr-cli identity init --nsec nsec1... # import an existing key kindexr-cli identity info # show the current key # Publishers kindexr-cli publisher list kindexr-cli publisher block kindexr-cli publisher unblock kindexr-cli publisher trust --score 0.8 ``` ## Configuration See `deploy/kindexr.example.yaml` for the full reference. Config loads in order: **defaults → YAML file → environment variables → Settings UI**. Environment variables use the `KINDEXR_` prefix with `_` as the separator: ```sh KINDEXR_LOGGING_LEVEL=debug kindexr --config /etc/kindexr/config.yaml ``` ## Web UI Available at `http://localhost:9117/ui`: | Page | Path | Description | |---|---|---| | Dashboard | `/ui` | Relay connection status, stats, recently indexed | | Content | `/ui/indexed` | Browse and search all indexed torrents | | Publishers | `/ui/publishers` | Publisher list with trust scores, block controls | | Published | `/ui/published` | Posts you've published and the pending queue | | Settings | `/ui/settings` | All config, API key management | ## Nginx For public access put kindexr behind nginx. See `deploy/nginx.conf.example` for a ready-to-use config with TLS. ## Development ```sh just build # cargo build --release just test # cargo test just check # clippy + fmt check just dev # run with kindexr.dev.yaml and RUST_LOG=info ``` ## Architecture See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full design. ## License MIT