Ekaii fork of Hydra: tracks upstream + carries our [bench] fix on branch ekaii; CI builds a patched image to the Forgejo registry.
  • Go 60.4%
  • Rust 17.8%
  • JavaScript 14.4%
  • CSS 3.7%
  • HTML 3.2%
  • Other 0.4%
Find a file
2026-08-14 04:18:06 +00:00
.ekaii ekaii: git-only sync CI + host build script + docs 2026-08-14 04:18:06 +00:00
.forgejo/workflows ekaii: git-only sync CI + host build script + docs 2026-08-14 04:18:06 +00:00
.github ci(release): build the engine inside Alpine so musl is a real toolchain 2026-08-13 14:43:50 +02:00
cmd fix(bench): bound race_snapshots growth with a configurable [bench] section 2026-08-14 04:18:06 +00:00
configs fix(bench): bound race_snapshots growth with a configurable [bench] section 2026-08-14 04:18:06 +00:00
docs feat(engine): bound outbound dials, add a startup pause, enforce max_connections 2026-08-12 22:49:19 +02:00
internal fix(bench): bound race_snapshots growth with a configurable [bench] section 2026-08-14 04:18:06 +00:00
packaging fix(cli): accept --config on reset-password, and refuse a misplaced subcommand 2026-08-13 15:18:54 +02:00
proto Hydra — high-scale BitTorrent engine (initial public release) 2026-07-28 14:10:12 +02:00
scripts ekaii: git-only sync CI + host build script + docs 2026-08-14 04:18:06 +00:00
third_party fix(windows): patch librqbit-dht for SIO_UDP_CONNRESET + tolerate os error 10054 in reader (DHT binds tokio UdpSocket directly, bypassing the dualstack fork) 2026-07-31 11:32:26 +02:00
typhon-engine fix(release): build the engine static against musl so the tarballs run anywhere 2026-08-13 13:45:26 +02:00
vendor Hydra — high-scale BitTorrent engine (initial public release) 2026-07-28 14:10:12 +02:00
web feat(import): import stopped by default, and fix the wizard's wording 2026-08-13 17:13:29 +02:00
.dockerignore feat(ui): column visibility, changelog tab, update badge 2026-07-29 22:40:37 +02:00
.gitignore chore(gitignore): actually ignore manual backup files 2026-08-10 18:12:19 +02:00
CHANGELOG.md feat(import): import stopped by default, and fix the wizard's wording 2026-08-13 17:13:29 +02:00
docker-compose.yml fix(engine): flush resume data on shutdown, and make the budget configurable 2026-08-13 11:30:07 +02:00
Dockerfile build: keep the Go build cache between image builds 2026-08-11 08:44:38 +02:00
embed.go feat: zero-setup start (find/generate config next to the binary) 2026-07-30 23:12:46 +02:00
entrypoint.sh feat(docker): PUID/PGID support so Hydra stops writing files as root [linux] 2026-08-07 18:41:43 +02:00
go.mod Hydra — high-scale BitTorrent engine (initial public release) 2026-07-28 14:10:12 +02:00
go.sum Hydra — high-scale BitTorrent engine (initial public release) 2026-07-28 14:10:12 +02:00
LICENSE Hydra — high-scale BitTorrent engine (initial public release) 2026-07-28 14:10:12 +02:00
README.md fix(engine): flush resume data on shutdown, and make the budget configurable 2026-08-13 11:30:07 +02:00
SECURITY.md ci: prune container images from a checked plan after every release 2026-08-10 22:37:18 +02:00

Hydra

A self-hosted BitTorrent daemon built for scale and seeding: a Go control plane driving a purpose-built Rust engine ("Typhon"). Hydra holds 100k+ torrents in a single instance, exposes a live web UI, a native REST API, and a qBittorrent-compatible shim so your existing *arr / autobrr / cross-seed setup just works.

Status: Hydra is being opened up from a private homelab project. It is used in production but some rough edges remain; issues and PRs welcome.


Why Hydra?

  • Two engine roles. A race session (aggressive, low-latency, for hot downloads) and a hoard session (upload-optimized, for long-term seeding), each tuned independently. You can also run any number of extra engines.
  • Scales. Tens of thousands of torrents per instance, with a push-based (SSE) UI that streams the torrent list instead of shipping giant REST blobs.
  • Flexible networking. Direct, SOCKS5 egress, a lightweight PROXY-v2 relay (change your seedbox's public IP without a VPN tunnel), or gluetun with hot listen-port rebind (no restart when your VPN's forwarded port rotates).
  • Distributed. Run engines across several machines and aggregate them behind one front; route new torrents per-category with placement/strategy and a save-path per agent.
  • Data-aware adds. Add a torrent whose data is already on disk (a re-add, a cross-seed, or a half-finished download) and Hydra hash-checks what's there instead of blindly re-downloading over it: verified pieces are kept and served, the rest is fetched.
  • Drop-in. A qBittorrent v2 API shim means autobrr, Sonarr/Radarr, cross-seed, etc. talk to Hydra unchanged.

Screenshots

Overview — live dashboard: global up/down, seeding/leeching counts, per-session throughput, all streamed over SSE.

Overview

Race — per-torrent detail with live peer speed and progress timelines for the hot download you're racing.

Race timeline

Hoard — the long-term seeding set: tens of thousands of torrents in one virtualized, push-updated table.

Hoard

Agents — run engines across several machines and manage them from one front: status, free space, and per-engine roles.

Agents

Benchmark — built-in throughput history so you can see exactly what your box sustains.

Benchmark


Give Hydra time to stop

On SIGTERM Hydra saves its store and then asks each engine to flush its resume data. Docker kills a container ten seconds after SIGTERM by default, which is not enough to get through both engines: the flush is cut short and the next start re-checks pieces that were already complete.

The bundled docker-compose.yml sets stop_grace_period: 30s for you. If you run Hydra with a plain docker run, pass the same budget yourself:

docker run --stop-timeout 30 ...      # and: docker stop -t 30 hydra

Each engine gets ten seconds of that budget, and the two are stopped one after the other. If you hold several hundred thousand torrents the sweep takes longer -- raise HYDRA_STOP_TIMEOUT (e.g. 45s) and keep the supervisor's grace period above twice that.


Documentation

Install steps, architecture, every networking mode and the edge cases live in the Wiki:

API reference: docs/API.md. Companion VPS relay: hydra-relay.


License

Hydra is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE. In short: you're free to run, study, modify, and share it, including self-hosting a modified version, but if you offer a modified Hydra to others over a network, you must make your source available under the same license.