Skip to content

Commit ab70d82

Browse files
committed
expand readme, add license, add host header rules to traefik config
1 parent 9f4e179 commit ab70d82

5 files changed

Lines changed: 98 additions & 26 deletions

File tree

README.md

Lines changed: 82 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,96 @@
11
# ■ sqtracker
22

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.
44

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.
106

117
## Features
128

139
* 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.)
1713
* 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)
2317
* 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
2722
* User interaction
28-
* commenting on torrents,
29-
* up/down voting torrents
23+
* Commenting on torrents
24+
* Up/down voting torrents
3025
* 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.)
3530

3631
## Deploying
3732

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

api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@sqtracker/api",
33
"version": "0.0.1",
44
"private": true,
5+
"license": "GPL-3.0-only",
56
"scripts": {
67
"dev": "nodemon --exec babel-node src/index.js",
78
"start": "babel-node src/index.js"

client/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"name": "@sqtracker/client",
33
"version": "0.0.1",
44
"private": true,
5+
"license": "GPL-3.0-only",
56
"scripts": {
6-
"dev": "next dev -p 3000",
7+
"dev": "next dev",
78
"build": "next build",
8-
"start": "next start -p 3000",
9+
"start": "next start",
910
"lint": "next lint"
1011
},
1112
"dependencies": {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "sqtracker",
33
"version": "0.0.1",
44
"private": true,
5+
"license": "GPL-3.0-only",
56
"workspaces": [
67
"api",
78
"client"

traefik.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ http:
77
rule: "PathPrefix(`/api`, `/sq`)"
88
middlewares:
99
- api-prefix
10+
- apiHostHeaderSet
1011
client:
1112
service: client
1213
entryPoints:
1314
- web
1415
rule: "PathPrefix(`/`)"
16+
middlewares:
17+
- clientHostHeaderSet
1518
services:
1619
api:
1720
loadBalancer:
@@ -26,3 +29,11 @@ http:
2629
stripPrefix:
2730
prefixes:
2831
- /api
32+
clientHostHeaderSet:
33+
headers:
34+
customRequestHeaders:
35+
Host: "sq_client"
36+
apiHostHeaderSet:
37+
headers:
38+
customRequestHeaders:
39+
Host: "sq_api"

0 commit comments

Comments
 (0)