|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +title: Configuration Reference |
| 4 | +--- |
| 5 | + |
| 6 | +# Configuration Reference |
| 7 | + |
| 8 | +qui supports configuration via: |
| 9 | + |
| 10 | +- `config.toml` (auto-created on first run, or manually via `qui generate-config`) |
| 11 | +- environment variables (`QUI__...`) to override `config.toml` |
| 12 | + |
| 13 | +This page documents both in one place. |
| 14 | + |
| 15 | +## Precedence |
| 16 | + |
| 17 | +Highest wins: |
| 18 | + |
| 19 | +1. `QUI__*_FILE` (for supported secrets) |
| 20 | +2. `QUI__*` environment variables |
| 21 | +3. `config.toml` |
| 22 | +4. built-in defaults |
| 23 | + |
| 24 | +## Config File Location |
| 25 | + |
| 26 | +Default `config.toml` locations: |
| 27 | + |
| 28 | +- Linux/macOS: `~/.config/qui/config.toml` |
| 29 | +- Windows: `%APPDATA%\\qui\\config.toml` |
| 30 | + |
| 31 | +Override with `--config-dir`: |
| 32 | + |
| 33 | +- directory path: `--config-dir /path/to/config/` (uses `/path/to/config/config.toml`) |
| 34 | +- file path (back-compat): `--config-dir /path/to/custom.toml` |
| 35 | + |
| 36 | +## Notes On Reloading |
| 37 | + |
| 38 | +qui watches `config.toml` for changes. Some settings are applied immediately (for example logging and tracker icon fetching). For anything else, restart qui after changes to be safe. |
| 39 | + |
| 40 | +## Settings |
| 41 | + |
| 42 | +| TOML key | Environment variable | Type | Default | Notes | |
| 43 | +|---|---|---:|---|---| |
| 44 | +| `host` | `QUI__HOST` | string | `localhost` (or `0.0.0.0` in containers) | Bind address for the main HTTP server. | |
| 45 | +| `port` | `QUI__PORT` | int | `7476` | Port for the main HTTP server. | |
| 46 | +| `baseUrl` | `QUI__BASE_URL` | string | `/` | Serve qui from a subdirectory (example: `/qui/`). | |
| 47 | +| `sessionSecret` | `QUI__SESSION_SECRET` / `QUI__SESSION_SECRET_FILE` | string | auto-generated | WARNING: changing breaks decryption of stored instance passwords; you must re-enter them in the UI. | |
| 48 | +| `logLevel` | `QUI__LOG_LEVEL` | string | `INFO` | `ERROR`, `DEBUG`, `INFO`, `WARN`, `TRACE`. Applied immediately. | |
| 49 | +| `logPath` | `QUI__LOG_PATH` | string | empty | If empty: logs to stdout. Relative paths resolve relative to the config directory. Applied immediately. | |
| 50 | +| `logMaxSize` | `QUI__LOG_MAX_SIZE` | int | `50` | MiB threshold before rotation. Applied immediately. | |
| 51 | +| `logMaxBackups` | `QUI__LOG_MAX_BACKUPS` | int | `3` | Rotated files retained. `0` keeps all. Applied immediately. | |
| 52 | +| `dataDir` | `QUI__DATA_DIR` | string | empty | If empty: uses the directory containing `config.toml`. Database `qui.db` lives here. Restart recommended. | |
| 53 | +| `checkForUpdates` | `QUI__CHECK_FOR_UPDATES` | bool | `true` | Controls update checks and UI indicators. Restart recommended. | |
| 54 | +| `trackerIconsFetchEnabled` | `QUI__TRACKER_ICONS_FETCH_ENABLED` | bool | `true` | Disable to prevent remote tracker favicon fetches. Applied immediately. | |
| 55 | +| `crossSeedRecoverErroredTorrents` | `QUI__CROSS_SEED_RECOVER_ERRORED_TORRENTS` | bool | `false` | When enabled, cross-seed automation attempts recovery (pause, recheck, resume) for errored/missingFiles torrents. Can add 25+ minutes per torrent. Restart recommended. | |
| 56 | +| `pprofEnabled` | `QUI__PPROF_ENABLED` | bool | `false` | Enables pprof server on `:6060` (`/debug/pprof/`). Restart required. | |
| 57 | +| `metricsEnabled` | `QUI__METRICS_ENABLED` | bool | `false` | Enables a Prometheus metrics server (separate port). Restart required. | |
| 58 | +| `metricsHost` | `QUI__METRICS_HOST` | string | `127.0.0.1` | Metrics server bind address. Restart required. | |
| 59 | +| `metricsPort` | `QUI__METRICS_PORT` | int | `9074` | Metrics server port. Restart required. | |
| 60 | +| `metricsBasicAuthUsers` | `QUI__METRICS_BASIC_AUTH_USERS` | string | empty | Optional basic auth: `user:bcrypt_hash` or `user1:hash1,user2:hash2`. Restart required. | |
| 61 | +| `externalProgramAllowList` | (none) | string[] | empty list | Restricts which executables can be launched from the UI. Only configurable via `config.toml` (no env override). | |
| 62 | +| `oidcEnabled` | `QUI__OIDC_ENABLED` | bool | `false` | Enable OpenID Connect authentication. Restart required. | |
| 63 | +| `oidcIssuer` | `QUI__OIDC_ISSUER` | string | empty | OIDC issuer URL. Restart required. | |
| 64 | +| `oidcClientId` | `QUI__OIDC_CLIENT_ID` | string | empty | OIDC client ID. Restart required. | |
| 65 | +| `oidcClientSecret` | `QUI__OIDC_CLIENT_SECRET` / `QUI__OIDC_CLIENT_SECRET_FILE` | string | empty | OIDC client secret. Restart required. | |
| 66 | +| `oidcRedirectUrl` | `QUI__OIDC_REDIRECT_URL` | string | empty | Must match the provider redirect URI (include `baseUrl` when reverse proxying). Restart required. | |
| 67 | +| `oidcDisableBuiltInLogin` | `QUI__OIDC_DISABLE_BUILT_IN_LOGIN` | bool | `false` | Hide local username/password form when OIDC is enabled. Restart required. | |
| 68 | + |
| 69 | +## Example `config.toml` |
| 70 | + |
| 71 | +```toml |
| 72 | +host = "0.0.0.0" |
| 73 | +port = 7476 |
| 74 | +baseUrl = "/qui/" |
| 75 | + |
| 76 | +logLevel = "INFO" |
| 77 | +logPath = "log/qui.log" |
| 78 | +logMaxSize = 50 |
| 79 | +logMaxBackups = 3 |
| 80 | + |
| 81 | +trackerIconsFetchEnabled = false |
| 82 | + |
| 83 | +externalProgramAllowList = [ |
| 84 | + "/usr/local/bin", |
| 85 | + "/home/user/bin/my-script", |
| 86 | +] |
| 87 | +``` |
0 commit comments