Skip to content

Commit 7a84a75

Browse files
committed
Add auth. info to the readme
1 parent 6a082e1 commit 7a84a75

1 file changed

Lines changed: 40 additions & 9 deletions

File tree

README.md

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ tubechecker:
149149
150150
Add `URL_TUBECHECKER=channels.yourdomain.com` to your `.env` file.
151151

152-
> **Note:** The web UI has no built-in authentication. If it is publicly accessible, protect it with a Traefik `basicauth` middleware or equivalent.
153-
154152
---
155153

156154
## Build from Source
@@ -167,13 +165,46 @@ docker compose up -d --build
167165

168166
All settings can be configured from the **Settings** view in the UI and are persisted to the database. Environment variables seed the database on first run and act as defaults — subsequent UI changes take precedence.
169167

170-
| Environment Variable | Default | Description |
171-
|----------------------|----------------------------|----------------------------------------------------------|
172-
| `DATA_DIR` | `/data` | Directory where application data is stored |
173-
| `METUBE_URL` | `http://localhost:8081` | Base URL of your MeTube instance (no trailing slash) |
174-
| `CHECK_INTERVAL` | `60` | How often to poll RSS feeds, in minutes |
175-
| `JELLYFIN_URL` | *(empty)* | Base URL of your Jellyfin instance — leave empty to disable |
176-
| `JELLYFIN_API_KEY` | *(empty)* | Jellyfin API key (Dashboard → API Keys) |
168+
| Environment Variable | Default | Description |
169+
|------------------------|----------------------------|----------------------------------------------------------|
170+
| `DATA_DIR` | `/data` | Directory where application data is stored |
171+
| `METUBE_URL` | `http://localhost:8081` | Base URL of your MeTube instance (no trailing slash) |
172+
| `CHECK_INTERVAL` | `60` | How often to poll RSS feeds, in minutes |
173+
| `JELLYFIN_URL` | *(empty)* | Base URL of your Jellyfin instance — leave empty to disable |
174+
| `JELLYFIN_API_KEY` | *(empty)* | Jellyfin API key (Dashboard → API Keys) |
175+
| `AUTH_USERNAME` | *(empty)* | Login username — set together with `AUTH_PASSWORD` to enable auth |
176+
| `AUTH_PASSWORD` | *(empty)* | Login password |
177+
| `AUTH_SECRET` | *(random)* | HMAC signing key for session cookies — see [Authentication](#authentication) |
178+
| `AUTH_SESSION_MAX_AGE` | `604800` | Session lifetime in seconds (default: 7 days) |
179+
180+
---
181+
182+
## Authentication
183+
184+
The web UI has no authentication by default. Set `AUTH_USERNAME` and `AUTH_PASSWORD` to enable a login screen.
185+
186+
```yaml
187+
environment:
188+
- AUTH_USERNAME=admin
189+
- AUTH_PASSWORD=your-secure-password
190+
- AUTH_SECRET=<generated key>
191+
```
192+
193+
**`AUTH_SECRET`** signs the session cookies. Without it a random secret is generated at startup, which means all sessions are invalidated whenever the container restarts. Generate a stable key with:
194+
195+
```bash
196+
python3 -c "import secrets; print(secrets.token_hex(32))"
197+
```
198+
199+
Or with OpenSSL if Python isn't available locally:
200+
201+
```bash
202+
openssl rand -hex 32
203+
```
204+
205+
Paste the output as the value of `AUTH_SECRET`.
206+
207+
> If only `AUTH_USERNAME`/`AUTH_PASSWORD` are set and `AUTH_SECRET` is omitted, the app still works — users just need to log in again after each restart.
177208

178209
---
179210

0 commit comments

Comments
 (0)