You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-9Lines changed: 16 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ services:
22
22
PASSWORD: ${QB_PASSWORD}
23
23
BASE_URL: ${QB_URL}
24
24
AUTH_TOKEN: ${AUTH_TOKEN}
25
-
LISTEN_PORT: "9911"
26
-
RATE_LIMIT: "10"# API requests per minute (default: 10)
27
25
restart: unless-stopped
26
+
volumes:
27
+
- ./logs:/app/logs # Optional
28
28
```
29
29
`.env`
30
30
```env
@@ -33,6 +33,14 @@ QB_PASSWORD=
33
33
QB_URL=http://IP:PORT
34
34
AUTH_TOKEN=REPLACEME
35
35
```
36
+
`Optional Environment Variables`
37
+
```yaml
38
+
RATE_LIMIT: "10" # API requests per minute (default: 10)
39
+
LOG_RETENTION_DAYS: 3 # 0 for purge-on-restart
40
+
LOG_DIR: /app/logs # Where docker should save your logs
41
+
DEBUG: true # Logs level
42
+
LISTEN_PORT: "9911". # Port on which qBW should listen internally
43
+
```
36
44
37
45
## Environment Variables
38
46
@@ -41,21 +49,21 @@ You **must** provide these in a `.env` file or your environment:
41
49
* `QB_URL` — base URL of your qBittorrent Web UI (e.g., `http://localhost:8080`)
42
50
* `QB_USERNAME` — your qBittorrent username
43
51
* `QB_PASSWORD` — your qBittorrent password
44
-
* `AUTH_TOKEN` — Bearer token required to access the `/qb/torrents` endpoint
52
+
* `AUTH_TOKEN` — This is not a qBittorrent token. It’s a bearer token used by qBWrapper to control access (like a password) to the /qb/torrents endpoint.
45
53
46
54
## Glance
47
55
```yaml
48
56
- type: custom-api
49
57
title: qBittorrent
50
58
cache: 15m
51
59
options:
52
-
always-show-stats: false
60
+
always-show-stats: true
53
61
subrequests:
54
62
info:
55
-
url: "http://${QB_URL}/qb/torrents"
63
+
url: "http://${QBW_URL}/qb/torrents"
56
64
method: GET
57
65
headers:
58
-
Authorization: "Bearer ${AUTH_TOKEN}" # your token
66
+
Authorization: "Bearer ${AUTH_TOKEN}" # your QBW token
59
67
template: |
60
68
{{ $info := .Subrequest "info" }}
61
69
{{ $torrents := $info.JSON.Array "" }}
@@ -161,8 +169,8 @@ You **must** provide these in a `.env` file or your environment:
161
169
162
170
### Glance env
163
171
You can put this app in the same place as glance and the same .env file, but in case you are using it alone please put this in your `.env`.
164
-
* `QB_URL` — base URL of your qBittorrent Web UI (e.g., `http://localhost:8080`)
165
-
* `AUTH_TOKEN` — Bearer token required to access the `/qb/torrents` endpoin
172
+
* `QBW_URL` — base URL of your qBittorrent Wrapper (e.g., `http://localhost:9911`)
173
+
* `AUTH_TOKEN` — This is not a qBittorrent token. It’s a bearer token used by qBWrapper to control access (like a password) to the /qb/torrents endpoint.
166
174
167
175
## What you get in the response
168
176
@@ -183,4 +191,3 @@ Each torrent object includes:
183
191
* The cache is locked for concurrency safety.
184
192
* If the qBittorrent login fails, the app exits.
185
193
* If you hit the endpoint without a valid token, you get a 401 Unauthorized.
186
-
* The app uses standard Go HTTP server and `github.com/joho/godotenv` for env loading.
0 commit comments