Skip to content

fix(installer): Windows service runs sync-only by default - #14

Open
thedancingdeveloper wants to merge 1 commit into
mainfrom
fix/windows-installer-sync-only
Open

thedancingdeveloper wants to merge 1 commit into
mainfrom
fix/windows-installer-sync-only

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Collaborator

Why

The Windows service was registered as indexarr.exe --service --all, which starts the DHT crawler, resolver and announcer directly on the host's public address. TrackerDiscovery (resolver) announces every resolved hash to trackers with announce_port = INDEXARR_DHT_BASE_PORT (6881), and the crawler/announcer do the equivalent over DHT. A desktop install therefore seeds <public-ip>:6881 (and the host's IPv6) into every swarm it touches; the inbound TCP/UDP flood to :6881 continues for days after the service is removed.

This was traced on a real install (2026-07-20 → 2026-09-03) that left ~180 SYN/s to WAN:6881 from ~2,600 distinct peers per 2 min, still steady four days after uninstall.

Change

  • installer/windows.nsi: service command line is --service --port <port> (no --all) on both the create and upgrade (sc config) paths, so the worker set comes from .env.
  • installer/setup.ps1: the generated .env sets INDEXARR_WORKERS=http_server,sync — the same sync-only mode as docker-compose.sync.yml — with a comment explaining how to opt into crawling (INDEXARR_WORKERS=http_server,dht_crawler,resolver,announcer,sync, behind a VPN).
  • readme.md: documents the Windows default and the opt-in.

.env is rewritten on every install, so existing installs pick this up on upgrade; the shortcut/Explorer launch path reads the same .env, so both launch modes agree.

Not verified

No Windows build was run for this PR (installer is built by the tag pipeline). The change is confined to the two command-line strings and the .env template; INDEXARR_WORKERS parsing (env_csv_or) is unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_016EJyS2g3x5AKm9nMXu2WH4

The Windows service was registered with `--all`, which starts the DHT
crawler, resolver and announcer on the machine's real public address.
The resolver announces every hash it resolves to trackers with port 6881,
and the crawler/announcer do the same over DHT, so a desktop install seeds
`<public-ip>:6881` into thousands of swarms and keeps receiving inbound
peer connection attempts for days after it is stopped.

Drop `--all` from the service command line and let the worker set come
from `INDEXARR_WORKERS` in the generated `.env`, defaulting to
`http_server,sync` (the same mode as docker-compose.sync.yml). Crawling
stays available as a documented opt-in by editing `.env`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EJyS2g3x5AKm9nMXu2WH4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant