Private BitTorrent tracker in Elixir.
| b1tpoti0n | Ocelot (C++) | Chihaya (Go) | |
|---|---|---|---|
| Zero-config start | SQLite default | MySQL required | External storage required |
| Private tracker features | Built-in | Requires Gazelle | Middleware plugins |
| Fault tolerance | OTP supervision | Manual | Manual |
| Hot code upgrades | Native | No | No |
| Clustering | Horde + Redis | No | Redis/etcd |
| WebSocket live stats | Built-in | No | No |
| Admin REST API | Built-in | Via Gazelle | No |
Start simple, scale when needed. SQLite + in-memory peers for small communities. Swap to PostgreSQL + Redis when you want with config changes only.
Scalability is built into Elixir. Elixir runs on the Erlang VM (BEAM), designed for telecom systems handling millions of concurrent connections. Each torrent swarm runs in its own lightweight process. The VM handles scheduling across all CPU cores automatically. When one node isn't enough, just add more! Horde distributes swarm workers across the cluster transparently. See DOCUMENTATION.md for details.
Fault tolerance by default. OTP supervision trees restart crashed processes automatically. A bug in one swarm doesn't take down the tracker. Hot code upgrades let you deploy fixes without disconnecting peers.
Batteries included. HnR detection, bonus points, freeleech, ratio enforcement and client whitelist are all built-in. No separate daemons or plugins to maintain.
- HTTP/HTTPS tracker (BEP 3) with TLS 1.2+ and secure cipher suites
- UDP tracker (BEP 15) (public mode only, no user auth)
- Passkey authentication
- User ratio tracking
- Client whitelist
- IP banning (with CIDR support)
- Rate limiting (token bucket per IP)
- Hit-and-Run detection
- Bonus points system
- Freeleech and multipliers (with abuse prevention caps)
- Prometheus metrics
- SQLite or PostgreSQL database
- In-memory or Redis peer storage
- Clustering with Horde + libcluster
- Admin API with IP whitelist protection
- Real-time WebSocket stats
# Install dependencies
mix deps.get
# Setup database
mix ecto.create && mix ecto.migrate
# Start tracker
iex -S mixDefault port: HTTP 8080 (UDP disabled by default, set udp_port to enable)
GET /:passkey/announce- AnnounceGET /:passkey/scrape- ScrapeGET /health- Health checkGET /stats- Basic statisticsGET /metrics- Prometheus metrics/admin/*- Admin REST APIGET /ws- WebSocket (real-time updates)
See config/config.exs for all options.
Key settings:
http_port/https_port/udp_port- Network portsadmin_token- Admin API authentication (required in production)admin_api_ip_whitelist- Restrict admin API to specific IPstrust_x_forwarded_for- Enable when behind a trusted reverse proxypeer_storage-:memory(default) or:redisfor clusteringhnr- Hit-and-Run detection settingsbonus_points- Bonus points system settingsenforce_torrent_whitelist- Require torrent pre-registrationstats_endpoint/metrics_endpoint- Protection for monitoring endpoints
For production, set environment variables (see DOCUMENTATION.md):
ADMIN_TOKEN,HTTP_PORT,UDP_PORT,DATABASE_URL,ADMIN_API_IP_WHITELIST, etc.
See DOCUMENTATION.md for complete documentation including:
- Full configuration reference
- Architecture overview
- Admin API reference
- Deployment guide
A standalone admin interface is available at admin-ui/index.html.
Live Demo — UI preview (not connected to a tracker)
mix testAGPL-3.0 — If you modify and run this on a server, you must share your changes. If you don't, I'll hunt you down.
