|
1 | 1 | # ■ sqtracker |
2 | 2 |
|
3 | | -*sqtracker* is a private BitTorrent tracker service that implements things like user accounts, ratio tracking, commenting, voting, moderation, and more. |
| 3 | +sqtracker is a private BitTorrent tracker platform. |
4 | 4 |
|
5 | | -This is particularly useful for private tracker communities that want to control who can download, how much they must seed and so on. |
6 | | - |
7 | | -*sqtracker* works in conjunction with [opentracker](https://erdgeist.org/arts/software/opentracker/), which provides the actual BitTorrent tracker protocol. *sqtracker* can be thought of a sort of front-end built on top of opentracker, providing everything else you need to run a full private tracker platform. |
8 | | - |
9 | | -As the BitTorrent tracker protocol has a [proper specification](https://www.bittorrent.org/beps/bep_0003.html), other tracker software that implements the protocol properly should also be compatible with *sqtracker*. However, only opentracker is tested, and opentracker is used in the `docker-compose.yml` file. |
| 5 | +It implements all of the features required to run a private (or public) tracker and does not focus on any one specific type of content. It is suitable for running a tracker site of any kind. |
10 | 6 |
|
11 | 7 | ## Features |
12 | 8 |
|
13 | 9 | * Accounts |
14 | | - * registration (open/closed/invite only), |
15 | | - * log in, |
16 | | - * password resets etc. |
| 10 | + * Registration modes (open/closed/invite only) |
| 11 | + * Sending of invites |
| 12 | + * Account management (2FA, password resets etc.) |
17 | 13 | * Torrent management |
18 | | - * uploading torrents, |
19 | | - * user submitted metadata (titles, descriptions etc.), |
20 | | - * downloading torrent files with user-specific announce URLs, |
21 | | - * track active seeders & leechers of a torrent, |
22 | | - * freeleech options |
| 14 | + * Uploading torrents with rich metadata (titles, descriptions, categories, tags etc.) |
| 15 | + * Searching torrents or browsing by category |
| 16 | + * Freeleech options (specific torrents, sitewide) |
23 | 17 | * Upload/download tracking |
24 | | - * track how much content each user has uploaded/downloaded, |
25 | | - * track ratios, |
26 | | - * limit up/downloading per user based on ratio |
| 18 | + * Track how much content each user has uploaded/downloaded |
| 19 | + * Track ratios |
| 20 | + * Limit up/downloading per user based on ratio |
| 21 | + * Award invites based on ratio |
27 | 22 | * User interaction |
28 | | - * commenting on torrents, |
29 | | - * up/down voting torrents |
| 23 | + * Commenting on torrents |
| 24 | + * Up/down voting torrents |
30 | 25 | * Moderation |
31 | | - * staff/admin privileges, |
32 | | - * reporting torrents, |
33 | | - * detailed stats available to admins, |
34 | | - * announcements/news posts |
| 26 | + * Staff/admin privileges |
| 27 | + * Reporting torrents to be reviewed by staff |
| 28 | + * Detailed stats available to admins |
| 29 | + * Announcements/news posts (for posting of tracker rules, important updates etc.) |
35 | 30 |
|
36 | 31 | ## Deploying |
37 | 32 |
|
38 | | -### Configuration |
| 33 | +### Components |
| 34 | + |
| 35 | +An sqtracker deployment is made up of 5 separate components. These are: |
| 36 | + |
| 37 | +#### A BitTorrent tracker |
| 38 | + |
| 39 | +sqtracker does not implement the BitTorrent tracker spec itself. Instead, it works alongside a tracker server such as [opentracker](https://erdgeist.org/arts/software/opentracker/). In theory, other generic BitTorrent tracker software should work, but opentracker is recommended for the time being. |
| 40 | + |
| 41 | +#### A MongoDB database |
| 42 | + |
| 43 | +[MongoDB](https://www.mongodb.com/) is a popular and powerful document-oriented database. |
| 44 | + |
| 45 | +#### The sqtracker API service |
| 46 | + |
| 47 | +The sqtracker API service handles all actions taken by users (authentication, uploads, searching etc.), provides the RSS feed, and proxies announce requests to the tracker server. |
| 48 | + |
| 49 | +#### The sqtracker client service |
| 50 | + |
| 51 | +The sqtracker client service provides the modern, responsive web interface that users interact with. |
| 52 | + |
| 53 | +#### A HTTP proxy server |
| 54 | + |
| 55 | +The HTTP proxy allows the client, API, and BitTorrent tracker to all be accessible via a single endpoint. |
| 56 | + |
| 57 | +### Deploying with Docker compose |
| 58 | + |
| 59 | +The sqtracker platform is designed to be deployed via Docker. Once a configuration file is created, deploying is as simple as running `docker compose up -d` at the root of the project. |
| 60 | + |
| 61 | +Alternatively, you can deploy each service individually on a PaaS cloud platform such as [Northflank](https://northflank.com). |
| 62 | + |
| 63 | +## Configuration |
| 64 | + |
| 65 | +All configuration is provided via a single JavaScript file. This file must export an object containing 2 keys: `envs` and `secrets`. |
| 66 | + |
| 67 | +A full list of configuration options is below. All are required. |
| 68 | + |
| 69 | +| Key | Type | Example | Description | |
| 70 | +|----------------------------|---------|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 71 | +| SQ_SITE_NAME | envs | sqtracker demo | The name of your tracker site | |
| 72 | +| SQ_SITE_DESCRIPTION | envs | My very own private tracker | A short description of your tracker site | |
| 73 | +| SQ_ALLOW_REGISTER | envs | `invite` | Registration mode. Either `open`, `invite` or `closed` | |
| 74 | +| SQ_ALLOW_ANONYMOUS_UPLOADS | envs | `false` | Whether or not users can upload torrents anonymously. Either `true` or `false` | |
| 75 | +| SQ_MINIMUM_RATIO | envs | 0.75 | Minimum allowed ratio. Below this users will not be able to download | |
| 76 | +| SQ_TORRENT_CATEGORIES | envs | `["Movies", "TV"]` | An array of categories available on your tracker site | |
| 77 | +| SQ_BASE_URL | envs | https://demo.sqtracker.dev | The URL of your tracker site | |
| 78 | +| SQ_API_URL | envs | https://demo.sqtracker.dev/api | The URL of your API. Under the recommended setup, it should be `${SQ_BASE_URL}/api` | |
| 79 | +| SQ_TRACKER_URL | envs | http://sq_opentracker:6969 | The URL of your tracker server. Under the recommended setup, it should be `http://sq_opentracker:6969` | |
| 80 | +| SQ_MONGO_URL | envs | mongodb://sq_mongodb/sq | The URL of your MongoDB server. Under the recommended setup, it should be `mongodb://sq_mongodb/sq` | |
| 81 | +| SQ_MAIL_FROM_ADDRESS | envs | mail@sqtracker.dev | The address that mail will be sent from | |
| 82 | +| SQ_SMTP_HOST | envs | smtp.example.com | The hostname of your SMTP server | |
| 83 | +| SQ_SMTP_PORT | envs | 587 | The port of your SMTP server | |
| 84 | +| SQ_SMTP_SECURE | envs | `false` | Whether or not to force SMTP TLS: if true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false | |
| 85 | +| SQ_JWT_SECRET | secrets | — | A secret value to sign tokens with. Should be long and random | |
| 86 | +| SQ_ADMIN_EMAIL | secrets | admin@example.com | The email address to use for the initial admin user. Must be valid | |
| 87 | +| SQ_SMTP_USER | secrets | — | The username to authenticate with your SMTP server with | |
| 88 | +| SQ_SMTP_PASS | secrets | — | The password to authenticate with your SMTP server with | |
| 89 | + |
| 90 | +### Example configuration |
| 91 | + |
| 92 | +An example configuration can be found in `config.example.js`. |
| 93 | + |
| 94 | +## License |
| 95 | + |
| 96 | +GNU GPLv3 |
0 commit comments