{"id":51040198,"url":"https://github.com/team-tritan/torrent-tracker","last_synced_at":"2026-06-22T10:01:56.737Z","repository":{"id":291115694,"uuid":"976630124","full_name":"Team-Tritan/Torrent-Tracker","owner":"Team-Tritan","description":"A torrent tracker to work with bittorrent clients, pretty simple. No auth, meant for public use.","archived":false,"fork":false,"pushed_at":"2026-05-11T08:13:41.000Z","size":37021,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T08:16:05.187Z","etag":null,"topics":["bittorrent-tracker","docker","docker-compose","typescript"],"latest_commit_sha":null,"homepage":"http://tracker.tritan.gg:8080","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Team-Tritan.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-02T13:06:38.000Z","updated_at":"2026-05-11T08:13:45.000Z","dependencies_parsed_at":"2025-05-02T14:44:03.433Z","dependency_job_id":"477fccfd-9f3f-446f-8016-185522163456","html_url":"https://github.com/Team-Tritan/Torrent-Tracker","commit_stats":null,"previous_names":["team-tritan/torrent-tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Team-Tritan/Torrent-Tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-Tritan%2FTorrent-Tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-Tritan%2FTorrent-Tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-Tritan%2FTorrent-Tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-Tritan%2FTorrent-Tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Team-Tritan","download_url":"https://codeload.github.com/Team-Tritan/Torrent-Tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-Tritan%2FTorrent-Tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34643624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bittorrent-tracker","docker","docker-compose","typescript"],"created_at":"2026-06-22T10:01:55.858Z","updated_at":"2026-06-22T10:01:56.729Z","avatar_url":"https://github.com/Team-Tritan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Torrent Tracker\r\n\r\nA lightweight and efficient Torrent tracker implemented in TypeScript, using the Bun runtime and Express.\r\n\r\n---\r\n\r\n## Features\r\n\r\n- **Full Torrent tracking functionality**  \r\n  Implements the BitTorrent tracker protocol with announce, scrape, and stats endpoints.\r\n- **Peer management**  \r\n  Tracks active seeders and leechers for each torrent.\r\n- **State persistence**  \r\n  Automatically saves and loads tracker state to survive restarts.\r\n- **Automatic cleanup**  \r\n  Removes inactive peers to keep memory usage optimal.\r\n- **Compact responses**  \r\n  Supports compact peer lists for bandwidth efficiency.\r\n- **Docker support**  \r\n  Ready for containerized deployment.\r\n- **Configurable**  \r\n  Environment variables allow you to customize your tracker setup.\r\n\r\n---\r\n\r\n## Installation\r\n\r\n### Prerequisites\r\n\r\n- [Bun](https://bun.sh/) runtime\r\n\r\n### Standard Installation\r\n\r\n```\r\n# Clone the repository\r\ngit clone https://github.com/team-tritan/torrent-tracker.git\r\ncd torrent-tracker\r\n\r\n# Install dependencies\r\nbun install\r\n\r\n# Start the tracker\r\nbun start\r\n```\r\n\r\n### Docker Installation\r\n\r\n```\r\n# Clone the repository\r\ngit clone https://github.com/team-tritan/torrent-tracker.git\r\ncd torrent-tracker\r\n\r\n# Start with Docker Compose\r\ndocker compose up -d\r\n```\r\n\r\n---\r\n\r\n## Configuration\r\n\r\nConfigure the tracker using environment variables in a `.env` file:\r\n\r\n- `PORT` - Port the tracker will listen on\r\n- `DATA_DIR` - Directory to store persistent data\r\n- `CLEANUP_INTERVAL` - Interval for cleaning up inactive peers (in ms)\r\n- `REDIS_HOST` - Hostname for redis, defaulted to docker networking\r\n- `REDIS_PORT` - Ditto to above\r\n---\r\n\r\n## API Endpoints\r\n\r\n### `/announce`\r\n\r\nUsed by BitTorrent clients to announce their presence and receive peer lists.\r\n\r\n**Query Parameters:**\r\n\r\n- `info_hash` — Hash of the torrent (required)\r\n- `peer_id` — Client's peer ID (required)\r\n- `port` — Client's listening port (required)\r\n- `uploaded` — Bytes uploaded\r\n- `downloaded` — Bytes downloaded\r\n- `left` — Bytes left to download\r\n- `compact` — Use compact peer list format (0 or 1)\r\n- `event` — Client event (`started`, `completed`, `stopped`, or `paused`)\r\n\r\n---\r\n\r\n### `/scrape`\r\n\r\nReturns statistics about one or more torrents.\r\n\r\n**Query Parameters:**\r\n\r\n- `info_hash` — Hash of the torrent (optional, can be specified multiple times)\r\n\r\n---\r\n\r\n### `/stats`\r\n\r\nReturns a summary of statistics about all tracked torrents.\r\n\r\n---\r\n\r\n### `/stats/details`\r\n\r\nReturns detailed statistics about all tracked torrents.\r\n\r\n---\r\n### `/torrent/:infoHash`\r\n\r\nReturns detailed information about a specific torrent currently being tracked.\r\n\r\n**Path Parameters:**\r\n\r\n* `infoHash` — The torrent info hash (required)\r\n\r\n**Description:**\r\n\r\nThis endpoint provides a full snapshot of a single torrent’s current swarm state, including peer-level and aggregate statistics. It is primarily intended for debugging, monitoring, and administrative visibility rather than client usage.\r\n\r\nIt returns:\r\n\r\n* Total number of peers in the swarm\r\n* Seeder and leecher counts\r\n* Aggregate upload and download totals\r\n* Per-client breakdown (based on peer ID prefix)\r\n* Full peer list with connection metadata\r\n\r\n**Example Request:**\r\n\r\n```http\r\nGET /torrent/\u003cinfoHash\u003e\r\n```\r\n\r\n**Example Response:**\r\n\r\n```json\r\n{\r\n  \"infoHash\": \"...\",\r\n  \"totalPeers\": 12,\r\n  \"seeders\": 5,\r\n  \"leechers\": 7,\r\n  \"uploaded\": 12345678,\r\n  \"downloaded\": 9876543,\r\n  \"hasSeederAndLeecher\": true,\r\n  \"clients\": {\r\n    \"qB\": 4,\r\n    \"TR\": 3\r\n  },\r\n  \"peers\": [\r\n    {\r\n      \"peerId\": \"...\",\r\n      \"ip\": \"1.2.3.4\",\r\n      \"port\": 6881,\r\n      \"uploaded\": 1234,\r\n      \"downloaded\": 5678,\r\n      \"left\": 0,\r\n      \"isSeeder\": true,\r\n      \"lastSeen\": 1710000000000\r\n    }\r\n  ]\r\n}\r\n```\r\n---\r\n\r\n## Usage with qBittorrent\r\n\r\nTo use this tracker with qBittorrent:\r\n\r\n1. Open a torrent's **Properties**\r\n2. Go to the **Trackers** tab\r\n3. Add:  \r\n   `http://your-server-ip:8080/announce`\r\n\r\n**Alternatively:**\r\n\r\n- Go to **Options** → **Downloads**\r\n- Add the tracker URL to the setting that appends it to each download automatically\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam-tritan%2Ftorrent-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteam-tritan%2Ftorrent-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam-tritan%2Ftorrent-tracker/lists"}