# qui > A fast web UI for qBittorrent. Manage one or many instances with cross-seed, automations, and backups in a single binary. This file contains all documentation content in a single document following the llmstxt.org standard. ## Supported qBittorrent versions ## qBittorrent version compatibility :::note qui supports qBittorrent 4.3.9 and newer as the baseline. Some features require newer builds, as the table shows. Versions older than 4.3.9 can still connect, but qui does not guarantee full functionality. ::: qui detects the features that each qBittorrent instance supports and adjusts the interface to match. If an instance is too old for a feature, qui disables that feature: | Feature | Minimum Version | Notes | | --- | --- | --- | | **Rename Torrent** | 4.1.0+ (Web API 2.0.0+) | Change the display name of a torrent | | **Tracker Editing** | 4.1.5+ (Web API 2.2.0+) | Edit, add, and remove tracker URLs | | **File Priority Controls** | 4.1.5+ (Web API 2.2.0+) | Enable or disable files and set download priority levels | | **Rename File** | 4.2.1+ (Web API 2.4.0+) | Rename individual files in a torrent | | **Rename Folder** | 4.3.3+ (Web API 2.7.0+) | Rename folders in a torrent | | **Per-Torrent Temporary Download Path** | 4.4.0+ (Web API 2.8.4+) | When you add a torrent, set a custom temporary download path | | **Torrent Export (.torrent download)** | 4.5.0+ (Web API 2.8.11+) | Download .torrent files with `/api/v2/torrents/export`. First available in 4.5.0beta1 | | **Backups (.torrent archive export)** | 4.5.0+ (Web API 2.8.11+) | qui backups use `/torrents/export`. If the endpoint is unavailable, qui hides the backup UI | | **Subcategories** | 4.6.0+ (Web API 2.9.0+) | Nested category structures, for example `Movies/Action` | | **Torrent Creation** | 5.0.0+ (Web API 2.11.2+) | Create new .torrent files with the Web API | | **Path Autocomplete** | 5.0.0+ (Web API 2.11.2+) | When you add torrents or create .torrent files, qui suggests paths | | **External IP Reporting (IPv4/IPv6)** | 5.1.0+ (Web API 2.11.3+) | Exposes the `last_external_address_v4` / `_v6` fields | | **Tracker Health Status** | 5.1.0+ (Web API 2.11.4+) | Detects unregistered torrents and tracker issues | | **Share limit action** | 5.2.0+ (Web API **2.15.1**+) | If a torrent reaches a ratio, seeding time, or inactive seeding limit, choose an action: stop, remove, remove with content, or enable super seeding. If the instance reports Web API **2.15.1** or newer, qui shows this control | | **Share limit mode** | 5.3.0+ (Web API **2.16.0**+) | Controls whether that action runs when the torrent reaches **any** configured limit or only when it reaches **all** limits. If the instance reports Web API **2.16.0** or newer, qui shows this control | :::note Hybrid and v2 torrent creation requires a qBittorrent build that links against libtorrent v2. If a build links against libtorrent 1.x, it ignores the `format` parameter. ::: ### Category folders A category with no save path saves its torrents to a folder with the name of the category. qBittorrent 5.3 changed how it makes the folder name. qBittorrent 5.2 and earlier replace each run of the characters `: ? " * < > |` with one space. qBittorrent 5.3 and later remove the spaces at the start and the end of the name, and replace each run of reserved characters with one `_`. The reserved characters depend on the platform that qBittorrent was built for: - Linux: control characters only. - macOS: control characters and `:`. - Windows: control characters and `\ < > : " | ? *`. qBittorrent also removes dots and spaces at the end of the name, and adds `_1` to a reserved device name such as `con`. For example, the category `tv:uhd` uses the folder `tv uhd` on qBittorrent 5.2, `tv:uhd` on qBittorrent 5.3 on Linux, and `tv_uhd` on qBittorrent 5.3 on macOS and Windows. qui uses the rule of the qBittorrent version and the build platform of each instance. Thus the cleanup of empty folders and the orphan scan keep the correct category folder. ### Tracker health refresh qui checks the tracker health of each torrent in the background every 60 seconds. Tracker health is the state that qui shows for the trackers of a torrent: unregistered, tracker down, or tracker error. - On qBittorrent 5.2.0 and newer, the sync data of qBittorrent tells qui which torrents have a tracker problem. qui asks for the tracker details of a torrent only when its problem starts or changes. Thus, qui shows a new tracker problem within 60 seconds after qBittorrent reports it. If only the tracker message changes, qui shows the new message within 10 minutes. If a torrent has more than one tracker, a change of one tracker can also take up to 10 minutes to show. For example, a torrent with one working tracker and one tracker that is down stays healthy in qui for up to 10 minutes after the working tracker also goes down. - On qBittorrent 5.1, qui asks for the tracker details of all torrents every 60 seconds. On a library with tens of thousands of torrents, this request can make qBittorrent slow for several seconds. - On qBittorrent older than 5.1, qui shows no tracker health. The tracker sidebar counts a torrent under each of its trackers, also its backup trackers. ### Authentication compatibility #### API key auth with reverse-proxy Basic Auth qBittorrent added API key authentication in version 5.2.0 (Web API 2.14.1). Older instances accept only a username and a password. qBittorrent API key authentication uses the HTTP `Authorization: Bearer ...` header. Reverse-proxy Basic Auth, for example nginx `auth_basic`, also uses the `Authorization` header. A request can carry only one normal `Authorization` value. You cannot combine qBittorrent API key authentication with reverse-proxy Basic Auth in the default setup. Use qBittorrent username and password authentication with reverse-proxy Basic Auth, or bypass Basic Auth for the requests that qui sends to qBittorrent. ### Troubleshooting missing features #### Create Torrent button is not visible qui shows the **Create Torrent** button after it connects to qBittorrent **5.0.0** (Web API 2.11.2) or newer and detects torrent creation support. If the button is missing, open the [instance settings](../features/instance-settings.md), test the connection, and refresh the qui web UI. Upgrade qBittorrent if it is older than 5.0.0. On the all-instances view, qui shows the button for each instance where it detected support. #### Hybrid and v2 torrent formats are unavailable The **hybrid** and **v2** torrent format options require a qBittorrent build that links against **libtorrent v2.x**, even on qBittorrent 5.0.0 or newer. If your build uses libtorrent 1.x, the torrent creation dialog displays an alert that only the **v1** format is available. This is a build-time property of qBittorrent. You cannot change it through qui. #### "Too many active torrent creation tasks" error qBittorrent limits the number of concurrent torrent creation tasks. If you see a **409 Conflict** error with this message, wait for your existing creation tasks to finish before you start new ones. Monitor active tasks in the torrent creation task list. #### Download of a created torrent fails with "Failed to download torrent file" The creation task is **Finished**, but the download shows this error. The qui log shows `status code: 409: unexpected status code`. The cause is the qBittorrent option **Delete .torrent files afterwards** (Options > Downloads). With **Add to qBittorrent** enabled, qBittorrent writes the created file to disk and adds the torrent from that file. When **Delete .torrent files afterwards** is enabled, qBittorrent deletes the file after it adds the torrent. This applies to the temporary file that qBittorrent uses when **Save .torrent to** is empty, and to a file at a path that you set. The download fails because the file no longer exists. qBittorrent does not log this error. Disable **Delete .torrent files afterwards** in qBittorrent, or disable **Add to qBittorrent** in the creator dialog and add the downloaded file yourself. --- ## Prometheus metrics for qui and qBittorrent ## Prometheus metrics qui exposes Prometheus metrics for its process and qBittorrent instances. The metrics server uses a separate port. The default port is `9074`. If you do not configure basic authentication, the metrics server accepts every request. Bind the server to a private interface, or protect it before you expose it to a network. ### Enable metrics qui disables metrics by default. Enable them in the [configuration file](../configuration/reference.md) or with [environment variables](../configuration/environment.md). #### Configuration file ```toml metricsEnabled = true metricsHost = "127.0.0.1" metricsPort = 9074 # metricsBasicAuthUsers = "user:password" ``` #### Environment variables ```bash QUI__METRICS_ENABLED=true QUI__METRICS_HOST=127.0.0.1 QUI__METRICS_PORT=9074 # QUI__METRICS_BASIC_AUTH_USERS="user:password" ``` qui accepts a comma-separated list of `user:password` entries. Passwords are plaintext and allow colons. Usernames cannot contain colons. Do not include commas in usernames or passwords. Protect the configuration file or environment that contains the passwords. ### Configure Prometheus Add qui to your Prometheus scrape configuration: ```yaml scrape_configs: - job_name: qui static_configs: - targets: ["localhost:9074"] metrics_path: /metrics scrape_interval: 30s # basic_auth: # username: prometheus # password: yourpassword ``` ### qui metrics The qBittorrent metrics use the `instance_id` and `instance_name` labels. Tracker metrics also use `tracker_name`. | Metric | Type | Labels | Value and reset behavior | |---|---|---|---| | `qbittorrent_torrents_downloading` | Gauge | `instance_id`, `instance_name` | Current downloading torrent count. | | `qbittorrent_torrents_seeding` | Gauge | `instance_id`, `instance_name` | Current seeding torrent count. | | `qbittorrent_torrents_paused` | Gauge | `instance_id`, `instance_name` | Current paused or stopped torrent count. | | `qbittorrent_torrents_error` | Gauge | `instance_id`, `instance_name` | Current torrent error count. | | `qbittorrent_torrents_checking` | Gauge | `instance_id`, `instance_name` | Current checking torrent count. | | `qbittorrent_session_download_bytes` | Counter | `instance_id`, `instance_name` | Bytes downloaded during the current qBittorrent session. A qBittorrent restart resets this value. | | `qbittorrent_session_upload_bytes` | Counter | `instance_id`, `instance_name` | Bytes uploaded during the current qBittorrent session. A qBittorrent restart resets this value. | | `qbittorrent_alltime_download_bytes` | Counter | `instance_id`, `instance_name` | All-time bytes downloaded by qBittorrent. This value persists across restarts. If you clear qBittorrent's saved statistics, this value resets. | | `qbittorrent_alltime_upload_bytes` | Counter | `instance_id`, `instance_name` | All-time bytes uploaded by qBittorrent. This value persists across restarts. If you clear qBittorrent's saved statistics, this value resets. | | `qbittorrent_instance_connection_status` | Gauge | `instance_id`, `instance_name` | `1` for an active, healthy connection. `0` for a disabled or unhealthy instance. | | `qbittorrent_scrape_errors_total` | Counter | `instance_id`, `instance_name`, `type` | A value of `1` for each failed collection sample. A successful collection omits the series. | | `qbittorrent_tracker_torrents` | Gauge | `instance_id`, `instance_name`, `tracker_name` | Current torrent count for the tracker group. | | `qbittorrent_tracker_uploaded_bytes` | Gauge | `instance_id`, `instance_name`, `tracker_name` | Uploaded bytes from current torrents in the tracker group. | | `qbittorrent_tracker_downloaded_bytes` | Gauge | `instance_id`, `instance_name`, `tracker_name` | Downloaded bytes from current torrents in the tracker group. | | `qbittorrent_tracker_total_size_bytes` | Gauge | `instance_id`, `instance_name`, `tracker_name` | Current content size for the tracker group. qui counts a shared content path once within each group. | | `qui_db_wedged_transaction_total` | Counter | None | SQLite nested-transaction detections since qui started. A qui restart resets this value. | | `qui_crossseed_get_match_type_duration_seconds` | Histogram | None | Time cross-seed matching spends comparing a candidate's files with a local torrent's files. A qui restart resets this value. | | `qui_crossseed_get_match_type_calls_total` | Counter | None | File comparisons since qui started. A qui restart resets this value. | | `qui_crossseed_get_match_type_exact_match_total` | Counter | None | File comparisons that ended in an exact match since qui started. A qui restart resets this value. | | `qui_crossseed_get_match_type_partial_match_total` | Counter | None | File comparisons that ended in a partial match since qui started. A qui restart resets this value. | | `qui_crossseed_get_match_type_size_match_total` | Counter | None | File comparisons that ended in a size-only match since qui started. A qui restart resets this value. | | `qui_crossseed_get_match_type_no_match_total` | Counter | None | File comparisons that ended in no match since qui started. A qui restart resets this value. | qui also exports the standard `go_*` and `process_*` metrics from the Prometheus Go client. Those series depend on the Go and client-library versions. Disabled and disconnected instances expose only `qbittorrent_instance_connection_status`. qui omits their torrent and transfer metrics. ### Tracker metric limits Tracker metrics describe torrents that remain in qBittorrent. qui does not store tracker history. If you remove a torrent, its transfer totals leave the tracker metrics. qui assigns a torrent's full transfer totals to each tracker group associated with that torrent. Do not sum tracker groups to calculate unique instance traffic. If you configure a [tracker customization](../features/tracker-customizations.md) display name, the `tracker_name` label uses that name. Otherwise, it uses the tracker domain. Included secondary domains contribute to their configured group. ### PromQL examples #### Tracker totals Uploaded bytes for current torrents: ```promql sum by (instance_name, tracker_name) ( qbittorrent_tracker_uploaded_bytes ) ``` Downloaded bytes for current torrents: ```promql sum by (instance_name, tracker_name) ( qbittorrent_tracker_downloaded_bytes ) ``` #### Instance transfer rates The session metrics are counters. `rate()` handles a qBittorrent restart and returns the average bytes per second. ```promql sum by (instance_name) ( rate(qbittorrent_session_upload_bytes[5m]) ) ``` ```promql sum by (instance_name) ( rate(qbittorrent_session_download_bytes[5m]) ) ``` In Grafana, replace `[5m]` with `[$__rate_interval]`. #### Estimated tracker transfer rates Tracker byte metrics are gauges because their values decrease when torrents leave the library. Use `deriv()` for an estimate: ```promql sum by (instance_name, tracker_name) ( clamp_min(deriv(qbittorrent_tracker_uploaded_bytes[5m]), 0) ) ``` A torrent removal hides traffic until that removal leaves the selected time range. #### Collection errors The error collector emits one sample for each failed collection. Count those samples over time: ```promql sum by (instance_name, type) ( sum_over_time(qbittorrent_scrape_errors_total[5m]) ) ``` Do not use `rate()` or `increase()` with this metric. It does not retain a cumulative count between scrapes. #### Disconnected instances ```promql qbittorrent_instance_connection_status == 0 ``` This query includes disabled instances. Monitor the Prometheus `up{job="qui"}` metric separately because qui cannot report an unreachable metrics endpoint. ### Grafana dashboard [Download the qui Grafana dashboard](/examples/qui-grafana-dashboard.json), then import the JSON file in Grafana. Select the Prometheus data source that scrapes qui. The dashboard has an instance filter and these panel groups: - Status: qBittorrent connection, torrent counts by state, torrent errors, and collection errors during the last five minutes. - Transfer: all-time ratio, all-time and session totals, and session upload and download rates. - Trackers: torrent count, content size, ratio, and upload and download totals for each tracker group. - qui process: CPU, memory, goroutines, threads, open files, wedged database transactions, and uptime. A torrent can be in more than one tracker group, so the tracker panels can add up to more than the whole instance. The process panels show only the qui process that exports the selected instances. --- ## Run qui behind an SSO proxy ## SSO proxies and CORS When qui runs behind an SSO proxy, such as Cloudflare Access or Pangolin, an expired session redirects API `fetch()` calls to the proxy auth origin. If the **proxy** does not send CORS headers, browsers block cross-origin redirects. You then see errors like "CORS request did not succeed" or "NetworkError". If you use a same-origin setup, qui needs no CORS configuration and keeps CORS disabled. For single sign-on inside qui rather than at the proxy, see [OpenID Connect](../configuration/oidc.md). ### What qui does - qui detects likely SSO or CORS failures on `/api/*` requests. - qui performs a single top-level navigation so the SSO login completes. ### What you must configure - If possible, keep the auth flow same-origin. - Configure CORS **on the SSO proxy**, not in qui, for the auth endpoints. - If required, allow credentials and handle the `OPTIONS` preflight. ### Optional qui allowlist If another trusted website in the user's browser must call qui from a different origin, set an explicit allowlist: ```bash QUI__CORS_ALLOWED_ORIGINS=https://panel.example.com ``` qui accepts only explicit origins (`http(s)://host[:port]`). qui rejects wildcards and values with a path, query, or fragment. If you still get CORS errors after you configure the proxy, capture the browser console error and post it in the [Issue Triage](https://github.com/autobrr/qui/discussions/new?category=issue-triage) form. ### Real-time updates and reverse-proxy buffering qui pushes live torrent, stats, and instance-health updates to the UI over a Server-Sent Events (SSE) stream at `GET /api/stream`. The RSS view uses a similar stream. SSE is a long-lived HTTP response that the server flushes incrementally. Some reverse proxies, nginx included, **buffer responses by default**. If a proxy buffers responses, the UI freezes or stays stuck on "reconnecting" until the buffer fills. If the dashboard and torrent list do not update in real time behind your proxy, disable response buffering and allow long-lived connections for the stream endpoint: - **nginx**: for the qui location, or specifically `~ ^/api/stream` and `~ ^/api/instances/[0-9]+/rss/events` (prefix both with your base URL if you set one): ```nginx proxy_buffering off; proxy_cache off; proxy_read_timeout 1h; proxy_set_header Connection ""; # keep the upstream connection open proxy_http_version 1.1; ``` qui already sends `X-Accel-Buffering: no`, but `proxy_buffering off` is the reliable switch. - **Traefik**: SSE works without buffering by default. Ensure that no `buffering` middleware (`maxResponseBodyBytes` / `memResponseBodyBytes`) applies to the qui router. - **Caddy**: `reverse_proxy` streams responses without buffering by default. Caddy needs no extra configuration. Set any idle or read timeout on the proxy to more than a few seconds. qui sends a heartbeat every 5 seconds, and the client reconnects automatically. If the proxy timeout is too short, the proxy triggers unnecessary reconnects. Do not apply compression middleware to `text/event-stream` responses. --- ## qui REST API and API keys ## API overview ### Documentation qui serves interactive API documentation with Swagger UI at `/api/docs`. You can browse all endpoints, view request and response schemas, and test API calls from your browser. ### API keys API keys give programmatic access to the qui API without session cookies. Create and manage them in Settings → API Keys. qui also has client proxy API keys. Those keys let external applications, for example Sonarr or autobrr, reach your qBittorrent instances through the qui proxy. They do not grant access to the qui API. See [Reverse Proxy](../features/reverse-proxy.md). Include your API key in the `X-API-Key` header: ```bash curl -H "X-API-Key: YOUR_API_KEY_HERE" \ http://localhost:7476/api/instances ``` ### Session cookies The session cookie is for the qui web UI. Use an API key for scripts. See [Sessions](../configuration/reference.md#sessions) for the rules that apply to cookie requests. ### Torrent updates `GET /api/stream` sends torrent updates through Server-Sent Events. See `/api/docs` for subscription parameters and event examples. The first event of a stream is `connection`. To add or remove subscriptions without a reconnect, send its `connectionId` to `POST /api/stream/subscriptions`. Each new subscription gets an `init` event before its other events, and the other subscriptions get no new `init`. Keep the version from each accepted snapshot or delta. Apply a delta only when its `baseVersion` matches that version and its `minor` increases by one within the same `major`. If the versions do not match, reconnect for a full snapshot and use REST polling until it arrives. In a delta, omitted counts and preferences retain their previous values. Explicit `preferences: null` clears preferences. Omitted categories and tags mean empty collections. ### Security notes - qui shows an API key only once, at creation. Save it in a safe place. - You can revoke each key on its own. Other keys remain active. - A key has the same permissions as the main user account. --- ## Serve qui from a subdirectory ## Base URL Configuration If you serve qui from a subdirectory (for example `https://example.com/qui/`), configure the base URL. qui normalizes the value at startup. `/qui/`, `/qui`, and `qui` all become `/qui/`. Restart qui after you change the base URL. If the proxy also handles login, see [SSO proxies and CORS](../advanced/sso-proxy-cors.md). ### Environment variable ```bash QUI__BASE_URL=/qui/ ./qui serve ``` ### Configuration file Edit your `config.toml`: ```toml baseUrl = "/qui/" ``` ### Nginx reverse proxy ```nginx # Redirect /qui to /qui/ for proper SPA routing location = /qui { return 301 /qui/; } location /qui/ { proxy_pass http://localhost:7476/qui/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } ``` --- ## qui CLI commands for users, updates, and migration ## CLI Commands ### serve Start the server: ```bash ./qui serve # Custom config directory (config.toml is created inside) ./qui serve --config-dir /path/to/config/ # Custom data directory for the database and other data files ./qui serve --data-dir /path/to/data/ # Log to a file instead of stdout ./qui serve --log-path /path/to/qui.log # Enable the pprof server (default 127.0.0.1:6060, override with QUI__PPROF_ADDR) ./qui serve --pprof ``` ### version Print the version of qui: ```bash ./qui version ``` ### generate-config Create a default configuration file without starting the server: ```bash # Generate config in the OS-specific default location ./qui generate-config # Generate config in a custom directory ./qui generate-config --config-dir /path/to/config/ # Generate config with a custom filename ./qui generate-config --config-dir /path/to/myconfig.toml ``` If the file already exists, the command keeps it and does not overwrite it. ### create-user and change-password Create and manage the user account from the command line: For normal use, omit the password flag. qui prompts for the password and masks your input. Your shell can save `--password` or `--new-password` values in its history. Other users on the system may see those values in the process list. ```bash # Create a user with a masked password prompt ./qui create-user --username admin # Change the password with a masked prompt ./qui change-password --username admin # Both commands accept password flags ./qui create-user --username admin --password mypassword ./qui change-password --username admin --new-password mynewpassword # Pipe passwords for scripting (works with both commands) echo "mypassword" | ./qui create-user --username admin echo "newpassword" | ./qui change-password --username admin printf "password" | ./qui change-password --username admin ./qui change-password --username admin < password.txt # Both commands accept custom config/data directories ./qui create-user --config-dir /path/to/config/ --username admin ``` #### Notes - The system allows only one user account. - Passwords must be at least 8 characters long. - Interactive prompts mask the password. - Both commands accept piped input for automation and scripting. - A piped password must not contain spaces. Type passwords with spaces at the interactive prompt. - If the database does not exist, `create-user` creates it. `change-password` requires an existing database. - The commands do not ask you to confirm the password. #### Reset a forgotten password {#reset-password} If you forgot your password, set a new one with the `change-password` command. The command does not ask for the old password. **Linux / macOS:** ```bash ./qui change-password --username admin ``` **Windows (Command Prompt):** Open the folder that contains `qui.exe` and run: ```batch qui.exe change-password --username admin ``` **Docker:** ```bash docker exec -it qui change-password --username admin ``` Replace `admin` with your username. Enter a new password of at least 8 characters at the prompt. ### update Update qui to the latest release: ```bash ./qui update ``` This command replaces the qui binary in place. It keeps the previous binary as `qui-v.bak` (`qui-v.bak.exe` on Windows) in the same directory, deletes older backups, and prints the command that restores the backup. For Docker, pull a new image instead (see [Docker](../getting-started/docker.md#updating)). ### Migrate From Other Torrent Clients Import torrents with their state from Deluge, rTorrent, Transmission, or uTorrent into qBittorrent's `BT_backup` directory. See [Client Migration](../features/client-migration.md) for per-client details and what qui preserves. ```bash # Preview what the import would do, without writing anything ./qui migrate transmission \ --source-dir ~/.config/transmission-daemon \ --qbit-dir ~/.local/share/qBittorrent/BT_backup \ --dry-run # Deluge: point at the state dir inside the Deluge config dir ./qui migrate deluge \ --source-dir ~/.config/deluge/state \ --qbit-dir ~/.local/share/qBittorrent/BT_backup # rTorrent: point at the session dir from your .rtorrent.rc ./qui migrate rtorrent \ --source-dir ~/.sessions \ --qbit-dir ~/.local/share/qBittorrent/BT_backup # uTorrent or BitTorrent: point at the dir that contains resume.dat (Windows) .\qui.exe migrate utorrent ` --source-dir "$env:APPDATA\uTorrent" ` --qbit-dir "$env:LOCALAPPDATA\qBittorrent\BT_backup" # Map save paths when qBittorrent sees the data elsewhere ./qui migrate utorrent \ --source-dir /mnt/old-pc/uTorrent \ --qbit-dir /config/qBittorrent/BT_backup \ --replace-path 'D:\Downloads=/data/downloads' # Skip the automatic tar.gz backup of both directories ./qui migrate transmission --source-dir ... --qbit-dir ... --skip-backup ``` Notes: - Stop the source client and qBittorrent before you migrate. Start qBittorrent afterwards, and it picks up the imported torrents. - qui imports only fully downloaded torrents. It skips partial torrents with a warning, so no incorrect piece state reaches qBittorrent. - qui preserves these fields per torrent: save path, trackers, upload/download totals, added/completed timestamps, seeding time, paused state (Deluge 2.x only; Deluge 1.3.x imports start resumed), Transmission labels (as qBittorrent tags), Deluge, ruTorrent, and uTorrent labels (as the qBittorrent category). - qui supports these source versions: Transmission 2.4-4.x, Deluge 1.3.x and 2.x, rTorrent 0.9.x through 0.16.x, uTorrent and BitTorrent 2.x and 3.x. - If you do not set `--skip-backup`, qui first archives both directories to `qbt_backup/` in the current working directory. If the qBittorrent directory already exists, qui archives it. A fresh destination produces only the source archive. - If a torrent already exists in the target `BT_backup`, qui skips it. You can run the command again. - `--replace-path from=to` rewrites the start of each save path. You can repeat it. See [Save paths](../features/client-migration.md#save-paths). ### Database migration (db migrate) Offline SQLite to Postgres migration: ```bash # 0) Start the new qui version on SQLite once, then stop it (no writes during migration) # The start applies the SQLite migrations, so the copy carries their data changes. # (example) docker compose up -d qui # (wait until the web UI answers) # docker compose stop qui # 1) Create the target Postgres database first (required) # (example) createdb -h localhost -p 5432 -U user qui # (or in psql) CREATE DATABASE qui; # 2) Optional: backup the SQLite file cp /path/to/qui.db /path/to/qui.db.bak # 3) Validate source + destination without importing rows ./qui db migrate \ --from-sqlite /path/to/qui.db \ --to-postgres "postgres://user:pass@localhost:5432/qui?sslmode=disable" \ --dry-run # 4) Apply migration (schema bootstrap + table copy + identity reset) ./qui db migrate \ --from-sqlite /path/to/qui.db \ --to-postgres "postgres://user:pass@localhost:5432/qui?sslmode=disable" \ --apply # 5) Point qui at Postgres and start it again # - config.toml: databaseEngine=postgres + databaseDsn=... # - or env: QUI__DATABASE_ENGINE=postgres + QUI__DATABASE_DSN=... ``` Notes: - Start the qui version you migrate with on the SQLite database once, then stop it. The migrator reads SQLite as is and does not apply migrations to it. A migration that deletes or rewrites rows only takes effect in Postgres when it already ran on the source. - Create the target Postgres database before you run the migration. - Set exactly one of `--dry-run` or `--apply`. - The command copies all runtime tables except migration history. - The migrator creates the schema and tables inside the destination database. It does not create the database itself. - The output includes per-table row counts for SQLite and Postgres. - On a new database, the dry run lists every table under `Missing Postgres tables` with `postgres=0`. This is expected. `--apply` creates them. - `--apply` empties every table in the destination database before it copies rows. Point it only at a new or empty database. If qui already ran against that Postgres database, its data is lost. A non-zero `postgres=` count in the dry run output means the destination is not empty. #### FAQ **Q: Why is `cross_seed_feed_items` row count lower in Postgres after migration?** If the SQLite file contains historical rows whose `indexer_id` no longer exists in `torznab_indexers`, the migration skips them. Postgres enforces the foreign key, so the migration keeps only rows that have valid parent records. You can check this in SQLite: ```sql SELECT COUNT(*) AS orphaned_rows FROM cross_seed_feed_items f LEFT JOIN torznab_indexers i ON i.id = f.indexer_id WHERE i.id IS NULL; ``` If `orphaned_rows` matches the migration delta (`sqlite_count - postgres_count`), the migration works as intended. --- ## Configure qui with environment variables ## Environment Variables qui stores configuration in `config.toml`. If you run qui for the first time or run `qui generate-config`, qui creates this file. Environment variables override values in `config.toml`. For the complete list (including `config.toml` keys, defaults, and notes), see [Configuration Reference](./reference.md). ### Server ```bash QUI__HOST=0.0.0.0 # Listen address QUI__PORT=7476 # Port number QUI__BASE_URL=/qui/ # Optional: serve from subdirectory ``` ### CORS ```bash QUI__CORS_ALLOWED_ORIGINS=https://sso.example.com,https://panel.example.com # Optional: explicit CORS allowlist (empty disables CORS) ``` `QUI__CORS_ALLOWED_ORIGINS` accepts comma- or space-separated origins. Entries must be explicit `http(s)://host[:port]` values, without wildcards, paths, query strings, fragments, or userinfo. ### Security ```bash QUI__SESSION_SECRET_FILE=... # Path to file containing secret. Takes precedence over QUI__SESSION_SECRET QUI__SESSION_SECRET=... # Auto-generated if not set QUI__SESSION_COOKIE_SECURE=false # Set to true behind an HTTPS reverse proxy ``` ### Logging ```bash QUI__LOG_LEVEL=DEBUG # Options: ERROR, DEBUG, INFO, WARN, TRACE (default: DEBUG) QUI__LOG_PATH=... # Optional: log file path QUI__LOG_MAX_SIZE=50 # Optional: rotate when the log file is larger than N MB (default: 50) QUI__LOG_MAX_BACKUPS=10 # Optional: retain N rotated files (default: 10, 0 keeps all) ``` If you set `logPath`, qui writes the log to disk with size-based rotation. Adjust `logMaxSize` and `logMaxBackups` in `config.toml`, or set the equivalent environment variables. qui compresses rotated files with gzip. Measured on real qui logs, a 50 MB file compresses to 2 to 3 MB, so ten backups use about 25 MB. The ratio depends on the content of your log. Log rotation and retention apply only when you set `logPath`. If you run qui in Docker, it writes logs to stdout by default. Rotation does not apply to these logs. To limit the size of the container log, set `QUI__LOG_PATH`. As an alternative, set the `max-size` option on the container log driver. ### Storage ```bash QUI__DATA_DIR=... # Optional: custom runtime data directory (default: next to config) ``` qui uses `QUI__DATA_DIR` for the tracker icon cache and, by default, for backups. With the default `sqlite` engine, qui also stores `qui.db` there. Log files follow `QUI__LOG_PATH`. qui resolves a relative log path against the config directory, not the data directory. ```bash QUI__BACKUP_DIR=... # Optional: custom backup directory (default: /backups) ``` `QUI__BACKUP_DIR` sets where qui writes [backup](../features/backups.md) manifests, archives, and cached `.torrent` files. Point it at separate storage, for example a redundant array or a network share. If the data drive fails, your backups remain safe. If you change this on an existing install, move the contents of `/backups` to the new directory. ```bash QUI__CUSTOM_THEMES_DIR=... # Optional: directory for sideloaded custom theme .css files (default: /themes) ``` `QUI__CUSTOM_THEMES_DIR` sets where qui reads [custom themes](../features/custom-themes.md) from. It defaults to a `themes` folder next to the config file (`/config/themes` in Docker), and qui creates it automatically. Loading custom themes requires premium access. #### UI preferences qui stores UI preferences, such as table columns, column sizes, density, filters, and theme, in the database. The browser maintains a local copy to apply these preferences before loading database values. If these preferences reset after a restart, make sure that qui uses a persistent database. If you use SQLite, keep `qui.db` in persistent storage. If you run Docker, persist `/config` or the directory set by `QUI__DATA_DIR`. ### Database ```bash QUI__DATABASE_ENGINE=sqlite # sqlite or postgres (default: sqlite) QUI__DATABASE_DSN=... # Full Postgres DSN (preferred for Postgres) QUI__DATABASE_HOST=localhost # Postgres host when not using DATABASE_DSN QUI__DATABASE_PORT=5432 # Postgres port when not using DATABASE_DSN QUI__DATABASE_USER=... # Postgres user when not using DATABASE_DSN QUI__DATABASE_PASSWORD=... # Postgres password when not using DATABASE_DSN QUI__DATABASE_NAME=qui # Postgres database name when not using DATABASE_DSN QUI__DATABASE_SSL_MODE=disable # disable, require, verify-ca, verify-full QUI__DATABASE_CONNECT_TIMEOUT=10 # Connect timeout in seconds QUI__DATABASE_MAX_OPEN_CONNS=25 # Postgres pool max open connections QUI__DATABASE_MAX_IDLE_CONNS=5 # Postgres pool max idle connections QUI__DATABASE_CONN_MAX_LIFETIME=300 # Max connection lifetime in seconds ``` #### SQLite or Postgres Both engines run the same features. For most installs, switching engines provides no performance benefit. qui runs SQLite in WAL mode with a separate read pool, so reads do not block writes. If you need to host the database on a separate machine, or if heavy cross-seed activity and multiple automated instances hit SQLite write limits, select Postgres. You cannot reverse the migration. See [`qui db migrate`](./cli-commands.md). ### qBittorrent connection ```bash QUI__QBITTORRENT_TIMEOUT=60 # Optional: HTTP timeout in seconds for requests qui makes to qBittorrent instances (default: 60). Raise it for very large or slow instances. ``` ### Cross-seed ```bash QUI__CROSS_SEED_RECOVER_ERRORED_TORRENTS=false # Optional: recover errored/missingFiles torrents; can add ~25+ minutes per torrent (default: false) ``` ### Tracker icons ```bash QUI__TRACKER_ICONS_FETCH_ENABLED=false # Optional: set to false to stop tracker icon and peer client logo downloads (default: true) ``` ### Updates ```bash QUI__CHECK_FOR_UPDATES=false # Optional: disable update checks and UI indicators (default: true) QUI__DISABLE_SELF_UPDATE=true # Optional: turn off Self-update, for packages that control the qui version (default: false) ``` ### Profiling (pprof) ```bash QUI__PPROF_ENABLED=true # Optional: enable pprof server (default: false) QUI__PPROF_ADDR=127.0.0.1:6060 # Optional: pprof bind address (default: 127.0.0.1:6060) ``` ### Metrics ```bash QUI__METRICS_ENABLED=true # Optional: enable Prometheus metrics (default: false) QUI__METRICS_HOST=127.0.0.1 # Optional: metrics server bind address (default: 127.0.0.1) QUI__METRICS_PORT=9074 # Optional: metrics server port (default: 9074) QUI__METRICS_BASIC_AUTH_USERS=user:password # Optional: basic auth for metrics (plaintext password) ``` ### Authentication ```bash QUI__AUTH_DISABLED=true # Optional: disable built-in auth (default: false) QUI__I_ACKNOWLEDGE_THIS_IS_A_BAD_IDEA=true # Required confirmation to actually disable auth QUI__AUTH_DISABLED_ALLOWED_CIDRS=127.0.0.1/32,192.168.1.0/24 # Required when auth is disabled (IPs or CIDRs) ``` qui disables built-in authentication only when: - `QUI__AUTH_DISABLED=true` - `QUI__I_ACKNOWLEDGE_THIS_IS_A_BAD_IDEA=true` - `QUI__AUTH_DISABLED_ALLOWED_CIDRS` contains one or more allowed IPs or CIDR ranges If you disable authentication and `QUI__AUTH_DISABLED_ALLOWED_CIDRS` is missing or invalid, qui refuses to start and rejects invalid live reloads. `QUI__AUTH_DISABLED_ALLOWED_CIDRS` accepts comma-separated entries. Each entry can be a canonical CIDR (`192.168.1.0/24`) or a single IP (`10.0.0.5`). qui treats a single IP as `/32` or `/128`. qui rejects non-canonical CIDRs with host bits set (for example `10.0.0.5/8`). You cannot combine `QUI__OIDC_ENABLED=true` with auth-disabled mode. If qui runs behind a reverse proxy that already handles authentication (for example Authelia, Authentik, or Caddy with forward_auth), you can use this mode. See the [Configuration Reference](./reference.md#authentication) for a full explanation of the risks. The built-in health endpoints (`/health`, `/healthz/readiness`, `/healthz/liveness`) always allow loopback probes. If your allowlist only includes reverse proxy subnets, the official Docker image healthcheck still works. ### External programs Configure the allow list in `config.toml`. It has no environment override. ```bash QUI__EXTERNAL_PROGRAM_MAX_RUNNING=16 # Optional: how many external programs run at the same time (default: 8) ``` ### Default locations - **Linux/macOS**: `~/.config/qui/config.toml` - **Windows**: `%APPDATA%\qui\config.toml` --- ## qui log level, log files, and live log viewer ## Logging The **Logs** tab under **Settings** shows a live view of the qui log stream. You can also change the logging configuration without a restart. ### Configuration Click the gear button in the top right corner of the Logs panel to open the configuration form. Click **Save Settings** to apply your changes. | Field | Description | Default | |-------|-------------|---------| | Log Level | One of `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR` | `DEBUG` | | Log File Path | File to write logs to. Leave empty to log to stdout only. | empty | | Max Size (MB) | File size that starts a rotation. Minimum 1. | 50 | | Max Backups | Number of rotated files that qui keeps. `0` keeps all. | 10 | qui writes these values to `config.toml` and applies them immediately. The same keys are also available as `config.toml` entries and environment variables. See [Configuration Reference](./reference.md) and [Environment Variables](./environment.md) for the full tables. :::note If an environment variable such as `QUI__LOG_LEVEL` sets a value, the matching field shows a lock badge and you cannot change it from the UI. Change or remove the environment variable instead. The `--log-path` flag of `qui serve` also locks the **Log File Path** field. Remove the flag to edit the path in the UI. ::: #### Which level to use `DEBUG` is the default and records enough detail for most problem reports. When you report an issue, use `DEBUG` logs. `TRACE` adds per-request and per-sync-tick detail and makes the log grow quickly. If a developer asks for it, enable `TRACE`. ### Live log viewer The viewer connects to the qui log stream over SSE. On connect, it loads the most recent 1,000 lines and then follows new output live. A green dot shows a healthy connection. If the connection drops, the viewer reconnects after 3 seconds. The toolbar gives you these controls: - **Search**. Matches against the log message and the structured fields of each entry. - **Level filter**. Select which of the five levels to show. **All** and **None** toggle every level at once. qui remembers your choice in every browser you use. The filter only hides entries in the viewer. The **Log Level** setting still decides what qui writes to stdout and the log file, and the viewer cannot show levels below it. - **Clear**. Empties the current view. - **Auto-scroll**. Follows the newest entries. Turn it off to pause and scroll back. While auto-scroll is on, the viewer keeps the newest 1,000 entries and trims older ones. When auto-scroll is off, it keeps up to 10,000 entries. When that limit is reached, qui drops the oldest entries and shows a warning. Click a structured entry to open it in a dialog with formatted JSON. **Copy Raw** copies the original log line. **Copy JSON** copies the formatted version. ### Muting messages Hover over the level badge of a noisy entry and click the **X** to mute it. The viewer then hides every entry with the same message text. Structured fields can differ, so one mute covers a repeating message across all instances. When at least one mute exists, a button with the mute count, for example **3 Muted**, appears in the toolbar. Open it to unmute single messages or click **Clear all** to remove every mute. qui stores the mute list in its database, so it applies in every browser you use. ### Log files When you set a log file path, a **Log files** list appears below the viewer. It shows the active log file and its rotated backups with size and modification time. Click the download button to save a file to your machine. qui compresses rotated files with gzip. The download endpoint serves only qui's own log files from the log directory, not other files that live next to them. --- ## OpenID Connect single sign-on for qui ## OpenID Connect (OIDC) Set `QUI__OIDC_ENABLED=true` to delegate authentication to an external identity provider. You must also set the issuer, client ID, client secret, and redirect URL. If one of these values is missing, or qui cannot reach the issuer, qui does not start. When OIDC is enabled, the login screen shows an **OpenID Connect** button. If your provider advertises PKCE (`S256`) support, qui uses it for the authorization flow. You do not need to configure extra settings in qui. To make sure that PKCE is active, inspect `/api/auth/oidc/config`. The `authorizationUrl` must include both `code_challenge=` and `code_challenge_method=S256`. qui does not emit a dedicated "PKCE enabled" log line, so check the authorization URL directly. qui accepts every identity that the provider permits for the qui client. qui has one user and no identity allowlist of its own. Restrict the client on the provider side, for example with a group or user assignment, so that only you can sign in. An `https://` redirect URL marks the session cookie as Secure, so the browser sends it only over HTTPS. See [Sessions](./reference.md#sessions). For the full mapping (TOML keys + environment variables + defaults), see [Configuration Reference](./reference.md). ### Configuration options | Variable | Description | |----------|-------------| | `QUI__OIDC_ISSUER` | Issuer URL from your IdP (for example `https://auth.example.com/realms/main`) | | `QUI__OIDC_CLIENT_ID` | Client ID registered for qui | | `QUI__OIDC_CLIENT_SECRET` | Client secret generated by the provider | | `QUI__OIDC_CLIENT_SECRET_FILE` | Path to a file that contains the client secret. This setting overrides `QUI__OIDC_CLIENT_SECRET` | | `QUI__OIDC_REDIRECT_URL` | Must match the redirect URI allowed by the provider | | `QUI__OIDC_DISABLE_BUILT_IN_LOGIN` | When OIDC is enabled, set to `true` to hide the local username/password form | ### Redirect URL format If you use a default install, use: ```text http://localhost:7476/api/auth/oidc/callback ``` If you use a reverse proxy, include your base URL: ```text https://host/qui/api/auth/oidc/callback ``` If you run OIDC behind an SSO proxy (for example Cloudflare Access or Pangolin), read [SSO proxies and CORS](../advanced/sso-proxy-cors.md) for browser fetch behavior and proxy-side configuration. ### Example configuration ```bash QUI__OIDC_ENABLED=true \ QUI__OIDC_ISSUER=https://auth.example.com/realms/main \ QUI__OIDC_CLIENT_ID=qui \ QUI__OIDC_CLIENT_SECRET=super-secret-value \ QUI__OIDC_REDIRECT_URL=https://qui.example.com/api/auth/oidc/callback \ QUI__OIDC_DISABLE_BUILT_IN_LOGIN=true \ qui serve ``` You can set the same options in `config.toml` with the `oidc*` keys that `qui generate-config` writes. --- ## qui config.toml reference ## Configuration Reference qui reads configuration from two sources: - `config.toml`, which qui creates on first run or with `qui generate-config` - environment variables (`QUI__...`) that override `config.toml` This page documents both in one place. ### Precedence Highest wins: 1. `QUI__*_FILE` (for supported secrets) 2. `QUI__*` environment variables 3. `config.toml` 4. built-in defaults ### Config file location Default `config.toml` locations: - Linux/macOS: `~/.config/qui/config.toml` - Windows: `%APPDATA%\qui\config.toml` Override the location with `--config-dir`: - directory path: `--config-dir /path/to/config/` (uses `/path/to/config/config.toml`) - file path (backward compatibility): `--config-dir /path/to/custom.toml` ### Reloading qui watches `config.toml` for changes. qui applies some settings immediately, for example logging, tracker icon fetching, and the auth-disabled settings. If you change other settings, restart qui. ### Settings | TOML key | Environment variable | Type | Default | Notes | |---|---|---:|---|---| | `host` | `QUI__HOST` | string | `localhost` (or `0.0.0.0` in containers) | Bind address for the main HTTP server. | | `port` | `QUI__PORT` | int | `7476` | Port for the main HTTP server. | | `baseUrl` | `QUI__BASE_URL` | string | `/` | Serve qui from a subdirectory (example: `/qui/`). qui normalizes the value at startup and adds missing leading and trailing slashes. | | `corsAllowedOrigins` | `QUI__CORS_ALLOWED_ORIGINS` | string[] | empty list | Explicit CORS allowlist. An empty list disables CORS. Origins must match `http(s)://host[:port]`. qui rejects wildcards and normalizes default ports. Restart required. | | `allowedHosts` | `QUI__ALLOWED_HOSTS` | string[] | empty list | Restricts the received HTTP Host. Accepts exact hostnames, IP addresses, and leading `*.` subdomain wildcards. Restart required. See [Allowed Hosts](#allowed-hosts). | | `sessionSecret` | `QUI__SESSION_SECRET` / `QUI__SESSION_SECRET_FILE` | string | auto-generated | WARNING: a changed value breaks decryption of stored instance passwords. You must enter them again in the UI. The value cannot be empty. Use at least 32 characters on a new install. Leave the value alone on an install that already stores credentials. On the first start after upgrading, qui re-encrypts stored credentials under a key derived from this secret. A credential that does not decrypt is left as it is. qui warns about it on every start until you enter it again. The re-encryption is one way, so an older qui cannot read the new values. After rolling back, enter the credentials again or restore a database backup taken before the upgrade. | | `sessionCookieSecure` | `QUI__SESSION_COOKIE_SECURE` | bool | `false` | Sends the browser session cookie only over HTTPS. Enable it when you serve qui through an HTTPS reverse proxy. An HTTPS `oidcRedirectUrl` enables it automatically. When enabled, login over plain HTTP does not work. See [Sessions](#sessions). Restart required. | | `logLevel` | `QUI__LOG_LEVEL` | string | `DEBUG` | `ERROR`, `DEBUG`, `INFO`, `WARN`, `TRACE`. `DEBUG` records sufficient detail to diagnose most reports. `TRACE` adds per-request and per-sync-tick detail and makes the file grow quickly. qui applies changes immediately. | | `logPath` | `QUI__LOG_PATH` | string | empty | If empty, qui logs to stdout. qui resolves relative paths against the config directory. qui applies changes immediately. | | `logMaxSize` | `QUI__LOG_MAX_SIZE` | int | `50` | Size in MB that starts log rotation. qui applies changes immediately. | | `logMaxBackups` | `QUI__LOG_MAX_BACKUPS` | int | `10` | Number of rotated files that qui keeps. `0` keeps all. qui compresses rotated files with gzip. A 50 MB qui log file compresses to 2 to 3 MB. qui applies changes immediately. | | `dataDir` | `QUI__DATA_DIR` | string | empty | If empty, qui uses the directory that contains `config.toml`. qui stores the tracker icon cache here, and backups by default (`/backups`). If `databaseEngine=sqlite`, `qui.db` also lives here. Log files follow `logPath`, which qui resolves against the config directory. Restart qui after a change. | | `backupDir` | `QUI__BACKUP_DIR` | string | empty | If empty, qui uses `/backups`. Directory for [backup](../features/backups.md) manifests, archives, and cached `.torrent` files. qui resolves relative paths against the config directory. If you change this on an existing install, move the contents of `/backups` to the new directory. Restart required. | | `customThemesDir` | `QUI__CUSTOM_THEMES_DIR` | string | empty | Directory for sideloaded [custom theme](../features/custom-themes.md) `.css` files. If empty, qui uses `/themes` (auto-created). qui resolves relative paths against the config directory. Listing themes requires premium access. qui applies config changes on the next request. | | `databaseEngine` | `QUI__DATABASE_ENGINE` | string | `sqlite` | `sqlite` or `postgres`. If you do not migrate, keep `sqlite` on an existing install. Restart required. | | `databaseDsn` | `QUI__DATABASE_DSN` / `QUI__DATABASE_DSN_FILE` | string | empty | Full Postgres DSN. If `databaseEngine=postgres`, prefer this setting. | | `databaseHost` | `QUI__DATABASE_HOST` | string | `localhost` | If you do not use `databaseDsn`, this sets the Postgres host. | | `databasePort` | `QUI__DATABASE_PORT` | int | `5432` | If you do not use `databaseDsn`, this sets the Postgres port. | | `databaseUser` | `QUI__DATABASE_USER` | string | empty | If you do not use `databaseDsn`, this sets the Postgres user. | | `databasePassword` | `QUI__DATABASE_PASSWORD` / `QUI__DATABASE_PASSWORD_FILE` | string | empty | If you do not use `databaseDsn`, this sets the Postgres password. | | `databaseName` | `QUI__DATABASE_NAME` | string | `qui` | If you do not use `databaseDsn`, this sets the Postgres database name. | | `databaseSSLMode` | `QUI__DATABASE_SSL_MODE` | string | `disable` | Common values: `disable`, `require`, `verify-ca`, `verify-full`. | | `databaseConnectTimeout` | `QUI__DATABASE_CONNECT_TIMEOUT` | int | `10` | Postgres connect timeout in seconds. | | `databaseMaxOpenConns` | `QUI__DATABASE_MAX_OPEN_CONNS` | int | `25` | Postgres pool max open connections. | | `databaseMaxIdleConns` | `QUI__DATABASE_MAX_IDLE_CONNS` | int | `5` | Postgres pool max idle connections. | | `databaseConnMaxLifetime` | `QUI__DATABASE_CONN_MAX_LIFETIME` | int | `300` | Postgres connection max lifetime in seconds. | | `qbittorrentTimeout` | `QUI__QBITTORRENT_TIMEOUT` | int | `60` | HTTP timeout in seconds for requests qui makes to qBittorrent instances (sync, health checks). If you run large or slow instances, raise this value. Restart required. | | `checkForUpdates` | `QUI__CHECK_FOR_UPDATES` | bool | `true` | Controls update checks and UI indicators. qui applies changes on config reload. If you set it with the environment variable, restart qui. | | `disableSelfUpdate` | `QUI__DISABLE_SELF_UPDATE` | bool | `false` | If `true`, the web UI cannot install an update. The update dialog explains this and gives manual update steps. `qui update` from the shell still works. This setting does not affect Restart. If you maintain a package that controls the qui version, set this value in the package. Restart required. | | `trackerIconsFetchEnabled` | `QUI__TRACKER_ICONS_FETCH_ENABLED` | bool | `true` | Disable this setting to stop downloads of tracker favicons and peer client logos. qui applies changes immediately. | | `crossSeedRecoverErroredTorrents` | `QUI__CROSS_SEED_RECOVER_ERRORED_TORRENTS` | bool | `false` | If enabled, cross-seed automation attempts recovery (pause, recheck, resume) for errored/missingFiles torrents. This process can add 25+ minutes per torrent. Restart qui after a change. | | `pprofEnabled` | `QUI__PPROF_ENABLED` | bool | `false` | Enables the pprof server (`/debug/pprof/`). Restart required. | | `pprofAddr` | `QUI__PPROF_ADDR` | string | `127.0.0.1:6060` | pprof server bind address. The default loopback address prevents collisions with other listeners in a shared network namespace (for example a Tailscale sidecar). Restart required. | | `metricsEnabled` | `QUI__METRICS_ENABLED` | bool | `false` | Enables a Prometheus metrics server on a separate port. Restart required. | | `metricsHost` | `QUI__METRICS_HOST` | string | `127.0.0.1` | Metrics server bind address. Restart required. | | `metricsPort` | `QUI__METRICS_PORT` | int | `9074` | Metrics server port. Restart required. | | `metricsBasicAuthUsers` | `QUI__METRICS_BASIC_AUTH_USERS` | string | empty | Optional basic auth: `user:password` or `user1:password1,user2:password2`. Passwords are plaintext and can contain colons. Usernames cannot contain colons. Commas cannot appear in credentials. Restart required. | | `externalProgramAllowList` | (none) | string[] | empty list | Restricts which executables qui can launch from the UI. Configure this only in `config.toml` (no env override). | | `externalProgramMaxRunning` | `QUI__EXTERNAL_PROGRAM_MAX_RUNNING` | int | `8` | Maximum number of external programs that run at the same time. Other programs wait for a free slot. A value of 0 or less uses the default. See [Execution limit](../features/external-programs.md#execution-limit). Restart required. | | `authDisabled` | `QUI__AUTH_DISABLED` | bool | `false` | Disables all built-in authentication. You must set **both** this and `I_ACKNOWLEDGE_THIS_IS_A_BAD_IDEA` to `true` to disable auth. See [Authentication](#authentication) below. qui applies changes on config reload. | | `I_ACKNOWLEDGE_THIS_IS_A_BAD_IDEA` | `QUI__I_ACKNOWLEDGE_THIS_IS_A_BAD_IDEA` | bool | `false` | Required confirmation for `authDisabled`. Acknowledges that qui without authentication can permit unauthorized access to your torrent clients and can cause private tracker bans. qui applies changes on config reload. | | `authDisabledAllowedCIDRs` | `QUI__AUTH_DISABLED_ALLOWED_CIDRS` | string[] | empty list | If auth is disabled, this setting is required. Restricts access to specific client IPs and CIDRs. Entries can be canonical CIDRs or single IPs. qui applies changes on config reload. | | `oidcEnabled` | `QUI__OIDC_ENABLED` | bool | `false` | Enables OpenID Connect authentication. Restart required. | | `oidcIssuer` | `QUI__OIDC_ISSUER` | string | empty | OIDC issuer URL. Restart required. | | `oidcClientId` | `QUI__OIDC_CLIENT_ID` | string | empty | OIDC client ID. Restart required. | | `oidcClientSecret` | `QUI__OIDC_CLIENT_SECRET` / `QUI__OIDC_CLIENT_SECRET_FILE` | string | empty | OIDC client secret. Restart required. | | `oidcRedirectUrl` | `QUI__OIDC_REDIRECT_URL` | string | empty | Must match the provider redirect URI. If you use a reverse proxy, include `baseUrl`. Restart required. | | `oidcDisableBuiltInLogin` | `QUI__OIDC_DISABLE_BUILT_IN_LOGIN` | bool | `false` | If OIDC is enabled, this hides the local username and password form. Restart required. | ### Authentication To disable the built-in authentication of qui, set all of the following: ```bash QUI__AUTH_DISABLED=true QUI__I_ACKNOWLEDGE_THIS_IS_A_BAD_IDEA=true QUI__AUTH_DISABLED_ALLOWED_CIDRS=127.0.0.1/32,192.168.1.0/24 ``` The second variable is an explicit acknowledgement of the risks. `QUI__AUTH_DISABLED_ALLOWED_CIDRS` is mandatory and is a hard IP allowlist. If auth is disabled and the value is missing or invalid, qui refuses to start and rejects invalid live reloads. Entries can be: - canonical CIDR ranges (`192.168.1.0/24`) - single IPs (`10.0.0.5`), which qui treats as `/32` (IPv4) or `/128` (IPv6) qui rejects non-canonical CIDRs with host bits set (for example `10.0.0.5/8`). You cannot enable `oidcEnabled` and auth-disabled mode at the same time. When authentication is disabled: - qui permits requests only from client IPs that match `authDisabledAllowedCIDRs`. - The built-in health endpoints (`/health`, `/healthz/readiness`, `/healthz/liveness`) still allow loopback probes. The official Docker image healthcheck works without `127.0.0.1/32` or `::1/128` in your reverse proxy allowlist. - `/api/auth/me` returns a synthetic `admin` user, so the frontend works without login. - `/api/auth/validate` returns a synthetic `admin` user, so callback and session checks work without login. - qui skips the setup screen. **Only use this mode when qui is behind a reverse proxy that already handles authentication** (for example Authelia, Authentik, or Caddy with forward_auth). :::danger Private tracker risks If you use private trackers, running qui without authentication creates severe risk. Anyone with network access can add, remove, or modify torrents in your clients. Unwanted uploads, ratio manipulation, or hit-and-runs can cause permanent account bans on private trackers. ::: If you set `QUI__AUTH_DISABLED` without `QUI__I_ACKNOWLEDGE_THIS_IS_A_BAD_IDEA`, qui logs a warning and keeps authentication enabled. ### Sessions The web UI signs in with a browser session cookie. These rules apply to that cookie: - `sessionCookieSecure = true` adds the Secure attribute to the cookie. An HTTPS `oidcRedirectUrl` also adds it. With the attribute set, the browser never sends the cookie over plain HTTP, so HTTP access to the same instance stops working. Without it, the cookie travels over both HTTP and HTTPS. - Finish the initial setup before you expose qui to the Internet. The first client that reaches an unconfigured instance can create the account. - Cookie-authenticated `POST`, `PUT`, `PATCH`, and `DELETE` requests must send an `X-Requested-With` header. The web UI and the Swagger UI do this. Scripts and other clients must use an [API key](../api/overview.md) instead of the cookie. - `/api/auth/setup` and `/api/auth/login` accept only `Content-Type: application/json`. Other media types get HTTP 415. - After five failed password logins in one minute, qui rejects password logins with HTTP 429 until the minute passes. This limit is process-wide and does not apply to OIDC or API keys. - A password change ends every session, including the browser that changed it. Sign in again with the new password. ### Allowed Hosts `allowedHosts` restricts the hostnames and IP addresses that requests can use to reach qui. An unset or empty list permits all hosts, including when authentication is disabled. To enable the restriction, set a TOML string array or a comma-separated environment value: ```toml allowedHosts = ["qui.example.com", "localhost", "::1", "*.home.example.com"] ``` ```bash QUI__ALLOWED_HOSTS=qui.example.com,localhost,::1,*.home.example.com ``` qui checks the `Host` that it receives and ignores `X-Forwarded-Host`. Caddy and Traefik pass the original `Host`, so list the public name of qui. By default, nginx sends the address of the upstream instead. Set `proxy_set_header Host $host;` to pass the original name. If a reverse proxy rewrites `Host`, list the rewritten name. The proxy must then reject unwanted public hostnames itself, because qui only sees the rewritten name. Matching rules: - DNS names ignore case and one final dot. International names and their punycode forms match. - qui compares IP addresses by value, so `::1` and `[::1]` match the same address. - Request ports do not affect matching. Do not include ports in the configured list. - `*.example.com` matches `qui.example.com` and `a.qui.example.com`. It does not match `example.com` or `badexample.com`. - Schemes, paths, CIDR ranges, other wildcard forms, and empty entries are invalid. Invalid configuration prevents startup. The restriction covers all requests on the main HTTP listener, including authenticated requests, static files, and the qBittorrent proxy. With a configured list, a missing, invalid, or unlisted Host returns HTTP 400. Your own browser and API requests must also use a listed hostname or address. qui always adds `localhost`, `127.0.0.1`, `::1`, and the hostname of the machine to a configured list, so local access keeps working. qui logs the full list at startup. When authentication is disabled and the list is empty, qui logs a warning at startup. Health `GET` and `HEAD` requests to `/health`, `/healthz/readiness`, and `/healthz/liveness` bypass the list when the immediate connection peer is a loopback address. This includes external health requests forwarded by a local reverse proxy. To restrict health endpoints to local probes, block external health requests at the proxy. Forwarded IP headers do not affect this exemption. The Docker health probe continues to work. qui reads the list once at startup. Restart qui after each change to `allowedHosts`. The list works together with authentication and the IP allowlist. It blocks DNS rebinding, an attack where a hostname of the attacker points at the address of qui. That hostname is not on the list, so qui rejects the request. It does not block requests that use a listed hostname. ### CORS By default, qui does not send CORS allow headers. To allow browser requests from another trusted origin, set `corsAllowedOrigins` (or `QUI__CORS_ALLOWED_ORIGINS`) to an explicit allowlist: ```bash QUI__CORS_ALLOWED_ORIGINS=https://sso.example.com,https://panel.example.com ``` Rules: - qui allows only explicit origins (`http://` or `https://` + host + optional non-default port) - qui rejects wildcards (`*`, `https://*.example.com`, and similar patterns) - qui rejects values with a path, query, fragment, or userinfo - If a startup value is invalid, qui stops. On live reload, qui logs an invalid value and keeps the running allowlist until a restart. For SSO proxy setups, configure CORS on the proxy auth endpoints first. See [SSO Proxies and CORS](../advanced/sso-proxy-cors.md). ### Example `config.toml` ```toml host = "0.0.0.0" port = 7476 baseUrl = "/qui/" logLevel = "DEBUG" logPath = "log/qui.log" logMaxSize = 50 logMaxBackups = 10 trackerIconsFetchEnabled = false externalProgramAllowList = [ "/usr/local/bin", "/home/user/bin/my-script", ] ``` --- ## qBittorrent automation rules ## Automations Automations are rules that apply actions to torrents that match conditions. Use them to manage speed limits, delete old torrents, and organize torrents with tags and categories. ### How automations work qui evaluates automations in **sort order**. For exclusive actions such as delete, the first match wins. Each rule matches torrents with a query builder that supports nested conditions. - **Automatic**: A background service scans torrents every 20 seconds. - **Per-rule intervals**: Each rule can have its own interval (minimum 60 seconds, default 15 minutes). - **Per-rule notifications**: If you configure notification targets, each rule can opt in or out of automation notifications. - **Manual dry-run**: Run "Dry-run now" from the workflow dialog or "Run dry-run now" from the workflow menu. - **Manual run**: Run "Run now" from the workflow dialog or the workflow menu. See [Run a workflow now](#run-a-workflow-now). - **Debouncing**: qui does not process the same torrent again within 2 minutes. ### Query builder The query builder supports complex nested conditions with AND/OR groups. Drag conditions to reorder them. #### Available condition fields ##### Identity fields | Field | Description | | --- | --- | | Name | Torrent display name (supports cross-category operators) | | Hash | Info hash | | Infohash v1 | BitTorrent v1 info hash | | Infohash v2 | BitTorrent v2 info hash | | Magnet URI | Magnet link for the torrent | | Category | qBittorrent category | | Tags | Set-based tag matching | | State | Status filter (see State Values below) | | Created By | Torrent creator metadata | ##### Path fields | Field | Description | | --- | --- | | Save Path | Download location | | Content Path | Full path to content | | Download Path | Session download path from qBittorrent | ##### Size fields (bytes) | Field | Description | | --- | --- | | Size | Selected file size | | Total Size | Total torrent size | | Completed | Completed bytes | | Downloaded | Bytes downloaded | | Downloaded (Session) | Downloaded in current session | | Uploaded | Bytes uploaded | | Uploaded (Session) | Uploaded in current session | | Amount Left | Remaining bytes | | Free Space | Free space on disk (configurable source, see [Free Space source](#free-space-source)) | ##### Duration fields (seconds) | Field | Description | | --- | --- | | Added Age | Time since added | | Completed Age | Time since completed | | Inactive Time | Time since last activity | | Seen Complete Age | Time since torrent was last complete | | ETA | Estimated time to completion | | Reannounce In | Seconds until next announce | | Seeding Time | Time spent seeding | | Time Active | Total active time | | Max Seeding Time | Configured max seeding time | | Max Inactive Seeding Time | Configured max inactive seeding time | | Seeding Time Limit | Torrent seeding time limit | | Inactive Seeding Time Limit | Torrent inactive seeding time limit | ##### System time fields When qui evaluates a rule, these fields use qui's current system time. Use them for time windows, such as "only run at night" or "apply different actions on weekends". | Field | Description | | --- | --- | | System Hour | Current hour (`0-23`) | | System Minute | Current minute (`0-59`) | | System Day of Week | Current weekday (`0=Sun` to `6=Sat`) | | System Day | Current day of month (`1-31`) | | System Month | Current month (`1-12`) | | System Year | Current year | ###### Ranges that wrap On System Hour, System Minute, System Day of Week and System Month, a **between** range whose minimum is above its maximum wraps past the end of the field. For example, System Hour between `20` and `6` is true from 20:00 through 05:59, and false from 06:00 through 19:59. The minimum is included and the maximum is not, so set the maximum to the hour the window must stop. System Day and System Year do not wrap. A month boundary depends on the length of the month, and years only go up. On every other numeric field, a minimum above the maximum matches nothing. ##### Progress fields | Field | Description | | --- | --- | | Ratio | Upload/download ratio | | Ratio Limit | Configured ratio limit | | Max Ratio | qBittorrent max ratio value | | Uploaded / Size | Uploaded bytes divided by total torrent size. For cross-seeded torrents, use this instead of Ratio. | | Progress | Download progress (0-100%) | | Availability | Distributed copies available | | Popularity | Swarm popularity metric | ##### Speed fields (bytes/s) | Field | Description | | --- | --- | | Download Speed | Current download speed | | Upload Speed | Current upload speed | | Download Limit | Configured download speed limit | | Upload Limit | Configured upload speed limit | ##### Peer/queue fields | Field | Description | | --- | --- | | Active Seeders | Currently connected seeders | | Active Leechers | Currently connected leechers | | Total Seeders | Tracker-reported seeders | | Total Leechers | Tracker-reported leechers | | Trackers Count | Number of trackers | | Queue Priority | Torrent queue priority value | ##### Tracker/status fields | Field | Description | | --- | --- | | Tracker | Any tracker of the torrent (URL, domain, or customization display name) | | Private | Boolean: the torrent uses a private tracker | | Unregistered | Boolean: the tracker reports unregistered (requires qBittorrent 5.1+) | | Tracker status | Per-tracker announce status. See [Tracker status values](#tracker-status-values) (requires qBittorrent 5.1+). | | Tracker message | Per-tracker status message. Use `nil` for an empty message (requires qBittorrent 5.1+). | | Comment | Torrent comment field | **Tracker** matches every tracker the torrent announces to, including trackers that do not work. qui ignores the DHT, PeX, and LSD pseudo-trackers. If you configured [Tracker Customizations](./tracker-customizations.md) (Dashboard → **Tracker Breakdown**), the condition can also match the display name in addition to the raw URL or domain. A merged tracker group matches by its group name. On qBittorrent versions before 5.1, qui cannot read the full tracker list. **Tracker** then sees only the one tracker in the qBittorrent tracker field. That is the last tracker that answered, also when that tracker is down now. If no tracker answered yet, the field is empty. When qui finds no tracker at all, positive operators such as **is** and **contains** match nothing, and negative operators such as **is not** match every torrent. :::note Any tracker condition (**Tracker**, **Trackers (All)**, **Tracker status**, or **Tracker message**) makes qui read the tracker list of every torrent. qui sends one request for each instance and keeps the result for 5 minutes. Rules without a tracker condition, and rules that are turned off, send no extra request. On a large library, or on an instance whose qBittorrent Web UI is already slow, that request adds a delay to the automation run. ::: :::note Older rules can use a second field named **Trackers (All)**. It now behaves the same as **Tracker**, so qui no longer offers it for new rules. Your existing rules keep working. To stop seeing it, change the condition to **Tracker**. ::: ##### Mode fields | Field | Description | | --- | --- | | Auto-managed | Managed by automatic torrent management | | First/Last Piece Priority | First and last pieces are prioritized | | Force Start | Ignores queue limits and starts immediately | | Sequential Download | Downloads pieces sequentially | | Super Seeding | Super-seeding mode enabled | ##### Release/grouping fields | Field | Description | | --- | --- | | Content Type | Derived from release name parsing (useful for grouping): `movie`, `tv`, `music`, `audiobook`, `book`, `comic`, `game`, `app`, `adult`, or `unknown`. `book` also covers magazines; courses are `unknown` | | Effective Name | Normalized title derived from release parsing (useful for grouping, can be empty). Periods become spaces, so `S.W.A.T.` gives `s w a t` | | Release Source | Parsed release specifier (for example `WEBDL`, `WEBRIP`, `BLURAY`, can be empty) | | Release Resolution | Parsed release specifier (for example `1080p`, can be empty) | | Release Codec | Parsed release specifier (for example `HEVC`, can be empty) | | Release HDR | Parsed release specifier (for example `DV`, `HDR`, can be empty) | | Release Audio | Parsed release specifier (for example `TrueHD`, can be empty) | | Release Channels | Parsed release specifier (for example `5.1`, can be empty) | | Release Group | Parsed release specifier (for example `NTb`, can be empty) | | Release Year | Year parsed from the torrent name (for example `2021`). Numeric, best for movies and dated releases. Releases with no detectable year (including most TV episodes such as `S14E05`) never match any comparison operator, including `!=`. The condition's NOT toggle wraps the whole leaf, so `NOT (year = X)` still matches yearless releases | | Group Size | Size of the selected group for this condition (requires grouping. See [Grouping](#grouping)). | | Is Grouped | Boolean: true when selected group size > 1 (requires grouping. See [Grouping](#grouping)). | ##### Cross-seed fields | Field | Description | | --- | --- | | Exists on Other Instance | Boolean: a matching torrent exists on at least one other active instance | | Seeding on Other Instance | Boolean: a matching torrent is actively seeding on at least one other active instance | | Cross-seed Exists on Same Instance | Boolean: another matching torrent exists on this instance | | Cross-seed Seeding on Same Instance | Boolean: another matching torrent is actively seeding on this instance | | Cross-seed Tags | String: the tags of this torrent and all of its same-instance cross-seeds as one set. NOT operators match only when no copy has the tag. Same matching rules as **Tags** (see [Tag conditions](#tag-conditions)). If there are no cross-seeds, qui checks only the torrent's own tags. | | Season pack status | `pack`, `packed`, `unpacked`, or empty. Whether this torrent is a season pack, an episode covered by a season pack of the same release on this instance, or an episode with no such pack (see [Season pack status](#season-pack-status)) | | Season pack status (any instance) | Same as **Season pack status**, but a season pack on any active instance counts | ##### Filesystem fields | Field | Description | | --- | --- | | Hardlink Scope | `none`, `torrents_only`, `inside_qbittorrent`, or `outside_qbittorrent` (requires local filesystem access, see [Hardlink detection](#hardlink-detection)) | | Hardlink Scope (Cross-Instance) | `none`, `torrents_only`, `inside_qbittorrent`, or `outside_qbittorrent` across all instances (requires local filesystem access) | | Has Missing Files | Boolean: a completed torrent has files missing on disk (requires local filesystem access) | | Has Skipped Files | Boolean: one or more files are set to `Do not download`. qui reads file priorities from its files cache, so a priority change made outside qui can take up to 5 minutes to reach this field | #### State values The State field matches these status buckets: | State | Description | | --- | --- | | `downloading` | Actively downloading | | `uploading` | Actively uploading | | `completed` | Download finished | | `stopped` | Paused by user | | `active` | Has transfer activity | | `inactive` | No current activity | | `running` | Not paused | | `stalled` | No peers available | | `stalled_uploading` | Stalled while uploading | | `stalled_downloading` | Stalled while downloading | | `errored` | Has errors | | `tracker_down` | Tracker unreachable | | `tracker_error` | A tracker returned an explicit error | | `checking` | File check in progress | | `checkingResumeData` | Checking resume data | | `moving` | Moving files | | `missingFiles` | Files not found | | `unregistered` | Tracker reports unregistered | `tracker_down` and `tracker_error` require qBittorrent 5.1+ (Web API 2.11.4+). On older instances, the query builder disables these values. #### Tracker status values If **any** of a torrent's real trackers reports the selected status, the **Tracker status** field matches. qui ignores qBittorrent's DHT/PeX/LSD pseudo-trackers. Pick a value from the dropdown: | Status | Description | | --- | --- | | Not contacted | The client did not contact the tracker yet | | Working | The client contacted the tracker and it works | | Updating | A tracker update is in progress | | Error | Announce failed (generic) | | Tracker error | The tracker returned an explicit error | | Unreachable | The client cannot connect to the tracker | **Tracker message** matches the per-tracker status message with standard string operators. To match an empty or non-empty message, use the literal value `nil` with **is** or **is not**. Both fields require **qBittorrent 5.1+** (Web API 2.11.4+). On older instances, the query builder disables them. #### Operators **String:** equals, not equals, contains, not contains, starts with, ends with, matches regex **Numeric:** `=`, `!=`, `>`, `>=`, `<`, `<=`, between A **between** range includes both ends. The one exception is a range that wraps on a clock field, described in [Ranges that wrap](#ranges-that-wrap). **Boolean:** is, is not **State:** is, is not **Cross-Category (Name field only):** - `EXISTS_IN`: exact name match in the target category - `CONTAINS_IN`: partial name match in the target category. The comparison is case-insensitive and accent-insensitive, and treats `.`, `_` and `-` as spaces, so "Amélie.2001" matches "Amelie 2001". #### Regex support There are two ways to use regex in filter conditions: **The `matches regex` operator** treats the value as a regex pattern. If the pattern matches anywhere in the field value, the condition is true. **The regex toggle (`.*` button)** appears next to the value input on the other string operators: `equals`, `contains`, `not contains`, `starts with`, and `ends with`. When you enable the toggle, qui treats the value as a regex pattern. :::warning Regex toggle changes the selected operator When the regex toggle is on, `equals`, `contains`, `starts with`, and `ends with` all behave as `matches regex`. Exact, containment, prefix, and suffix matching do not apply. `not equals` and `not contains` invert the regex result. They are true only when the pattern does **not** match. You can also negate a regex match with the **NOT toggle** (the `IF / IF NOT` button at the start of the condition row) together with the `matches regex` operator. ::: qui supports full RE2 (Go regex) syntax. Patterns are case-insensitive by default. A regex is not anchored. Use `^` and `$` for a full-string match (example: `^BHD$`). Field notes: - **Tracker**: qui checks the pattern against multiple candidates for each tracker (raw URL, extracted domain, and the optional customization display name). If a regex is negative, it passes only when **none** of the candidates match. - **Tags**: If you do not use regex, qui applies string operators per tag. If you turn regex on, qui matches the pattern against the full raw tags string. The UI validates patterns and shows an error for invalid regex. #### Tag conditions Each tag condition checks against a **single value**. The value field does not support comma-separated lists. If you enter `tag1, tag2, tag3` as the value, qui treats it as one literal string, not three tags. If you do not use regex, tag operators (`equals`, `not equals`, `contains`, `not contains`) compare the condition value against each of the torrent's tags. - `equals` / `not equals`: exact tag membership (case-insensitive) - `contains` / `not contains`: substring match per tag (case-insensitive) :::warning Tag operators: `contains` is substring matching `Tags contains tag1` also matches torrents tagged `tag10`. For exact tag membership, use `equals` / `not equals` with one condition per tag and combine them with an **OR group**. ::: ##### Matching any of multiple tags To check whether a torrent has **any one of** several tags, create an **OR group** with one condition per tag (exact match): | # | Field | Operator | Value | | --- | --- | --- | --- | | 1 | Tags | equals | tag1 | | 2 | Tags | equals | tag2 | | 3 | Tags | equals | tag3 | Group these conditions with **OR** logic. When at least one tag is present, the rule matches. To **exclude** torrents that have any of several tags, create an **AND group** of `not equals` conditions (exact match): | # | Field | Operator | Value | | --- | --- | --- | --- | | 1 | Tags | not equals | tag1 | | 2 | Tags | not equals | tag2 | | 3 | Tags | not equals | tag3 | Group these conditions with **AND** logic. All three must be true, so none of those tags is present. ##### Using regex for tag matching As an alternative to multiple conditions, you can use regex to match several tags in one condition. If you enable regex, the pattern matches against the **full raw tag string** (for example `cross-seed, noHL, racing`), not each tag on its own. For example, to exclude torrents tagged with `tag1` or `tag2`, use a single condition: - Field: `Tags` - Toggle: `IF NOT` (negate the match) - Operator: `matches regex` - Value: `(^|,\s*)(tag1|tag2)(\s*,|$)` qui evaluates the regex against the raw tags string. The delimiter-aware pattern prevents `tag1` from matching `tag10`. The `IF NOT` toggle negates the result. The condition evaluates to true only for torrents that have neither tag. #### Live impact preview and dry-run When you edit workflows, qui provides immediate feedback for delete, category, and tag workflows: - When conditions and actions change, the **Live impact preview** in the workflow dialog updates. - It shows the current **impacted count** and a preview list of matching torrents. - For category and tag rules, the preview summary splits direct matches and cross-seed expansions. When you enable a delete, category, or tag workflow, qui opens a confirmation dialog that loads the same preview. The preview does not block the save. Click **Save without preview** while it loads, or after it fails, to enable the workflow at once. The workflow then acts on every matching torrent on its next run. To run a dry-run immediately without waiting for interval execution: - **Workflow dialog:** `Dry-run now` - **Workflow list menu:** `Run dry-run now` A dry-run executes the current workflow configuration as a simulation and writes results to automation activity. A dry-run reports the same torrents as the live impact preview, because it deletes nothing. Dry-run rules and live rules run in separate passes, so a dry run does not see what live rules do in the same cycle. No-match behavior: - If nothing matches, manual dry-runs log a `dry_run_no_match` summary row. - To avoid event noise, scheduled dry-run rules do **not** log no-match rows. #### Run a workflow now To apply the actions of one saved workflow without a wait for its interval, use one of these controls: - **Workflow list menu:** `Run now` - **Workflow dialog:** `Run now`. The button shows only for a saved workflow. It runs the saved version, not the unsaved changes in the dialog. qui then shows a confirmation dialog with the name and the actions of the workflow. Nothing changes until you click **Run now** in that dialog. - The run applies the actions to the torrents that match at that moment. It writes the same activity rows as a scheduled run. - A disabled workflow also runs. It stays disabled after the run. - If the workflow is set to dry-run, the run is a simulation and writes dry-run activity rows. - After a delete rule with a Free Space condition deletes files, the same kind of rule waits 5 minutes before it deletes again. A manual run obeys this wait too. - If at least one torrent matches the trackers of the workflow, the next scheduled run of the workflow comes one full interval after the manual run. If no torrent matches, the schedule of the workflow does not change. - Only one run applies actions on an instance at a time. If a scheduled run is in progress, qui shows "A run is in progress. Try again in a moment." If a manual run is in progress, the scheduled run skips that instance until its next check. ### Torrent sorting and scoring By default, qui processes matched torrents oldest first. Set the **Torrent Priority** to control which torrents qui processes first. This priority setting affects actions such as **Delete** combined with **Free Space**, where priority decides which torrents qui removes first to free space. #### Priority types | Type | Description | | --- | --- | | **Default**| Standard oldest-first priority. | | **Simple** | Prioritize by one numeric, duration, or string field (for example `Size`, `Added Age`, `Name`) in ascending or descending order. | | **Score** | Rule-based priority. qui scores torrents with custom rules and sorts them by total score, ascending or descending. | #### Score-based priority Score-based priority ranks torrents by combined factors. You define **Score Rules**. Each rule evaluates the torrent and adds to its total score. Available score rule types: - **Field Multiplier**: Extracts a numeric value from the torrent (such as `Size` or `Time Active`), multiplies it by a configured multiplier, and adds the result to the score. - **Conditional**: Evaluates a standard query condition (see [Query builder](#query-builder)). If the condition is true, qui adds a static value to the score. qui processes torrents by their final score. The **Live impact preview** shows the computed scores. ### Tracker matching You can also scope trackers with a **Tracker** condition, but the tracker pattern field remains available. | Pattern | Example | Matches | | --- | --- | --- | | All | `*` | Every tracker | | Exact | `tracker.example.com` | Only that domain | | Glob | `*.example.com` | Subdomains | | Suffix | `.example.com` | Domain and subdomains | Separate multiple patterns with commas, semicolons, or pipes. All matching is case-insensitive. ### Grouping Grouping allows an automation to treat related torrents as one unit for: - **Group-aware conditions**: `GROUP_SIZE`, `IS_GROUPED` - **Group expansion**: Apply an action to every torrent in the group, not only the matched torrent. - **Strict matching**: Grouped expansion runs only when all members satisfy the action conditions. #### Group-scoped condition fields You can scope `GROUP_SIZE` and `IS_GROUPED` per condition row: - If you want explicit per-row grouping, set `groupId` on each `GROUP_SIZE` / `IS_GROUPED` condition. - If a grouped condition row has no `groupId`, qui uses `conditions.grouping.defaultGroupId`. - If no default is configured, legacy unscoped grouped conditions fall back to `cross_seed_content_save_path`. Multiple grouped conditions can then live in the same workflow, each with a different grouping strategy. #### Action expansion Some actions accept a `groupId`. When you set `groupId` on an action, qui expands the action to all torrents in that group. Group expansion uses strict semantics: - Every member in the expanded group must satisfy the action condition checks for that rule. - If any member fails or qui cannot resolve the group, qui skips the entire grouped action. - If `groupId` is set, there is no "trigger-only fallback". - qui leaves out a member that the same run deletes, and applies the action to the other members. The deleted member still counts for the strict check. Built-in group IDs: - `cross_seed_content_path`: Same Content Path (normalized) - `cross_seed_content_save_path`: Same Content Path + Save Path (normalized) - `release_item`: Same Content Type + Effective Name - `tracker_release_item`: Same Tracker + Content Type + Effective Name - `hardlink_signature`: Same physical file set signature (requires local filesystem access) #### Custom groups (advanced) Rules can define custom groups via `conditions.grouping.groups[]` with: - `id`: string - `keys`: list of key names combined to form the group key Supported keys: - `contentPath`, `savePath`, `effectiveName`, `contentType`, `tracker` - `rlsSource`, `rlsResolution`, `rlsCodec`, `rlsHDR`, `rlsAudio`, `rlsChannels`, `rlsGroup` - `hardlinkSignature` For content-path-based grouping where `Content Path == Save Path` (ambiguous), you can set the policy below. The delete, category, and move actions apply it when they expand to the group. The Group Size and Is Grouped conditions ignore it. - `ambiguousPolicy: "verify_overlap"` (default for cross-seed groups) with `minFileOverlapPercent` (default `90`) - `ambiguousPolicy: "skip"` ### Actions You can combine actions, except Delete. Delete must be standalone. Each action supports an optional condition override. #### Speed limits Set upload or download limits. Each field supports these modes: | Mode | Value | Description | | --- | --- | --- | | No change | - | Do not change this field | | Unlimited | 0 | Remove speed limit (qBittorrent treats 0 as unlimited) | | Custom | >0 | Specific limit in KiB/s or MiB/s | qui applies limits in batches. #### Share limits Set ratio limits or seeding time limits. Each field supports these modes: | Mode | Value | Description | | --- | --- | --- | | No change | - | Do not change this field | | Use global | -2 | Follow qBittorrent's global share settings | | Unlimited | -1 | No limit for this field | | Custom | >=0 | Specific value (ratio as decimal, time in minutes) | When a torrent reaches any enabled limit, it stops seeding. ##### Share limit action (Web API 2.15.1+) If the qBittorrent Web API is **2.15.1** or newer, the torrent share limit dialog and automation workflows show **When limits are reached**. When a torrent reaches its ratio, seeding time, or inactive seeding limit, this setting controls what happens. qui stores and sends the **string enum names** that qBittorrent expects for `setShareLimits` (Qt meta-object names, not numeric codes): | Option | Value (`shareLimitAction`) | Description | | --- | --- | --- | | Default (use global) | omit or `default` | Follow qBittorrent's global setting | | Stop torrent | `Stop` | Pause the torrent | | Remove torrent | `Remove` | Remove from client, keep files | | Remove with content | `RemoveWithContent` | Remove from client and delete files | | Enable super seeding | `EnableSuperSeeding` | Switch to super seeding mode | ##### Share limits matching mode (Web API 2.16.0+) **Limits matching mode** (match **any** limit or **all** limits) is a separate Web API capability and requires **2.16.0** or newer. If you run older 5.2 builds that expose only **2.15.1**, qui shows the action above but hides this control until you upgrade qBittorrent. Values use **string enum names** for `setShareLimits`: | Option | Value (`shareLimitsMode`) | Description | | --- | --- | --- | | Default (use global) | omit or `default` | Follow qBittorrent's global setting | | Match any limit | `MatchAny` | Trigger when any single limit is reached | | Match all limits | `MatchAll` | Trigger only when all limits are reached | If the instance does not report the required Web API version, qui hides these options (see [qBittorrent Version Compatibility](../advanced/compatibility.md)). Ratio and seeding time limits above still apply on older instances. qui gates only the extra controls. If the connected qBittorrent instance supports these fields, they appear in the torrent share limit dialog and the automation workflow editor. On older instances, qui hides the fields and sends only the classic ratio and seeding time limits. #### Pause Pause matching torrents. qui pauses only torrents that are not already stopped. #### Resume Resume matching torrents. qui resumes only torrents that are not already running. #### Force recheck Force recheck matching torrents. - Triggers a qBittorrent recheck for matched torrents. - You can combine this action with other actions. - Supports an optional condition override, as other actions do. #### Force reannounce Force reannounce matching torrents. - Triggers an immediate tracker reannounce for matched torrents. - You can combine this action with other actions. - Supports an optional condition override, as other actions do. #### Delete Remove torrents from qBittorrent. **Delete must be standalone.** You cannot combine it with other actions. | Mode | Description | | --- | --- | | `delete` | Remove from client, keep files | | `deleteWithFiles` | Remove with files | | `deleteWithFilesPreserveCrossSeeds` | Remove files, but keep them if qui detects cross-seeds | | `deleteWithFilesIncludeCrossSeeds` | Remove files and also delete all cross-seeded torrents sharing the same files | Delete skips a torrent while qBittorrent checks it, because the progress of the torrent is not correct until the check ends. qui still deletes a checking torrent that another match pulls in, such as a cross-seed in `deleteWithFilesIncludeCrossSeeds` mode. In the modes `deleteWithFilesPreserveCrossSeeds` and `deleteWithFilesIncludeCrossSeeds`, qui also checks the other active instances with local filesystem access. Two instances can save into one folder on one disk. If a torrent on another instance uses the same file on disk as the torrent that the rule deletes, qui removes the torrent and keeps the files. In include mode, qui keeps the files of the whole group. A rule never deletes a torrent on another instance. If an instance with local filesystem access is offline, qui cannot check it. These two modes then keep the files of each torrent that they delete, and the log names the offline instance. qui ignores an instance that you turned off in qui. `deleteWithFiles` does not check other instances. The [Cross-Seed overview](./cross-seed/overview.md) tells what qui finds across instances and what it misses. In a live run, if a delete depends on hardlink data and the hardlinks changed or can't be read when qui checks them again, qui skips the delete for that run and decides again on the next one. A dry run does not check them again. See [Unknown scope and safety behavior](#unknown-scope-and-safety-behavior). **Optional grouping (advanced):** Delete actions can specify a `groupId` to expand the deletion to all torrents in that group. - If you want "remove from client" to be cross-seed aware, use `groupId` for `delete` (keep files). - If you set `groupId`, a keep-files delete is strict all-or-none. If any group member does not satisfy the rule conditions, qui removes nothing in that group. **Include cross-seeds mode behavior:** When a torrent matches the rule, qui finds other torrents that point to the same downloaded files (cross-seeds and duplicates) and deletes them together. Use this mode to remove content and all its cross-seeded copies at once. - **Safe expansion**: If qui cannot determine that another torrent uses the same files, qui does not include it in the deletion. - **File lists decide, not paths**: qui includes a candidate only when at least 90% of the smaller torrent's bytes use the same file locations. A torrent that shares only the folder, such as a pack with a top folder named `Season 2`, keeps its files and stays in the client. If overlap is above zero but below 90%, qui skips the entire deletion group. - **Safety-first**: If the file check cannot complete for any reason, qui skips the entire group to prevent broken torrents. - **Preview**: The delete preview shows all torrents that qui deletes in simulation, with cross-seeds marked. **Include hardlinked copies:** If you enable "Include hardlinked copies" (available only with `deleteWithFilesIncludeCrossSeeds` mode), qui also deletes torrents that share the same physical files through hardlinks, even when their Content Paths differ. qui follows both hardlinks and shared file paths until it finds every affected torrent. If a hardlinked episode shares its path with a season pack, qui includes the pack and its other cross-seeds. If a file check fails, qui skips the entire deletion group. - **Requires**: You must enable Local Filesystem Access on the instance. - **Safe scope**: qui includes only hardlinks fully contained within qBittorrent's torrent set. qui never follows hardlinks to files outside qBittorrent (for example, your media library). - **Preview**: The preview marks hardlink-expanded torrents as "Cross-seed (hardlinked)". - **Free Space projection**: If you use Free Space conditions, qui deduplicates hardlink groups in the space projection. Torrents that share the same physical files count once. If qBittorrent holds hardlinked copies of content in different locations and you want to remove all copies together, use this mode. #### Tag Manage tags on torrents. You can add multiple Tag actions in one workflow. | Mode | Description | | --- | --- | | `full` | Add to matches, remove from non-matches (smart toggle) | | `add` | Only add to matches | | `remove` | Only remove from matches | :::note `mode: remove` removes tags from torrents that match the tag action condition. It does not remove from non-matches. ::: qui evaluates `mode: full` within the rule's scope for that run (enabled rule, tracker pattern match, and run eligibility). It is not a client-wide sweep by itself. Options: - **Managed / Replace in Client**: `Managed` (default) applies per-torrent add/remove diffs only. `Replace in client` deletes managed tags from qBittorrent first, then reapplies them to current matches. - **Use tracker name as tag**: Derive the tag from the tracker domain. - **Use display name**: Use the [tracker customization](./tracker-customizations.md) display name instead of the raw domain. - **Include affected cross-seeds**: Apply the tag decision to the cross-seeds of each matching torrent: the torrents that use any of the same files on disk. A tag added to or removed from one copy reaches every copy. In `full` mode, a copy that still matches keeps the tag on all its cross-seeds, even when a sibling no longer matches. This option is not available with **Use tracker name as tag**, because cross-seeds sit on different trackers. Behavior reference: | Configuration | Behavior | | --- | --- | | `mode: full` + `Managed` | Adds/removes tag for torrents this rule evaluates. No client-wide reset. | | `mode: full` + `Replace in client` | Deletes selected tag(s) client-wide first, then re-adds only current matches. | If you see repeated activity such as `+tag=696` on every run, you likely enabled **Replace in client** for that tag action. Quick troubleshooting: 1. Look in the logs for `automations: deleted managed tags from client before retagging`. 2. In the Automations UI, open enabled rules and look for "Replace in client" on any tag action. 3. Make sure that the activity entry's rule list matches the expected rule. #### Category Move torrents to a different category. Select **Uncategorized** to remove their category. Options: - **Include affected cross-seeds**: Also move the torrents that use any of the same files on disk. - **Group ID (advanced)**: Expand category changes to all torrents in the specified group (see [Grouping](#grouping)). If set, this option takes precedence over "Include affected cross-seeds". - **Strict grouped matching**: If you set `groupId`, category expansion applies only when all group members satisfy the category rule checks. - **Torrents the run deletes**: Cross-seed and group expansion leave out a torrent that the same run deletes. - **Skip if cross-seed exists in categories**: If another cross-seed is in a protected category, prevent the move. #### Move Move torrents to a different path on disk. If AutoTMM is off, use this action to move content. Options: - **Group ID (advanced)**: Expand moves to all torrents in the specified group (see [Grouping](#grouping)). qui resolves the move path for the matched torrent and applies it to the whole group. If a torrent outside the group shares a file with a group member, qui skips the move. - **Strict grouped matching**: If you set `groupId`, move expansion is all-or-none. Every member must satisfy the move rule checks. - **Torrents the run deletes**: Cross-seed and group expansion leave out a torrent that the same run deletes. - **Skip if cross-seeds don't match the rule's conditions**: If the torrent has cross-seeds that do not match the rule's conditions, skip the move. If **Group ID** is set, qui ignores this option. ##### Move path templates qui evaluates the move path as a **Go template** for each torrent. Use a fixed path (for example `/data/archive`) or template actions to build paths from torrent properties. The path must be absolute on the machine that runs qBittorrent, for example `/data/archive`, `D:\Archive` or `\\nas\media`. qBittorrent resolves a relative path against its own working directory and default save path, so the move fails or repeats on every run. When you save an enabled rule or start a dry run, qui renders the path for a sample torrent whose name and category are `sample` and whose tracker is `tracker`. It rejects the rule if the template is invalid or the result is relative. A template that renders nothing for the sample, such as `{{ if eq .Category "tv" }}/data/tv{{ end }}`, is accepted. When the rule runs, qui skips the move for any torrent whose path renders empty or relative, and logs a warning for a relative path. **Available template variables:** | Variable | Description | | --- | --- | | `.Name` | Torrent display name | | `.Hash` | Info hash | | `.Category` | qBittorrent category | | `.IsolationFolderName` | `--`, the name of the isolation folder that cross-seed uses when the plain name is taken. qui cuts a long name to 245 bytes. The short hash is the first 8 characters of the info hash. Use `{{ sanitize .Name }}` for the name without the hash. | | `.Tracker` | Tracker display name from [Tracker Customizations](./tracker-customizations.md), otherwise the tracker domain | **Template function:** | Function | Description | | --- | --- | | `sanitize` | Makes a string safe for use as a path segment (removes invalid characters). Use it for user-controlled values such as names, for example `{{ sanitize .Name }}`. | **Examples:** - Fixed path (no template actions): `/data/archive` - By category: `/data/{{.Category}}` → for example `/data/movies` - By name (safe for paths): `/data/{{ sanitize .Name }}` - By isolation folder: `/data/{{.IsolationFolderName}}` - By tracker: `/data/{{.Tracker}}` #### Auto management Enable or disable qBittorrent's Automatic Torrent Management (AutoTMM) on matching torrents. In JSON, `enabled` is the AutoTMM value that the action sets. `true` enables AutoTMM on matching torrents, and `false` disables it. The action runs when the `autoManagement` key is present, even when `enabled` is `false`. ```json { "name": "Disable AutoTMM on cross-seeds", "trackerPattern": "*", "conditions": { "schemaVersion": "1", "autoManagement": { "enabled": false, "condition": { "field": "CATEGORY", "operator": "ENDS_WITH", "value": ".cross" } } } } ``` When AutoTMM is on, qBittorrent moves torrents to the save path configured for their category. When AutoTMM is off, you control save paths manually. If multiple rules match the same torrent with Auto Management actions, the **last matching rule** (by sort order) wins. #### External Program When torrents match the automation rule, run a configured external program. This action uses the programs from **Settings → External Programs**. | Field | Description | | --- | --- | | **Program** | Select from enabled external programs | | **Condition Override** | Optional condition specific to this action | **Behavior:** - The program runs asynchronously (fire-and-forget) and does not block automation processing. - You can combine this action with other actions (speed limits, share limits, pause, tag, category). - Only enabled programs appear in the dropdown. - qui logs activity with the rule name, torrent details, and success or failure status. :::note To appear in the automation dropdown, the program must be enabled in **Settings → External Programs**. ::: :::note When multiple rules match the same torrent with External Program actions enabled, the **last matching rule** (by sort order) determines which program executes for that torrent. Only one program runs per torrent per automation cycle. ::: :::warning The executable path of the program must be in the allowlist. Disabled programs and programs with forbidden paths do not run. qui rejects the execution attempt and logs the rejection in the activity log with the rule name and torrent details. ::: **Use cases:** - Run post-processing scripts when torrents complete. - When conditions match, notify external systems (webhooks, notifications). - Trigger media library scans after category changes. - Run cleanup scripts for old or stalled torrents. #### Export to Instance Export a torrent's `.torrent` file from the current instance and add it to a different qBittorrent instance. Use this action to migrate torrents between instances, for example from a seedbox to a local instance for long-term seeding. The action assumes the data already exists on the target (moved with rclone, Quickdrop for Deluge, or another tool) and uses `skip_checking=true` by default. | Field | Description | | --- | --- | | **Target instance** | Destination qBittorrent instance (cannot be the same as source) | | **Save path** | Save path on target instance (Go template supported, see below) | | **Category** | Category to assign on target instance (dropdown from target's categories) | | **Tags** | Tags to apply on target instance | | **Skip checking** | Skip hash check on target (default: enabled) | | **Paused** | Add torrent paused on target | | **Content layout** | `Default`, `Original`, `Create subfolder`, or `Don't create subfolder`. In JSON, `contentLayout` is `Original`, `Subfolder`, or `NoSubfolder`. With `Default`, the JSON has no `contentLayout`, and the target instance uses its own default layout. | | **Condition Override** | Optional condition specific to this action | **Behavior:** - The export runs asynchronously and does not block automation processing. - **You cannot combine it with Delete.** The API rejects rules that enable both export and delete. - Duplicate detection: Before the export, qui looks for the torrent on the target instance and skips the export if found. - After the add, qui verifies that the torrent appeared and is healthy. If that check fails, qui removes the torrent from the target so the next run can retry the transfer. - With **Paused** on and **Skip checking** off, qui asks the target to check the files. The torrent runs only for that check and stops again. If the recheck request fails, or verification sees the check fail, qui removes the torrent and keeps its files. For a large torrent, Success means that the check started, not that it passed. If the check fails later, qui does not remove the torrent. - The other three combinations of Paused and Skip checking send no recheck. - qui does **not** export cross-seed group members. To export a group, chain the action with Category/Tag actions that use group expansion. - qui logs activity with the rule name, torrent details, target instance, and success or failure status. - Dry-run shows what qui exports in simulation, without a transfer. :::note When multiple rules match the same torrent with Export to Instance actions, the **last matching rule** (by sort order) determines the export configuration for that torrent. Only one export runs per torrent per automation cycle. ::: ##### Save path templates The save path field supports Go templates, the same as the [Move action](#move-path-templates). | Variable | Description | | --- | --- | | `.Name` | Torrent display name | | `.Hash` | Info hash | | `.Category` | qBittorrent category (on source instance) | | `.IsolationFolderName` | `--`, the name of the isolation folder that cross-seed uses when the plain name is taken. qui cuts a long name to 245 bytes. The short hash is the first 8 characters of the info hash. Use `{{ sanitize .Name }}` for the name without the hash. | | `.Tracker` | Tracker display name from [Tracker Customizations](./tracker-customizations.md), otherwise the tracker domain | | Function | Description | | --- | --- | | `sanitize` | Makes a string safe for use as a path segment (removes invalid characters). | **Examples:** - Fixed path: `/data/torrents` - By category: `/data/{{.Category}}` - By tracker: `/data/{{.Tracker}}` If you set no save path but set a category, qui enables qBittorrent's Automatic Torrent Management so the target uses the category's configured path. ### Cross-seed awareness Automations detect cross-seeded torrents (same content and files) and can handle them specially: - **Detection**: Cross-seed condition fields use the same rule as **Filter Cross-Seeds**. A torrent is a cross-seed when it uses one of the same files on disk on the same instance. It is also a cross-seed when its name or release matches and its file sizes pair one to one. A torrent whose name or release matches is also a cross-seed when its files are hardlinks or reflinks of the source files. qui checks links only on an instance where it can read the files. Files that search ignores, such as `.nfo` and `.srt` files, do not count. Same-instance checks exclude the current torrent itself. A retitled upload counts as a release match when it has the same total size and the other release details match. An upload that numbers its episodes in another way counts under the same condition. A retitled upload with a different total size, for example one with an extra `.nfo` file, does not count. - **Read errors**: If qui cannot read the instance list, the torrent list of another instance, or a file list, or cannot complete a filesystem check for a possible linked cross-seed, the cross-seed condition fields are unknown for that run. A condition on these fields does not match, also with **is false** or NOT. Thus a rule for torrents without cross-seeds does not act on a read error. qui tries again on the next run. A confirmed positive existence or seeding result stays known when another candidate cannot be checked. Cross-seed tags and action-group safety stay unknown until the checks complete. - **Grouping**: Delete, move, category, and tag actions treat torrents that use any of the same files on disk as one group. This includes subtitles and other files that matching ignores, because deleting those files can break another torrent. - **Torrent lookup errors**: If qui cannot load the current torrent snapshot for cross-seed checks, the automation run stops. Previews show an error. - **Unknown groups**: A move, or a category or tag action with **Include affected cross-seeds**, skips a group when a file check cannot complete. - **Nested save folders**: Automatic moves skip a group when its torrents have different save folders. Giving those torrents the same destination can separate their shared files. - **Delete rules**: - If cross-seeds exist, use `deleteWithFilesPreserveCrossSeeds` to keep files. - Use `deleteWithFilesIncludeCrossSeeds` to delete matching torrents and all their cross-seeds together. - **Category rules**: Enable "Include affected cross-seeds" to move related torrents together. - **Blocking**: If cross-seeds are in protected categories, prevent category moves. #### Hardlink detection The `HARDLINK_SCOPE` field lets automations tell apart torrents whose files are hardlinked into an external library (Sonarr, Radarr, and similar tools) and torrents that exist only within qBittorrent. This field serves as the foundation for safe "Remove Upgraded Torrents" automations. ##### How scope is determined When an automation references `HARDLINK_SCOPE`, qui validates and inspects every file of every torrent in qBittorrent. qui ignores a priority-0 (`Do not download`) file that does not exist on disk. qui scans an existing priority-0 file like any other regular file. To keep partially selected torrents out of a hardlink rule, add the condition `Has Skipped Files` is `false`. For each regular file, qui extracts: - The **inode** and **device ID**: These identify the file on disk. - The **nlink count**: The total number of hardlinks to that inode, as the filesystem reports it. qui counts how many unique file paths across the qBittorrent torrent set point to each inode. qui compares these two numbers to set the scope for each torrent: | Scope | Condition | Meaning | | --- | --- | --- | | `none` | No file has `nlink > 1` | No hardlinks detected. | | `torrents_only` | Some file is linked inside the torrent set, no file has outside links | Hardlinks exist, but only between torrents in qBittorrent. No external library links. | | `outside_qbittorrent` | Some file has `nlink > uniquePathCount`, no file is linked inside the set | Something outside qBittorrent hardlinked the file, typically a Sonarr/Radarr library import. | | `both` | Some file is linked inside the torrent set, some file also has outside links | Linked to other torrents *and* to an external location (for example, a cross-seeded library import). | In conditions, two additional predicate values are available on top of the exact scopes above: - `inside_qbittorrent` matches torrents linked to other torrents in the set, even when they are also linked outside (`torrents_only` or `both`). - `outside_qbittorrent` as a condition value keeps its historical meaning. It matches any torrent with outside links (`outside_qbittorrent` or `both`). With AND/OR groups and the "is not" operator, you can express every combination of the inside and outside link states. :::note `HARDLINK_SCOPE` reflects only hardlink metadata. qui detects cross-seeds separately with ContentPath matching. A torrent can have `HARDLINK_SCOPE = none` and still be cross-seeded. ::: ##### Unknown scope and safety behavior If path validation or file inspection fails for **any remaining** file, the torrent receives no scope entry. Causes include invalid paths, missing permissions, and inaccessible storage. All `HARDLINK_SCOPE` conditions evaluate to `false` for that torrent, regardless of the operator or value. This safety measure prevents unintended deletion of torrents that qui cannot fully inspect. The NOT toggle cannot turn unknown data into a match, including through nested condition groups. This also applies to `HARDLINK_SCOPE_CROSS` and `HAS_MISSING_FILES`. Negation still inverts comparisons against known values. Before deletion, qui reads the files again for rules that use hardlink data. If scope is unknown or changes, qui holds the deletion, even if another branch of an OR group matches. To diagnose this issue, enable debug logging and check for the "hardlink index built" log message, which reports an `inaccessible` count. ##### How current the scope is qui keeps the hardlink data of each instance for up to 10 minutes. Rules, previews, and dry runs on that instance share it. - When a torrent is added, removed, or moved, qui reads that torrent and the torrents that share its files again at the next rule run. - A change only on disk, such as a library file that Sonarr or Radarr deletes after an upgrade, shows when qui reads all torrents again. That happens at the first rule run after the data is 10 minutes old. With the default interval of 15 minutes, every run reads all torrents again. Rules with shorter intervals, previews, and dry runs on the same instance can add up to 10 minutes. - A file list from qBittorrent can be up to 1 hour old. After a rename or a file priority change made outside qui, the scope of that torrent can stay unknown for up to 1 hour. The same changes made in qui refresh the file list at once, and the scope changes when qui reads all torrents again. The check before deletion (see above) reads the files of the torrent again and holds any torrent whose scope changed. For `HARDLINK_SCOPE_CROSS`, it does not read the files of other instances again. A change on another instance shows when qui reads all torrents again. ##### Docker volume requirements For hardlink scope detection to work in Docker: 1. **Paths must match exactly.** qui must read files at the exact paths qBittorrent reports. If qBittorrent reports a save path of `/data/torrents/radarr/`, qui must have access to `/data/torrents/radarr/` inside its container. 2. **Same underlying storage.** Both containers must share the same host mount so that inode numbers stay consistent. If qui and qBittorrent access the same files through different host mounts or different bind-mount configurations, inode numbers can differ. 3. **Single mount, not subdivided.** Mount the common parent directory instead of individual subdirectories. For example, if your data lives under `/mnt/media/data` on the host: ```yaml services: qui: volumes: - /home/user/docker/qui:/config - /mnt/media/data:/data # single mount covering both torrents and library ``` Do not mount both `/mnt/media/data/torrents:/data/torrents` **and** `/mnt/media/data:/data`. Overlapping mounts cause inconsistent inode visibility. Use one mount at the common parent. ##### Filesystem limitations Hardlink scope detection depends on the kernel reporting accurate `nlink` values in stat results. Some filesystems do not report accurate values: - **FUSE-based filesystems** (sshfs, mergerfs, rclone mount) can report `nlink = 1` for all files, regardless of the actual hardlink count. - **Some NAS appliance filesystems** and **overlay filesystems** (overlayfs) behave the same way. - **Network filesystems** (NFS, CIFS/SMB) usually report accurate nlink values, but behavior varies by server. On affected filesystems, every torrent appears to have scope `none` because nlink is always 1. qui has no workaround for this kernel and filesystem limitation. If you suspect this issue, run `stat` on a file with hardlinks and read the "Links" count. Hardlink scope does not detect reflinks (also called block clones). A reflink is a separate file with its own inode. Cloning does not raise its `nlink` count, even when the file shares its data with another file. A torrent whose files reach your library only through reflinks therefore gets scope `none`, and a "Remove Upgraded Torrents" rule can delete it. Tools such as `cp --reflink`, `fclones dedupe`, and ZFS block cloning make reflinks. Torrents that qui adds in [reflink mode](./cross-seed/hardlink-mode.md#reflink-mode-alternative) also get scope `none`. If your rules depend on `HARDLINK_SCOPE`, use hardlinks for the library link. For example, use `fclones link` instead of `fclones dedupe`. Hardlinks cannot span different filesystems. If your torrent data and media library live on separate filesystems, or on Docker volumes with different host paths, Sonarr and Radarr copy files instead. Scope detection then finds nothing. ##### Example: Remove Upgraded Torrents This automation deletes torrents that Sonarr/Radarr replaced with an upgrade. It targets torrents whose library hardlink no longer exists (the arr removed or re-linked it during the upgrade). The rule also requires at least 7 days of seeding time and a category that matches your arr categories. :::tip Use `HARDLINK_SCOPE` with `NOT_EQUAL` to `outside_qbittorrent` rather than `EQUAL` to `none`. Torrents with scope `torrents_only` (cross-seeded but not in a library) then stay eligible for cleanup, and any torrent still linked into your media library stays protected. ::: ```json { "name": "Remove Upgraded Torrents", "trackerPattern": "*", "conditions": { "schemaVersion": "1", "delete": { "enabled": true, "mode": "deleteWithFilesPreserveCrossSeeds", "condition": { "operator": "AND", "conditions": [ { "operator": "OR", "conditions": [ { "field": "CATEGORY", "operator": "EQUAL", "value": "radarr" }, { "field": "CATEGORY", "operator": "EQUAL", "value": "radarr.cross" }, { "field": "CATEGORY", "operator": "EQUAL", "value": "tv-sonarr" }, { "field": "CATEGORY", "operator": "EQUAL", "value": "tv-sonarr.cross" } ] }, { "field": "HARDLINK_SCOPE", "operator": "NOT_EQUAL", "value": "outside_qbittorrent" }, { "field": "SEEDING_TIME", "operator": "GREATER_THAN_OR_EQUAL", "value": "604800" } ] } } } } ``` When Sonarr or Radarr upgrades a release, it removes the old library hardlink. The old torrent's files then have `nlink == 1` (scope `none`) or link only to other torrents (scope `torrents_only`). In both cases, the scope is not `outside_qbittorrent`. The automation matches and deletes the torrent once the torrent meets the seeding time requirement. If the automation matches torrents that you expect to stay protected, make sure that: 1. qui can access all torrent files at the paths qBittorrent reports (the debug log lists inaccessible files). 2. Your filesystem reports accurate nlink values (`stat ` shows Links > 1 for hardlinked files). 3. Your Docker volume mounts do not overlap or subdivide storage in a way that breaks inode consistency. #### Cross-instance hardlink detection The `HARDLINK_SCOPE_CROSS` field extends hardlink detection across **all** configured qBittorrent instances. While `HARDLINK_SCOPE` considers only torrents within one instance, `HARDLINK_SCOPE_CROSS` accounts for hardlinks to files managed by any instance with local filesystem access enabled. Use this field in multi-instance setups where cross-seeds are hardlinked across instances. Without cross-instance awareness, those hardlinks appear as `outside_qbittorrent` even though they point to files managed by another qBittorrent instance. ##### Scope values | Scope | Meaning | | --- | --- | | `none` | No hardlinks detected. | | `torrents_only` | All hardlinks are accounted for across all qBittorrent instances. | | `outside_qbittorrent` | Hardlinks exist to files outside all qBittorrent instances. | | `both` | Hardlinks exist to other torrents across instances and to files outside all instances. | The condition values `inside_qbittorrent` and `outside_qbittorrent` also match `both`, as they do for `HARDLINK_SCOPE`. ##### Combining with HARDLINK_SCOPE If you use both fields together, you can distinguish cross-instance hardlinks from truly external links: | Combination | Interpretation | | --- | --- | | `HARDLINK_SCOPE = outside_qbittorrent` AND `HARDLINK_SCOPE_CROSS = torrents_only` | Hardlinks point to other qBittorrent instances only (cross-seeds). No media library copy. | | `HARDLINK_SCOPE = outside_qbittorrent` AND `HARDLINK_SCOPE_CROSS = outside_qbittorrent` | Hardlinks point outside all instances, typically a media library import. | | `HARDLINK_SCOPE = torrents_only` | All hardlinks within this instance. `HARDLINK_SCOPE_CROSS` will also be `torrents_only`. | ##### Prerequisites `HARDLINK_SCOPE_CROSS` requires: 1. **Local Filesystem Access** enabled on **all** instances whose files you want considered. qui skips instances without this access. Their files are not scanned, and unresolved hardlinks show as `outside_qbittorrent`. 2. **Same filesystem** across all instances. Hardlinks cannot cross filesystem boundaries. 3. **Matching paths in Docker**: The same volume mount requirements as `HARDLINK_SCOPE`, applied to every instance. ##### Performance The cross-instance scan runs only when: - A rule uses `HARDLINK_SCOPE_CROSS` - The single-instance scan finds torrents with unresolved outside links The scan uses cached torrent and file data from other instances without extra API calls. It calls `Lstat()` only on files that can resolve unaccounted hardlinks. The scan stops as soon as qui resolves all deficits. A safety budget of 500,000 `Lstat()` calls limits the cross-instance scan. If the scan exhausts the budget before resolving all deficits, the remaining torrents report `outside_qbittorrent`. This limit restricts filesystem operations in large multi-instance setups. When the scan reaches the budget, qui logs a warning. ##### Example: noHL tagging in multi-instance setups If torrents have no media library hardlinks, this rule tags them with `noHL`, even when they have cross-instance hardlinks to other qBittorrent instances: ```json { "name": "Tag noHL (multi-instance)", "trackerPattern": "*", "conditions": { "schemaVersion": "1", "tags": [ { "enabled": true, "mode": "add", "tags": ["noHL"], "condition": { "operator": "AND", "conditions": [ { "field": "HARDLINK_SCOPE_CROSS", "operator": "NOT_EQUAL", "value": "outside_qbittorrent" }, { "field": "STATE", "operator": "EQUAL", "value": "uploading" } ] } } ] } } ``` This configuration works because `HARDLINK_SCOPE_CROSS != outside_qbittorrent` matches both `none` (no hardlinks) and `torrents_only` (hardlinks only between qBittorrent instances). Torrents with a media library copy (`outside_qbittorrent`) do not receive the tag. ### Season pack status The `SEASON_PACK_STATUS` field tells you whether a torrent is a season pack, an episode that a season pack in the client already covers, or an episode with no such pack. qui builds the set of season packs from the torrent names it already has in memory. It sends no extra requests to qBittorrent, and it builds the set only when a rule uses the field. | Value | Meaning | | --- | --- | | `pack` | The name has one season and no episode, for example `Show.S01.1080p.WEB-DL-GRP`. | | `packed` | A single episode or an episode range such as `S01E05E06`, and a season pack of the same release is in the client. | | `unpacked` | A single episode or an episode range, and no season pack of the same release is in the client. | | empty | The name has no single season: movies, date-based releases, absolute-numbered anime, multi-season packs such as `S01-S03`, "Complete Series" names without a season token, and names the parser cannot read. | `SEASON_PACK_STATUS` looks at the torrent's own instance. `SEASON_PACK_STATUS_ANY_INSTANCE` looks at every active instance, so a pack on one instance covers an episode on another. Both fields support only `is` and `is not`. "Same release" is strict on purpose, because `packed` is often paired with a delete action. A pack covers an episode only when these parsed fields match: title, season, cut, other markers (`REPACK`, `PROPER`, `RERIP`, `HYBRiD`, `REMASTERED`, `Audio.Description`), language markers (`DUBBED`, `SUBBED`), resolution, source, codec, audio, channels, HDR, and group. A 720p pack does not cover a 1080p episode, a pack from another group does not cover, and a plain pack does not cover a `REPACK` episode. An episode title in the name, such as `S01E03.The.Long.Night`, does not split the episode from its pack. A partially downloaded pack still counts as a pack. Add a `PROGRESS` condition to the rule if you want more. ##### Example: tag packs, packed, and unpacked One rule per status. The rule editor keeps one condition per rule and applies it to every tag action in that rule, so three tag actions with three conditions cannot live in one rule. Mode `full` removes a tag again when the torrent stops matching, for example after you delete the pack. Import each rule on its own. ```json { "name": "Season pack", "trackerPattern": "*", "conditions": { "schemaVersion": "1", "tags": [ { "enabled": true, "mode": "full", "tags": ["season-pack"], "condition": { "field": "SEASON_PACK_STATUS", "operator": "EQUAL", "value": "pack" } } ] } } ``` ```json { "name": "Packed episode", "trackerPattern": "*", "conditions": { "schemaVersion": "1", "tags": [ { "enabled": true, "mode": "full", "tags": ["packed"], "condition": { "field": "SEASON_PACK_STATUS", "operator": "EQUAL", "value": "packed" } } ] } } ``` ```json { "name": "Unpacked episode", "trackerPattern": "*", "conditions": { "schemaVersion": "1", "tags": [ { "enabled": true, "mode": "full", "tags": ["unpacked"], "condition": { "field": "SEASON_PACK_STATUS", "operator": "EQUAL", "value": "unpacked" } } ] } } ``` ### Missing files detection The `Has Missing Files` field detects whether any file of a completed torrent is missing from disk. - qui checks **completed torrents** only. - If **any** file is missing from its expected path, this condition returns `true`. :::note Requires "Local filesystem access" enabled on the instance. ::: ### Important behavior #### Settings only set values Automations apply settings but **do not revert** them when you disable or delete a rule. If a rule sets the upload limit to 1000 KiB/s, affected torrents keep that limit until you change it or another rule applies a different value. #### Efficient updates qui sends an API call only when the torrent's current setting differs from the target value. qui skips no-op updates. #### Processing order When several rules give the same torrent the same kind of action: - **Delete wins.** When a rule chooses delete for a torrent, qui evaluates no further rules for it and drops the actions earlier rules chose. A torrent qui deletes gets nothing else in the run: cross-seed and group expansion of category and move leave it out, and a torrent the delete pulls in (for example a cross-seed in `deleteWithFilesIncludeCrossSeeds` mode) gets none of its own actions. - **First match wins** for move actions. - **Last rule wins** for speed limits, share limits, auto management, category, external program, and export to instance actions. - Pause applies only to a running torrent and resume only to a stopped one, so a run never does both to the same torrent. - **Any match** triggers recheck and reannounce. No rule turns them off. - **Accumulative** for tag actions. qui combines tags across matching rules. #### Run order When one run gives a torrent several actions, qui applies them in this order: 1. Speed limits 2. Share limits 3. Pause 4. Resume 5. Force recheck 6. Force reannounce 7. Auto management 8. Tag 9. Category 10. Move 11. External program 12. Export to instance 13. Delete The rule editor shows actions in the same order. - qui waits for qBittorrent to accept each request before it sends the next one. It does not wait for qBittorrent to finish a move. - External programs and exports start in the background after the moves. qui sends the deletes without waiting for them. - A torrent qui deletes gets no other action in the run (see [Processing order](#processing-order)). #### Each action sees the torrent as the run started A run reads the torrent list once, when it starts. Every rule and every action in that run uses this copy: - conditions, even when an earlier rule in the same run changed the field; - path template variables such as `.Category` in Move and Export to Instance paths; - the checks that skip a torrent that already has the target value; - cross-seed checks; - the torrent details passed to an external program, such as its save path and category. There are two exceptions. The Free Space projection adds up across the torrents in a run (see [Free Space condition behavior](#free-space-condition-behavior)). Before a delete, qui reads the hardlink state from disk again. A later live run sees the new values. That run comes at least 2 minutes later (see Debouncing under [How automations work](#how-automations-work)), and only once the rule's interval has passed. A dry run skips the 2-minute wait, and **Dry-run now** also skips the interval, so a dry run can show the new values sooner. Examples: - A rule changes the category and moves the torrent to `/data/{{.Category}}`. The move uses the old category. - A later rule with a condition on the new category does not match in the same run. - An external program that runs in the same run as a move gets the old save path. - A rule turns on auto management and moves the torrent. qBittorrent turns Automatic Torrent Management off when it moves a torrent to a set path. Move runs after auto management, so the torrent ends with Automatic Torrent Management off. #### Free Space condition behavior When a delete rule uses the **Free Space** condition, qui tracks freed space cumulatively: 1. **Configurable processing order**: qui processes torrents according to the automation's Torrent Priority (Default, Simple, or Score). This lets you prioritize cleanups (for example, largest files first, or lowest score first). 2. **Cumulative space tracking**: As qui marks each torrent for deletion, qui adds its size to the projected free space (only when the delete mode frees disk bytes). 3. **Stop when satisfied**: Once `Free Space + Space To Be Cleared` exceeds your threshold, remaining torrents no longer match. 4. **Cross-seed aware**: For `Delete with files`, qui counts the files selected for deletion. Each shared file path counts once, even when an unselected torrent connects the selected torrents into one shared-file group. For `Delete with files`, a required file list that cannot be read stops that rule's deletions for the run. The **Needed to reach target** preview returns an error. Estimates use reported sizes, not actual disk allocation. **Preview views for Free Space rules** When you preview a delete rule with a Free Space condition, a toggle switches between two views: | View | Description | | --- | --- | | **Needed to reach target** | Only the torrents qui removes now to reach your free-space target. This is the default view and reflects actual delete behavior. | | **All eligible** | All torrents this rule can remove while free space stays low. It shows the full scope of what the rule can delete (this can include cross-seeds that do not directly match filters). | The toggle appears only for delete rules that use the Free Space condition. **Preview features:** - **Path column**: Shows the content path for each torrent, with copy-to-clipboard support. - **Export CSV**: Downloads the full preview list (all pages) as a CSV file for external analysis. **Cross-seed expansion in previews:** The preview expands and shows cross-seeds only in `Remove with files (include cross-seeds)` mode. In this mode, the preview shows all torrents that qui deletes together, with cross-seeds marked. Other delete modes do not expand cross-seeds in the preview because they either preserve cross-seeds or do not treat them specially. **Delete mode affects space projection:** | Delete Mode | Space Added to Projection | | --- | --- | | Remove with files | Full torrent size | | Preserve cross-seeds (no shared files) | Full torrent size | | Preserve cross-seeds (shared files) | 0 (files kept) | | Preserve or include cross-seeds (another instance needs the files, or is offline) | 0 (files kept) | **How preserve cross-seeds works:** - Two torrents are candidates when they have the same Content Path, or when one Content Path is inside the folder of the other torrent. They are also candidates when they have the same Save Path and one torrent has no subfolder. qui then compares their resolved file paths and sizes. - qui does not treat torrents in the same directory that use different files as cross-seeds. qui removes their files. - If torrents share files or the file comparison cannot complete, qui keeps the files. - Only torrents whose files qui removes contribute to the free-space projection. With **Include hardlinked copies**, a free-space rule counts the complete group that deletion selects through shared paths and hardlinks. Each physical file counts once. The preview uses the same estimate. **Example:** If you have 400GB free and a rule "Delete if Free Space < 500GB" in `Remove with files` mode, qui deletes the oldest torrents. It stops when the cumulative freed space reaches 100GB. A 50GB torrent and its cross-seed (same files) count as 50GB freed, not 100GB. :::note The UI and API prevent the combination of `Remove (keep files)` mode with Free Space conditions. Keep-files does not free disk space, so such a rule can never reach the free space target and matches forever. ::: :::note After qui removes files, it waits about 5 minutes before running Free Space deletes again, so qBittorrent can refresh its disk free space reading. The UI prevents 1 minute intervals for Free Space delete rules. ::: ##### Free Space source By default, Free Space uses qBittorrent's reported free space, based on its default download location. If you want to manage a specific mount point, select "Path on server" and enter the path to that disk. | Source | Description | | --- | --- | | Default (qBittorrent) | Uses qBittorrent's reported free space | | Path on server | Reads free space from a specific filesystem path | :::note Path on server requires "Local Filesystem Access" enabled on the instance. ::: If you want to manage multiple disks, create one workflow per disk and set a different Path on server for each workflow. :::note qui does not support Path on server on Windows. The UI disables the option and switches legacy workflows back to the default when you open them. ::: #### Batching qui groups torrents by action value and sends them to qBittorrent in batches of up to 50 hashes per API call. ### Rules as JSON A rule can move as JSON. The rule menu has two entries, and the **Import** button sits above the rule list: - **Export JSON** copies the rule to the clipboard. - **Edit as JSON** opens the rule's JSON in an editor. Save updates the rule in place. The rule keeps its enabled state and its position in the list. - **Import** creates a new rule from pasted JSON. The new rule starts disabled and goes to the end of the list. The JSON carries the name, the tracker fields, the conditions, the sorting config, the free space source, the interval, dry-run, and notify. It does not carry the id, the instance id, the enabled state, or the sort order. The export omits `intervalSeconds` at the default 15 minutes, `dryRun` when off, and `notify` when on; when you remove one of these keys, the rule goes back to that default. The editor highlights the JSON and underlines syntax errors as you type. Save runs the same checks as Import. When qui rejects the JSON, the editor stays open with your text. qui rejects a key that it does not know, at any level of the JSON. It also rejects a value of the wrong type, for example `"intervalSeconds": "900"`. qui lists all problems at once, one line for each. Each line starts with the JSON path: ```text conditions.pasue: unknown key intervalSeconds: expected a whole number, got a string ``` qui accepts and ignores the keys `id`, `instanceId`, `createdAt`, and `updatedAt`. You can paste a rule from an API response. An export keeps `externalProgram.programId` and `exportToInstance.targetInstanceId`. These IDs belong to the qui that made the export. When an enabled action has an ID that does not exist on your qui, the import fails. When the ID exists but means a different program or instance, the import succeeds. Before you enable an imported rule, select the program or the target instance again. The instance ID is in the URL of the instance page, `/instances/`. qui also checks each condition. It rejects an unknown field, an unknown operator, and an operator that the field does not allow, for example `GREATER_THAN` on a yes/no field. It rejects a value that the field does not list, for example a misspelled torrent state, and an unknown `exportToInstance.contentLayout`. It rejects a `groupId` or `defaultGroupId` that names no built-in group and no group in `conditions.grouping`. The line names the operators or values that the field allows: ```text conditions.pause.condition.operator: PRIVATE does not allow GREATER_THAN; it allows EQUAL, NOT_EQUAL ``` If you edit a rule and do not change its conditions, qui does not run these condition checks. You can switch an older rule on or off and rename it, also when one of its conditions fails the check. qui treats the sorting the same way. It checks the score conditions of the sorting only when you change the sorting. When you change the groups in `conditions.grouping`, qui also checks the group IDs in the score conditions. ### JSON reference This section lists every key of a rule as JSON, the condition fields and their operators. Legacy keys that qui still accepts in older rules are left out. #### Rule | Key | Type | Values | Description | | --- | --- | --- | --- | | `name` | string | | Rule name. Required. | | `trackerPattern` | string | | Tracker domains that the rule applies to, separated by commas. `*` matches all trackers. `tracker.example.com` matches one domain, `*.example.com` its subdomains, and `.example.com` the domain and its subdomains. A leading `!` excludes a domain. | | `enabled` | boolean | | Whether the rule runs. Import always sets it to `false`. Edit as JSON keeps the current value. | | `dryRun` | boolean | | When `true`, the rule logs what it would do and changes nothing. Default `false`. | | `notify` | boolean | | When `true`, qui sends a notification when the rule acts. Default `true`. | | `sortOrder` | integer | | Position of the rule in the list. Import puts the rule at the end. Edit as JSON keeps the current value. | | `intervalSeconds` | integer | | How often the rule runs, in seconds. At least `60`. Default `900` (15 minutes). | | `conditions` | object | | The actions of the rule, each with its condition. Required. See `conditions`. | | `freeSpaceSource` | object | | Where the `FREE_SPACE` condition field reads free space. Default: the free space that qBittorrent reports. See `freeSpaceSource`. | | `sortingConfig` | object | | The order in which the rule processes torrents. Default: oldest first. See `sortingConfig`. | #### `conditions` | Key | Type | Values | Description | | --- | --- | --- | --- | | `schemaVersion` | string | | Must be `1`. | | `grouping` | object | | Group definitions for group-aware actions and conditions. See `conditions.grouping`. | | `speedLimits` | object | | Set upload and download speed limits. See `conditions.speedLimits`. | | `shareLimits` | object | | Set ratio and seeding time limits. See `conditions.shareLimits`. | | `pause` | object | | Pause matching torrents. See `conditions.pause`. | | `resume` | object | | Resume matching torrents. See `conditions.resume`. | | `recheck` | object | | Force a recheck of matching torrents. See `conditions.recheck`. | | `reannounce` | object | | Force a reannounce of matching torrents. See `conditions.reannounce`. | | `delete` | object | | Delete matching torrents. A rule with `delete` has no other action. See `conditions.delete`. | | `tags` | array of object | | Tag actions. Each entry manages its own set of tags. See `conditions.tags[]`. | | `category` | object | | Set the category of matching torrents. See `conditions.category`. | | `move` | object | | Move matching torrents to a different save path. See `conditions.move`. | | `externalProgram` | object | | Run an external program for each matching torrent. See `conditions.externalProgram`. | | `autoManagement` | object | | Turn automatic torrent management on or off. See `conditions.autoManagement`. | | `exportToInstance` | object | | Add matching torrents to a different qBittorrent instance. See `conditions.exportToInstance`. | #### `conditions.grouping` | Key | Type | Values | Description | | --- | --- | --- | --- | | `defaultGroupId` | string | `cross_seed_content_path`, `cross_seed_content_save_path`, `release_item`, `tracker_release_item`, `hardlink_signature` | The group that `GROUP_SIZE` and `IS_GROUPED` use when the condition has no `groupId`. A built-in group ID or the id of a group in `groups`. | | `groups` | array of object | | Custom group definitions. See `conditions.grouping.groups[]`. | #### `conditions.grouping.groups[]` | Key | Type | Values | Description | | --- | --- | --- | --- | | `id` | string | | The group ID. Conditions and actions refer to the group by this ID. | | `keys` | array of string | `contentPath`, `savePath`, `effectiveName`, `contentType`, `tracker`, `rlsSource`, `rlsResolution`, `rlsCodec`, `rlsHDR`, `rlsAudio`, `rlsChannels`, `rlsGroup`, `hardlinkSignature` | Torrents with equal values for all these keys are in the same group. | | `ambiguousPolicy` | string | `verify_overlap`, `skip` | What the delete, category, and move actions do when they expand to the group, `contentPath` is one of the keys, and a torrent content path equals its save path. `verify_overlap` compares the files. `skip` does not expand the action to the group. `GROUP_SIZE` and `IS_GROUPED` ignore this setting. | | `minFileOverlapPercent` | integer | | With `verify_overlap`: the percentage of files that must overlap. Default `90`. | #### `conditions.speedLimits` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `uploadKiB` | integer | | Upload limit in KiB/s. `0` removes the limit. Leave it out to keep the current limit. | | `downloadKiB` | integer | | Download limit in KiB/s. `0` removes the limit. Leave it out to keep the current limit. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.shareLimits` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `ratioLimit` | number | | Ratio limit. `-2` uses the global setting, `-1` means no limit. Leave it out to keep the current limit. | | `seedingTimeMinutes` | integer | | Seeding time limit in minutes. `-2` uses the global setting, `-1` means no limit. Leave it out to keep the current limit. | | `shareLimitAction` | string | `Stop`, `Remove`, `RemoveWithContent`, `EnableSuperSeeding` | What qBittorrent does when a limit is reached. Needs qBittorrent Web API 2.15.1+. Leave it out to use the global setting. | | `shareLimitsMode` | string | `MatchAny`, `MatchAll` | Whether any limit or all limits must be reached. Needs qBittorrent Web API 2.16.0+. Leave it out to use the global setting. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.pause` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.resume` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.recheck` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.reannounce` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.delete` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `mode` | string | `delete`, `deleteWithFiles`, `deleteWithFilesPreserveCrossSeeds`, `deleteWithFilesIncludeCrossSeeds` | What to delete. Default: `delete`. When `condition` uses `FREE_SPACE`, the mode must not be `delete`, because a delete that keeps the files frees no disk space. | | `includeHardlinks` | boolean | | Also delete torrents that share files through hardlinks. Only with mode `deleteWithFilesIncludeCrossSeeds`, and needs local filesystem access. | | `groupId` | string | `cross_seed_content_path`, `cross_seed_content_save_path`, `release_item`, `tracker_release_item`, `hardlink_signature` | Only with mode `delete`. Delete each matching torrent together with the other torrents in its group. A built-in group ID or the id of a group in `conditions.grouping`. | | `atomic` | string | `all` | With `groupId`: `all` deletes the group only when every torrent in it matches. | | `condition` | condition | | Required when `enabled` is `true`. The action deletes only torrents that match this condition. See Condition object. | #### `conditions.tags[]` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `tags` | array of string | | The tags that this action manages. With `useTrackerAsTag`, qui uses them when a torrent has no tracker domain. | | `mode` | string | `full`, `add`, `remove` | `full` adds the tags to matching torrents and removes them from the others. `add` only adds. `remove` only removes them from matching torrents. | | `deleteFromClient` | boolean | | Delete the managed tags from qBittorrent before the rule tags the matches. Needs explicit tags. | | `useTrackerAsTag` | boolean | | Use the tracker domain of each torrent as its tag. | | `useDisplayName` | boolean | | With `useTrackerAsTag`: use the tracker display name in place of the domain. | | `includeCrossSeeds` | boolean | | Also apply the tag changes to the cross-seeds of each matching torrent. Ignored with `useTrackerAsTag`. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.category` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `category` | string | | The category to set. An empty string removes the category. | | `includeCrossSeeds` | boolean | | Also move the cross-seeds of each matching torrent to the category. | | `groupId` | string | `cross_seed_content_path`, `cross_seed_content_save_path`, `release_item`, `tracker_release_item`, `hardlink_signature` | Change the category of each matching torrent together with the other torrents in its group. A built-in group ID or the id of a group in `conditions.grouping`. | | `blockIfCrossSeedInCategories` | array of string | | Skip a torrent when one of its cross-seeds is in one of these categories. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.move` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `path` | string | | The new save path. | | `blockIfCrossSeed` | boolean | | Skip a torrent when one of its cross-seeds does not match `condition`. Not used when `groupId` is set. | | `groupId` | string | `cross_seed_content_path`, `cross_seed_content_save_path`, `release_item`, `tracker_release_item`, `hardlink_signature` | Move each matching torrent together with the other torrents in its group. A built-in group ID or the id of a group in `conditions.grouping`. | | `atomic` | string | `all` | With `groupId`: `all` moves the group only when every torrent in it matches. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.externalProgram` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `programId` | integer | | The ID of the external program in this qui. An export keeps the ID of the qui that made it. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.autoManagement` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | `true` turns automatic torrent management on, `false` turns it off. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `conditions.exportToInstance` | Key | Type | Values | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the action runs. | | `targetInstanceId` | integer | | The ID of the target instance in this qui. The ID is in the URL of the instance page, `/instances/ID`. | | `savePath` | string | | The save path on the target instance. Supports Go templates. | | `category` | string | | The category on the target instance. | | `tags` | array of string | | The tags on the target instance. | | `paused` | boolean | | Add the torrent paused. | | `skipChecking` | boolean | | Skip the hash check on the target instance. Default `true`. | | `contentLayout` | string | `Original`, `Subfolder`, `NoSubfolder` | The content layout on the target instance. Leave it out to use the default layout of the target instance. | | `condition` | condition | | Optional. When set, the action applies only to torrents that also match this condition. See Condition object. | #### `freeSpaceSource` | Key | Type | Values | Description | | --- | --- | --- | --- | | `type` | string | `qbittorrent`, `path` | `qbittorrent` uses the free space that qBittorrent reports. `path` reads the free space at `path`. | | `path` | string | | With type `path`: the path to read. Needs filesystem access on the instance. | #### `sortingConfig` | Key | Type | Values | Description | | --- | --- | --- | --- | | `schemaVersion` | string | | Must be `1`. | | `type` | string | `simple`, `score` | `simple` sorts by one field. `score` sorts by the sum of `scoreRules`. | | `direction` | string | `ASC`, `DESC` | `ASC` or `DESC`. | | `field` | condition field | `ADDED_ON`, `AMOUNT_LEFT`, `AVAILABILITY`, `CATEGORY`, `COMMENT`, `COMPLETION_ON`, `CONTENT_PATH`, `DL_SPEED`, `DOWNLOADED`, `FREE_SPACE`, `LAST_ACTIVITY`, `NAME`, `NUM_COMPLETE`, `NUM_INCOMPLETE`, `NUM_LEECHS`, `NUM_SEEDS`, `PROGRESS`, `RATIO`, `SAVE_PATH`, `SEEDING_TIME`, `SIZE`, `STATE`, `SYSTEM_DAY`, `SYSTEM_DAY_OF_WEEK`, `SYSTEM_HOUR`, `SYSTEM_MINUTE`, `SYSTEM_MONTH`, `SYSTEM_YEAR`, `TAGS`, `TIME_ACTIVE`, `TOTAL_SIZE`, `TRACKER`, `TRACKERS_COUNT`, `UPLOADED`, `UP_SPEED` | With type `simple`: the condition field to sort by. See Condition field names. | | `scoreRules` | array of object | | With type `score`: the rules that add up to the score of each torrent. See `sortingConfig.scoreRules[]`. | #### `sortingConfig.scoreRules[]` | Key | Type | Values | Description | | --- | --- | --- | --- | | `type` | string | `field_multiplier`, `conditional` | The kind of rule. | | `fieldMultiplier` | object | | With type `field_multiplier`: the field and multiplier. See `sortingConfig.scoreRules[].fieldMultiplier`. | | `conditional` | object | | With type `conditional`: the condition and score. See `sortingConfig.scoreRules[].conditional`. | #### `sortingConfig.scoreRules[].fieldMultiplier` | Key | Type | Values | Description | | --- | --- | --- | --- | | `field` | condition field | `ADDED_ON`, `AMOUNT_LEFT`, `AVAILABILITY`, `COMPLETION_ON`, `DL_SPEED`, `DOWNLOADED`, `FREE_SPACE`, `LAST_ACTIVITY`, `NUM_COMPLETE`, `NUM_INCOMPLETE`, `NUM_LEECHS`, `NUM_SEEDS`, `PROGRESS`, `RATIO`, `SEEDING_TIME`, `SIZE`, `SYSTEM_DAY`, `SYSTEM_DAY_OF_WEEK`, `SYSTEM_HOUR`, `SYSTEM_MINUTE`, `SYSTEM_MONTH`, `SYSTEM_YEAR`, `TIME_ACTIVE`, `TOTAL_SIZE`, `TRACKERS_COUNT`, `UPLOADED`, `UP_SPEED` | The condition field whose value is multiplied. See Condition field names. | | `multiplier` | number | | The number to multiply the field value by. The result is added to the score. | #### `sortingConfig.scoreRules[].conditional` | Key | Type | Values | Description | | --- | --- | --- | --- | | `condition` | condition | | When the torrent matches this condition, score is added. See Condition object. | | `score` | number | | The score to add. | #### Condition object A condition is a test or an `AND` or `OR` group of conditions. The `value` of a test is always a JSON string. A number is written as a string, for example "1073741824", and a yes/no value as "true" or "false". `BETWEEN` uses `minValue` and `maxValue` in place of `value`. | Key | Type | Values | Description | | --- | --- | --- | --- | | `field` | condition field | | The condition field to test. Leave it out on an `AND` or `OR` group. See Condition field names. | | `operator` | operator | | An operator that the field allows, or `AND` or `OR` for a group. See Operator names. | | `groupId` | string | `cross_seed_content_path`, `cross_seed_content_save_path`, `release_item`, `tracker_release_item`, `hardlink_signature` | For `GROUP_SIZE` and `IS_GROUPED`: the group to use. A built-in group ID or the id of a group in `conditions.grouping`. Default: `conditions.grouping.defaultGroupId`. | | `value` | string | | The value to compare, always as a JSON string, also for numbers and yes/no values. Not used with `BETWEEN`. | | `minValue` | number | | For `BETWEEN`: the lower end of the range, as a JSON number. | | `maxValue` | number | | For `BETWEEN`: the upper end of the range, as a JSON number. On `SYSTEM_HOUR`, `SYSTEM_MINUTE`, `SYSTEM_DAY_OF_WEEK` and `SYSTEM_MONTH`, a `minValue` above `maxValue` wraps past the end of the field. | | `regex` | boolean | | When `true`, `value` is a regular expression. Applies to string fields. `MATCHES` always uses a regular expression. | | `negate` | boolean | | When `true`, the condition matches when the test is false. | | `conditions` | array of condition | | For an `AND` or `OR` group: the child conditions. See Condition object. | #### Operator names | Operator | Meaning | | --- | --- | | `AND` | Group. Matches when every child condition matches. | | `OR` | Group. Matches when at least one child condition matches. | | `EQUAL` | Equal to `value`. | | `NOT_EQUAL` | Not equal to `value`. | | `CONTAINS` | Contains `value`. | | `NOT_CONTAINS` | Does not contain `value`. | | `STARTS_WITH` | Starts with `value`. | | `ENDS_WITH` | Ends with `value`. | | `MATCHES` | Matches `value` as a regular expression, anywhere in the field. | | `GREATER_THAN` | Greater than `value`. | | `GREATER_THAN_OR_EQUAL` | Greater than or equal to `value`. | | `LESS_THAN` | Less than `value`. | | `LESS_THAN_OR_EQUAL` | Less than or equal to `value`. | | `BETWEEN` | From `minValue` to `maxValue`, both included. A range that wraps on a clock field does not include `maxValue`. | | `EXISTS_IN` | A torrent with exactly this name is in the category `value`. | | `CONTAINS_IN` | A torrent with a similar name is in the category `value`. Case, accents, and the characters `.`, `_` and `-` do not matter. | #### Condition field names Label is the name of the field in the rule builder. With `EQUAL` and `NOT_EQUAL` and no regular expression, a field with values accepts only those values. | Field | Label | Type | Operators | Values | Requires | | --- | --- | --- | --- | --- | --- | | `ADDED_ON` | Added Age | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `AMOUNT_LEFT` | Amount Left | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `AUTO_MANAGED` | Auto-managed | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `AVAILABILITY` | Availability | number | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `CATEGORY` | Category | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `COMMENT` | Comment | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `COMPLETED` | Completed | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `COMPLETION_ON` | Completed Age | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `CONTENT_PATH` | Content Path | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `CONTENT_TYPE` | Content Type | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | `movie`, `tv`, `music`, `audiobook`, `book`, `comic`, `game`, `app`, `adult`, `unknown` | | | `CREATED_BY` | Created By | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `CROSS_SEED_TAGS` | Cross-seed Tags | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `DL_LIMIT` | Download Limit | integer (bytes per second) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `DL_SPEED` | Download Speed | integer (bytes per second) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `DOWNLOADED` | Downloaded | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `DOWNLOADED_SESSION` | Downloaded (Session) | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `DOWNLOAD_PATH` | Download Path | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `EFFECTIVE_NAME` | Effective Name | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `ETA` | ETA | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `EXISTS_ON_OTHER_INSTANCE` | Exists on Other Instance | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `EXISTS_ON_SAME_INSTANCE` | Cross-seed Exists on Same Instance | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `FIRST_LAST_PIECE_PRIO` | First/Last Piece Priority | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `FORCE_START` | Force Start | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `FREE_SPACE` | Free Space | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `GROUP_SIZE` | Group Size | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `HARDLINK_SCOPE` | Hardlink scope | enum | `EQUAL`, `NOT_EQUAL` | `none`, `torrents_only`, `inside_qbittorrent`, `outside_qbittorrent`, `both` | local filesystem access | | `HARDLINK_SCOPE_CROSS` | Hardlink scope (cross-instance) | enum | `EQUAL`, `NOT_EQUAL` | `none`, `torrents_only`, `inside_qbittorrent`, `outside_qbittorrent`, `both` | local filesystem access | | `HASH` | Hash | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `HAS_MISSING_FILES` | Has Missing Files | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | filesystem access | | `HAS_SKIPPED_FILES` | Has Skipped Files | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `INACTIVE_SEEDING_TIME_LIMIT` | Inactive Seeding Time Limit | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `INFOHASH_V1` | Infohash v1 | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `INFOHASH_V2` | Infohash v2 | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `IS_GROUPED` | Is Grouped | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `IS_UNREGISTERED` | Unregistered | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | qBittorrent 5.1+ | | `LAST_ACTIVITY` | Inactive Time | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `MAGNET_URI` | Magnet URI | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `MAX_INACTIVE_SEEDING_TIME` | Max Inactive Seeding Time | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `MAX_RATIO` | Max Ratio | number | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `MAX_SEEDING_TIME` | Max Seeding Time | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `NAME` | Name | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES`, `EXISTS_IN`, `CONTAINS_IN` | | | | `NUM_COMPLETE` | Total Seeders | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `NUM_INCOMPLETE` | Total Leechers | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `NUM_LEECHS` | Active Leechers | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `NUM_SEEDS` | Active Seeders | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `POPULARITY` | Popularity | number | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `PRIORITY` | Queue Priority | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `PRIVATE` | Private | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `PROGRESS` | Progress | number (0 to 1) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `RATIO` | Ratio | number | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `RATIO_LIMIT` | Ratio Limit | number | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `REANNOUNCE` | Reannounce In | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `RLS_AUDIO` | Audio (RLS) | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `RLS_CHANNELS` | Channels (RLS) | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `RLS_CODEC` | Codec (RLS) | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `RLS_GROUP` | Group (RLS) | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `RLS_HDR` | HDR (RLS) | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `RLS_RESOLUTION` | Resolution (RLS) | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `RLS_SOURCE` | Source (RLS) | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `RLS_YEAR` | Year (RLS) | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SAVE_PATH` | Save Path | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `SEASON_PACK_STATUS` | Season pack status | enum | `EQUAL`, `NOT_EQUAL` | `pack`, `packed`, `unpacked` | | | `SEASON_PACK_STATUS_ANY_INSTANCE` | Season pack status (any instance) | enum | `EQUAL`, `NOT_EQUAL` | `pack`, `packed`, `unpacked` | | | `SEEDING_ON_OTHER_INSTANCE` | Seeding on Other Instance | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `SEEDING_ON_SAME_INSTANCE` | Cross-seed Seeding on Same Instance | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `SEEDING_TIME` | Seeding Time | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SEEDING_TIME_LIMIT` | Seeding Time Limit | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SEEN_COMPLETE` | Seen Complete Age | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SEQUENTIAL_DOWNLOAD` | Sequential Download | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `SIZE` | Size | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `STATE` | State | enum | `EQUAL`, `NOT_EQUAL` | `downloading`, `uploading`, `completed`, `stopped`, `active`, `inactive`, `running`, `stalled`, `stalled_uploading`, `stalled_downloading`, `errored`, `tracker_down`, `tracker_error`, `checking`, `checkingResumeData`, `moving`, `missingFiles` | | | `SUPER_SEEDING` | Super Seeding | boolean | `EQUAL`, `NOT_EQUAL` | `true`, `false` | | | `SYSTEM_DAY` | System Day | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SYSTEM_DAY_OF_WEEK` | System Day of Week | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SYSTEM_HOUR` | System Hour | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SYSTEM_MINUTE` | System Minute | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SYSTEM_MONTH` | System Month | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `SYSTEM_YEAR` | System Year | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `TAGS` | Tags | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `TIME_ACTIVE` | Time Active | integer (seconds) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `TOTAL_SIZE` | Total Size | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `TRACKER` | Tracker | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | | | `TRACKERS_COUNT` | Trackers | integer | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `TRACKER_MESSAGE` | Tracker message | string | `EQUAL`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `MATCHES` | | qBittorrent 5.1+ | | `TRACKER_STATUS` | Tracker status | enum | `EQUAL`, `NOT_EQUAL` | `not_contacted`, `working`, `updating`, `error`, `tracker_error`, `unreachable` | qBittorrent 5.1+ | | `UPLOADED` | Uploaded | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `UPLOADED_OVER_SIZE` | Uploaded / Size | number | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `UPLOADED_SESSION` | Uploaded (Session) | integer (bytes) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `UP_LIMIT` | Upload Limit | integer (bytes per second) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | | `UP_SPEED` | Upload Speed | integer (bytes per second) | `EQUAL`, `NOT_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN` | | | ### Activity log qui logs every automation action with: - Torrent name and hash - Rule name and action type - Outcome (success/failed) with reasons - Action-specific details qui keeps activity for 7 days. View the log in the Automations section for each instance. ### Example rules #### Delete old completed torrents If disk space is low, remove torrents completed over 30 days ago: - Condition: `Completed Age > 30 days` AND `State is completed` AND `Free Space < 500GB` - Action: Remove with files qui deletes matching torrents in the configured priority order (for example, oldest first) and stops once the projected free space exceeds 500GB. #### Speed limit private trackers Limit upload on private trackers: - Tracker: `*` - Condition: `Private is true` - Action: Upload limit 10000 KiB/s #### Tag stalled torrents Auto-tag torrents with no activity: - Tracker: `*` - Condition: `Inactive Time > 7 days` - Action: Tag "stalled" (mode: add) #### Clean unregistered torrents Remove torrents the tracker no longer recognizes: - Tracker: `*` - Condition: `Unregistered is true` - Action: Delete (keep files) #### Maintain minimum free space Keep at least 200GB free by removing oldest completed torrents: - Tracker: `*` - Condition: `Free Space < 200GB` AND `State is completed` - Action: Remove with files (preserve cross-seeds) qui removes torrents from the client in the configured priority order until the projection frees enough space. Cross-seeded torrents keep their files on disk and do not contribute to the projection. If only cross-seeded torrents match, this rule can remove many torrents without freeing any disk space. #### Clean up old content with cross-seeds Remove completed torrents and all their cross-seeded copies when they are old enough: - Tracker: `*` - Condition: `Completed Age > 30 days` AND `State is completed` - Action: Remove with files (include cross-seeds) When a torrent matches, qui also deletes every other torrent that points to the same downloaded files. Use this rule when you no longer need any copy of the content. #### Find duplicate releases of the same title List releases that share a parsed title but come from different release groups, such as `Show.S01.1080p.WEB-DL-GROUP1` and `Show.S01.1080p.WEB-DL-GROUP2`: - Tracker: `*` - Condition: `Is Grouped is true` with `groupId` set to `release_item` (see [Grouping](#grouping)) - Action: Tag "dupe" (mode: add) The **Live impact preview** lists the matches while you edit, so the rule can stay disabled if you only want to look. :::note Cross-seeded copies of a release are also members of these groups, because the `release_item` key ignores the release group and the tracker. ::: #### Organize by tracker Move torrents to tracker-named categories: - Tracker: `tracker.example.com` - Action: Category "example" with "Include affected cross-seeds" enabled #### Post-processing on completion When torrents finish downloading, run a script: - Tracker: `*` - Condition: `State is completed` AND `Progress = 100` - Action: External Program "post-process.sh" #### Notify on stalled torrents When torrents stall, alert an external monitoring system: - Tracker: `*` - Condition: `State is stalled` AND `Inactive Time > 24 hours` - Action: External Program "send-alert" + Tag "stalled" (mode: add) --- ## qBittorrent backup and restore ## Backups and restore qui creates scheduled and manual snapshots of a [qBittorrent instance](./instance-settings.md). Each snapshot includes the torrent archive, tags, categories with their save paths, and cached `.torrent` blobs. You can restore the torrents, categories, and tags from a snapshot at any time. If you manage multiple instances, the Backups page provides **Save changes to all instances**. This action copies the current backup schedule and settings to every compatible instance in one step. ### Counters and limits that a snapshot does not contain A snapshot does not store upload totals, ratio, or seed time. It also does not store share limits or speed limits. A restore adds a missing torrent through the qBittorrent API, and the API cannot set those counters. Torrents that a restore adds start at zero. Torrents that already exist on the instance keep their counters. A restore does not change the ratio and the seed time on the tracker, because the tracker keeps its own counts. To keep the counters in qBittorrent, make a backup of the qBittorrent data directory, which holds the fastresume files in `BT_backup`. ### Backup storage qui writes backup snapshots to `/backups` by default. If you want to store snapshots in a different location, set `backupDir` in [`config.toml`](../configuration/reference.md) or set the `QUI__BACKUP_DIR` [environment variable](../configuration/environment.md). A backup on the same drive as the live database does not protect against drive failure. Point `backupDir` to separate storage, such as a redundant array or a network share. If you change `backupDir` on an existing install, stop qui and move the contents of `/backups` into the new directory. If you do not move the files, you cannot restore old backup runs and their downloads remain incomplete. ### Restore modes If you enable backups for an instance, each run in the **Backup history** list has a restore icon button (tooltip: **Restore torrents from this backup**). The header also has a **Restore from latest** button. Restores support three modes: #### Incremental This mode is the safest option. It creates categories, tags, and torrents that are missing from the live instance. It never modifies or deletes existing data. If you want to add missing items to an active qBittorrent instance without a change to existing data, use this mode. #### Overwrite This mode performs the incremental restore **and** updates existing resources to match the snapshot. For example, it adjusts category save paths and rewrites per-torrent categories and tags. It does not delete any data. If your live instance has drifted and you do not want to delete items, use this mode. #### Complete This mode performs full reconciliation. It runs the overwrite steps and deletes categories, tags, and torrents absent from the snapshot. If you want to roll an instance back to an earlier point in time and the snapshot is authoritative, use this mode. ### Preview before restore Every restore starts with a dry-run preview so you can inspect planned changes. qui displays unsupported differences, such as mismatched infohashes or file sizes, as warnings. These warnings require manual follow-up in all modes. ### Importing backups If you need to migrate to a new server or recover after data loss, you can import a downloaded backup into any qui instance. Click **Import backup** on the Backups page and select the backup file. qui supports all export formats. --- ## Migrate from Deluge, rTorrent, Transmission, or uTorrent to qBittorrent ## Client migration The `qui migrate` command imports torrents from Deluge, rTorrent, Transmission, or uTorrent into qBittorrent. It preserves their state: save paths, trackers, transfer totals, timestamps, seeding time, labels, paused state, and per-file selection. Completed torrents arrive in a verified state, so qBittorrent skips the recheck. ```bash qui migrate {deluge | rtorrent | transmission | utorrent} \ --source-dir \ --qbit-dir ~/.local/share/qBittorrent/BT_backup ``` Run with `--dry-run` first to preview the import. The dry run writes nothing. ### Before you start 1. **Stop the source client cleanly.** All four clients flush their resume state on shutdown. If you terminate the process abruptly, it leaves stale or missing state files. 2. **Stop qBittorrent.** The importer writes into qBittorrent's `BT_backup` directory. qBittorrent reads that directory only at startup. 3. After the migration finishes, start qBittorrent. The imported torrents appear with their history intact. The command does not change the source client's files or your downloaded data. To switch back, stop qBittorrent and start the source client again. This works until you move or rename data in qBittorrent. If you do not set `--skip-backup`, the command archives both directories to `qbt_backup/` in the current working directory before it writes anything. If the qBittorrent directory already exists, the command archives it. A fresh destination produces only the source archive. If you run the migration again, the command safely skips torrents that already exist in the target. `--qbit-dir` is qBittorrent's session directory. Common locations: `~/.local/share/qBittorrent/BT_backup` on Linux, `%LOCALAPPDATA%\qBittorrent\BT_backup` on Windows, and `/config/qBittorrent/BT_backup` in Docker images. ### Save paths By default, the command carries over save paths from the source client without changes. qBittorrent must see the downloaded data at those same paths. Otherwise, the torrents show as missing files. If qBittorrent sees the data at a different path, add `--replace-path from=to`. The command replaces the start of each save path that begins with `from` with `to`: ```bash qui migrate utorrent \ --source-dir /mnt/old-pc/uTorrent \ --qbit-dir /config/qBittorrent/BT_backup \ --replace-path 'D:\Downloads=/data/downloads' \ --replace-path 'E:\Movies=/data/movies' ``` - `from` is the path as the source client stored it. `to` must be an absolute path on the machine that runs the command. - A rule matches whole folder names: `/data` matches `/data/tv` but not `/database`. - Windows paths in `from` match with either slash and without regard to case. - You can repeat the flag. If more than one rule matches, the first one wins. - The command also rewrites files that you moved out of the torrent folder in Deluge or uTorrent. With these rules, you can move a library between Windows and Linux, or into a container. If a save path is not an absolute path on the host and no rule matches it, the command skips the torrent and logs a warning. Use `--dry-run` to check your rules first. ### Deluge Point `--source-dir` at the `state` directory inside the Deluge configuration directory: ```bash qui migrate deluge \ --source-dir ~/.config/deluge/state \ --qbit-dir ~/.local/share/qBittorrent/BT_backup ``` Supported: Deluge 1.3.x and 2.x. The importer reads `torrents.fastresume` and the per-torrent `.torrent` files. If the importer cannot find or read `torrents.fastresume`, it falls back to the `.bak` copy and the pre-1.3 location. - Labels from the Label plugin become the qBittorrent **category**. The importer reads these labels from `label.conf` in the configuration directory. - The importer preserves Deluge 2.x paused state and file renames. Because Deluge 1.3.x marks the whole library paused on shutdown, the importer cannot preserve paused state for version 1.3.x. All Deluge 1.3.x imports start resumed. - The importer skips BitTorrent v2 torrents. Their merkle trees do not survive this migration path, and qBittorrent rejects them. ### rTorrent Point `--source-dir` at the session directory from your `.rtorrent.rc` (`session.path.set`): ```bash qui migrate rtorrent \ --source-dir ~/.sessions \ --qbit-dir ~/.local/share/qBittorrent/BT_backup ``` Supported: rTorrent 0.9.x through 0.16.x, with or without ruTorrent. - ruTorrent labels (`custom1`) become the qBittorrent **category**. If ruTorrent `addtime`/`seedingtime` timestamps exist, the importer uses them. Otherwise, it falls back to plain rTorrent timestamps. - Both directory layouts work: the standard layout where the torrent folder sits inside the download directory, and `d.directory_base` layouts where files live directly in the download directory. - Trackers keep their tiers from the torrent file. The importer excludes trackers that you disabled in rTorrent and includes trackers that you added at runtime. - Stopped torrents stay stopped. The importer skips unfinished magnet downloads. - rTorrent tracks no cumulative seeding counter. The importer calculates seeding time as elapsed time since seeding began, and counts offline time in that total. If you import a long-lived library, review your share limits before you run the migration. ### Transmission Point `--source-dir` at the Transmission configuration directory (the one that contains `torrents/` and `resume/`): ```bash qui migrate transmission \ --source-dir ~/.config/transmission-daemon \ --qbit-dir ~/.local/share/qBittorrent/BT_backup ``` Supported: Transmission 2.4 through 4.x. The importer supports legacy name-based session file names from 2.x. Resume files written by versions older than 2.4 have no block progress data, so the importer skips them. The log reports these torrents as not fully downloaded. - Transmission labels become qBittorrent **tags**. - Paused torrents stay paused. Per-torrent ratio and speed limits carry over. - If you set files to "do not download", they keep priority 0 in qBittorrent. ### uTorrent Point `--source-dir` at the uTorrent directory that contains `resume.dat` and the `.torrent` files. On Windows, this is usually `%APPDATA%\uTorrent`. For BitTorrent, it is `%APPDATA%\BitTorrent`: ```powershell .\qui.exe migrate utorrent ` --source-dir "$env:APPDATA\uTorrent" ` --qbit-dir "$env:LOCALAPPDATA\qBittorrent\BT_backup" ``` Supported: uTorrent and BitTorrent 2.x and 3.x, the classic desktop clients. uTorrent Web uses a different format, and the importer does not read it. - uTorrent labels become the qBittorrent **category**. - The importer preserves renamed torrents, a renamed top folder, and renamed or moved files. - Stopped and paused torrents stay paused. Force-started torrents import as forced, outside qBittorrent's queue. Per-torrent ratio and speed limits carry over. - If a `resume.dat` entry points at a `.torrent` file outside the source directory and that file is gone, the importer looks for a file with the same name in the source directory. - The importer skips BitTorrent v2 and hybrid torrents, and magnet links that never got their metadata. uTorrent on Windows stores Windows save paths such as `D:\Downloads`. To move that library to qBittorrent on Linux or in Docker, map the paths with `--replace-path`. See [Save paths](#save-paths). ### What is imported | | Deluge | rTorrent | Transmission | uTorrent | |---|---|---|---|---| | Save path & content layout | ✓ | ✓ | ✓ | ✓ | | Verified piece state (no recheck) | ✓ | ✓ | ✓ | ✓ | | Upload/download totals & ratio | ✓ | ✓ | ✓ | ✓ | | Added / completed timestamps | ✓ | ✓ | ✓ | ✓ | | Seeding time | ✓ | ✓ | ✓ | ✓ | | Trackers | ✓ | ✓ | ✓ | ✓ | | Labels | category | category (ruTorrent) | tags | category | | Paused state | 2.x only | ✓ | ✓ | ✓ | | Deselected files | ✓ | ✓ | ✓ | ✓ | | File renames | ✓ | — | ✓ | ✓ | | Per-torrent ratio/speed limits | — | — | ✓ | ✓ | The importer tags every imported torrent `migrated` so you can find them with one filter. Running torrents import as auto-managed, so qBittorrent applies its queueing and share limits. Torrents that you stopped stay stopped and stay out of auto-management. ### Partial torrents The importer imports only fully downloaded torrents. "Fully downloaded" means every file that you selected. If a torrent is still in progress, the importer skips it with a warning and leaves it in the source client. This check ensures that no torrent imports with incorrect piece state. If you have incomplete torrents, finish or remove them before you run the migration again. :::note On first start after a migration, qBittorrent logs a one-time warning per label that the category/tag was "missing from the configuration file" and recovers it. This warning is cosmetic. ::: See [CLI Commands](../configuration/cli-commands.md#migrate-from-other-torrent-clients) for the full flag reference. --- ## Cross-seed autobrr announces with qui ## autobrr Integration qui integrates with autobrr through webhook endpoints. When autobrr announces a new release, qui checks for a cross-seed match in real time. ### How It Works 1. autobrr sees a new release from a tracker 2. autobrr sends the torrent name, reported size, and indexer to `/api/cross-seed/webhook/check` 3. qui checks your qBittorrent instances without downloading a torrent file 4. qui responds with: - `200 OK`: a matching torrent is complete and ready to cross-seed - `202 Accepted`: a matching torrent exists, but it is not complete yet, or qBittorrent is moving or checking it. Retry later. - `404 Not Found`: no matching torrent exists. If `crossSeedRecoverErroredTorrents` is off (the default), a matching torrent in an error state or a missing-files state also counts as no match. 5. On `200 OK`, autobrr sends the torrent file and original announcement name to `/api/cross-seed/apply` 6. qui reads the actual size from the torrent file and repeats the match against the current local torrents ### Setup #### 1. Create an API Key in qui - Go to **Settings → API Keys** - Click **Create API Key** - Name it (for example "autobrr webhook") - Copy the generated key #### 2. Configure autobrr External Filter :::warning Create a **new autobrr filter dedicated to qui**. ::: :::note The **External** webhook (`/api/cross-seed/webhook/check`) only answers: "is this ready to cross-seed?" It does **not** add a torrent to qBittorrent. You must also configure the **Action** in [Apply Endpoint](#apply-endpoint). ::: :::tip **Docker Compose:** if autobrr and qui are both containers, `localhost` inside autobrr is the autobrr container, not qui. Use your qui container hostname instead (often the Compose service name), for example: `http://qui:7476/api/cross-seed/webhook/check`. ::: In your new autobrr filter, go to **External** tab → **Add new**: | Field | Value | | ------------------------- | ---------------------------------------------------- | | Type | `Webhook` | | Name | `qui` | | On Error | `Reject` | | Endpoint | `http://localhost:7476/api/cross-seed/webhook/check` | | HTTP Method | `POST` | | HTTP Request Headers | `X-API-Key=YOUR_QUI_API_KEY` | | Expected HTTP Status Code | `200` | If the autobrr **Test** button shows `404` with `"canCrossSeed":false` in the body, autobrr connected to qui and qui accepted the API key. See [Test the External filter](#test-the-external-filter). **Data (JSON):** ```json { "torrentName": {{ toRawJson .TorrentName }}, "size": {{ .Size }}, "instanceIds": [1], "indexer": {{ toRawJson .Indexer }} } ``` To search all instances, omit `instanceIds`: ```json { "torrentName": {{ toRawJson .TorrentName }}, "size": {{ .Size }}, "indexer": {{ toRawJson .Indexer }} } ``` **Field descriptions:** - `torrentName` (required): The release name as announced - `size` (optional): The size that autobrr already knows, in bytes. A missing value or `0` means that no size is available. - `instanceIds` (optional): qBittorrent instance IDs to scan. Omit to search all instances. - `indexer` (optional): The autobrr indexer identifier (for example `hdb`). On `/check`, qui only writes it to the debug log. On `/apply`, qui uses it for the **Use indexer name as category** mode. - `findIndividualEpisodes` (optional): Override the global episode matching setting #### How the size check works The `.Size` value comes from the announcement or feed data that autobrr already has. This template does not download the torrent file. The value can be exact, rounded, or `0`. If a positive value equals the local torrent size, qui considers approved metadata differences. If the value is rounded or unequal, qui cannot approve that fallback. It only passes the normal strict match within the configured size tolerance. If the value is `0`, qui uses a narrow name-only preflight. This preflight can approve the action download, but it cannot approve an add. If you enable **Skip recheck**, `/check` rejects title, season, episode, and split release-group fallbacks before autobrr downloads the torrent file. #### 3. Configure Retry Handling Use autobrr's **Retry** block to handle `202 Accepted` responses: - **Retry HTTP status code(s):** `202` - **Maximum retry attempts:** `10` - **Retry delay in seconds:** `4` #### Test the External filter The autobrr **Test** button sends a sample release, `Best.Show.Ever.S18E21.1080p.AMZN.WEB-DL.DDP2.0.H.264-GROUP`. You do not seed this release, so qui finds no match. autobrr then shows a result that starts with `Webhook responded with status 404 (expected 200)`, with this body: ```json {"canCrossSeed":false,"matches":null,"recommendation":"skip"} ``` This result is correct. qui sent the body, so autobrr connected to qui and qui accepted the API key. qui sends the same `404` when it has no active qBittorrent instance to scan. qui skips each ID in `instanceIds` that does not exist or that is disabled. Make sure that each ID in `instanceIds` is an active instance in qui, or remove `instanceIds` to scan all instances. Other problems give a different result: - `401` or `403`: qui did not get a valid API key. Make sure that the `X-API-Key` header has a key from **Settings → API Keys**. - `400` with an `error` body: the request is not valid, and the `error` text gives the cause. Make sure that **Data (JSON)** is the same as the template above. - A connection error or a timeout: autobrr cannot connect to qui. Make sure that the host and port in **Endpoint** are correct. If you use Docker Compose, read the Docker Compose tip above. To make sure that the full setup works: 1. Make sure that you added the `/api/cross-seed/apply` Action from [Apply Endpoint](#apply-endpoint). 2. Wait for a tracker to announce a release that you already seed. 3. Make sure that the filter accepted the release in autobrr. 4. Make sure that the torrent is in qBittorrent. qui often adds cross-seeds paused. ### Apply Endpoint When `/check` returns `200 OK`, send the torrent to `/api/cross-seed/apply`: **Action setup in autobrr:** | Field | Value | | -------------------- | -------------------------------------------------------------------- | | Action Type | `Webhook` | | Name | `qui cross-seed` | | Endpoint | `http://localhost:7476/api/cross-seed/apply?apikey=YOUR_QUI_API_KEY` | | Expected HTTP status | `200` | The **Expected HTTP status** field needs an autobrr release with [autobrr/autobrr#2494](https://github.com/autobrr/autobrr/pull/2494). Without it, autobrr marks the action as done for every status. **Payload (JSON):** ```json { "torrentData": "{{ .TorrentDataRawBytes | toString | b64enc }}", "torrentName": {{ toRawJson .TorrentName }}, "instanceIds": [1], "indexer": {{ toRawJson .Indexer }} } ``` **Field descriptions:** - `torrentData` (required): Base64-encoded torrent file bytes - `torrentName` (optional): The original announced name. Include it to use reported-size matching and detect metadata changes. - `instanceIds` (optional): Target instances (omit to apply to any matching instance) - `indexer` (optional): The autobrr indexer identifier (for example `hdb`). If you enable "Use indexer name as category", qui uses this value as the category. Otherwise qui ignores it. - `tags` (optional): Override the webhook tags from settings - `category` (optional): The category for the added torrent. qui uses the first category that applies, in this order: 1. The **Custom category** mode 2. The `category` field 3. The `indexer` field, in **Use indexer name as category** mode 4. The category of the matched torrent A season pack that qui builds from local episodes ignores the `category` field. - `startPaused` (optional): Set to `false` to add the torrent unpaused. When you omit it, qui adds the torrent paused and resumes it after verification, unless **Auto-resume after injection** is off on the **Webhook** tab. - `findIndividualEpisodes` (optional): Override the global episode matching setting The action performs the first torrent-file download in this flow. qui calculates the actual total from the torrent metadata. qui then repeats the match against the current local sources. The original `torrentName` prevents downloaded metadata from gaining new matching authority. If a client omits `torrentName`, it keeps the legacy strict apply behavior. These clients cannot use the new reported-size fallback. When qui adds a torrent, it can set `skip_checking=true`. This option skips only qBittorrent's automatic add-time check. Title, season, episode, and split release-group fallbacks still require an explicit full piece check. qui keeps these torrents paused, starts the check, and resumes them only at 100%. Soft differences, such as codec, source, HDR, or edition, keep the normal fast path after all file and layout checks. On the normal fast path, qui applies the [Max auto-start download](./rules.md#max-auto-start-download) rule. If only ignorable files are missing, the normal rule includes a 200 MiB exception. Torrents above the permitted limit stay paused for review. This flow needs no autobrr source change and no extra scrape. #### Troubleshooting: autobrr matches, but qBittorrent shows no new torrent If autobrr shows that the filter accepted the release, or your autobrr notification fires, but qBittorrent shows no new torrent, use these steps: 1. **Make sure that you added the `/apply` Action** - The External webhook (`/check`) does not add torrents. - You need an autobrr **Action** (Webhook) that calls `/api/cross-seed/apply` (above). 2. **Fix Docker networking if you use containers** - If you use containers, `http://localhost:7476/...` works only when autobrr can reach qui on its own `localhost`. - If you use Docker Compose, use the qui service hostname, for example `http://qui:7476/api/cross-seed/apply?apikey=...`. 3. **Check the authentication** - `/check`: header `X-API-Key=...` - `/apply`: query string `?apikey=...` (as shown in this guide) 4. **Make sure that qui can reach qBittorrent** - qui UI: **Settings → Instances → Test Connection** 5. **Check paused torrents** - qui often adds cross-seeds **paused**. Look in qBittorrent's paused list and in any cross-seed tag or category you configured. If the cause is still not clear, see [Cross-Seed Troubleshooting](./troubleshooting.md). #### Troubleshooting: Test shows status 404 (expected 200) If the autobrr **Test** button shows `status 404 (expected 200)` and the body has `"canCrossSeed":false`, autobrr connected to qui and qui accepted the API key. See [Test the External filter](#test-the-external-filter). ### Webhook Source Filters By default, the webhook endpoint matches against **all** torrents on your instances. You can configure filters to exclude categories or tags from the match: - **Exclude Categories:** Skip torrents in specific categories (for example `cross-seed-link`) - **Exclude Tags:** Skip torrents with specific tags (for example `no-cross-seed`) - **Include Categories:** Match only torrents in these categories (leave empty for all) - **Include Tags:** Match only torrents with these tags (leave empty for all) Use these filters when: - You have a legacy cross-seed category that qui must not match again - qui must never consider certain content types for cross-seeding - You want to exclude torrents with specific metadata tags :::note Exclude filters take precedence over include filters. Tag matching is case-sensitive. If you configure both category and tag include filters, a torrent must pass both checks. It must match at least one allowed category and at least one allowed tag. ::: If qui cannot read its settings, `/check` and `/apply` fail instead of ignoring these filters. A failed `/check` rejects the release. For a failed `/apply`, qui sends a webhook failure notification, and autobrr shows the action as failed when **Expected HTTP status** is set. Configure in qui UI: **Cross-Seed > Webhook** ### Season Pack Webhook qui also has a dedicated season-pack flow with separate endpoints. When autobrr announces a season pack, qui checks your instances for matching individual episodes. It links the episodes that are already local. When coverage is sufficient, qui adds the pack and qBittorrent fetches the remainder after a recheck. This flow uses `/api/cross-seed/season-pack/check` and `/api/cross-seed/season-pack/apply`. It requires a separate autobrr filter. See [Season Packs](./season-packs.md) for full setup instructions. --- ## Cross-seed from a directory scan ## Directory Scanner Directory Scanner (Dir Scan) scans local folders to find cross-seed opportunities for content already on disk. Library Scan queries the qBittorrent torrent list. Dir Scan works directly with files on the filesystem. Configure it in **Cross-Seed > Directories**. ### Requirements - Enable **Local filesystem access** in Instance Settings on at least one qBittorrent instance. - qui must have direct read access to files on the same host or through shared mounts with the target qBittorrent instance. - Configure at least one enabled Torznab indexer in **Settings > Indexers** (from Prowlarr, Jackett, or a native tracker endpoint). - Optional: Configure Sonarr/Radarr in **Settings > Integrations** for external ID lookups (IMDb, TMDb, TVDb, TVMaze). ### How to Choose Your Scan Path Dir Scan treats each **immediate child** of your configured path as one "searchee." It does not treat the path itself as a single searchee. It does not recurse into subfolders to create additional searchees. **Example:** If you configure `/data/media/movies`: ```plaintext /data/media/movies/ ├── Movie.2024.1080p.BluRay/ <- searchee 1 │ ├── movie.mkv │ └── movie.nfo ├── Another.Movie.2023.2160p/ <- searchee 2 │ └── movie.mkv └── standalone.mkv <- searchee 3 ``` Each immediate child (folder or file) becomes one searchee. Files within `Movie.2024.1080p.BluRay/` group together as part of that searchee. #### Correct path choices On Windows, Dir Scan rejects paths that differ only in case, including on case-sensitive volumes and before a directory exists. Windows webhook routing cannot distinguish those spellings. On Unix-like hosts, distinct directories on a case-sensitive filesystem remain configurable. If an older configuration contains duplicate entries, remove the extra entry so webhooks can select one scan configuration. | Content type | Recommended path | Why | |-------------|------------------|-----| | Movies | `/data/media/movies` | Each movie folder is one searchee | | TV Shows | `/data/media/tv` | Each show folder is one searchee | | Music | `/data/media/music` | Each album folder is one searchee | #### Incorrect path choices | Path | Problem | |------|---------| | `/data/media` containing `movies/` + `tv/` + `music/` | Only 3 searchees total (the category folders themselves) | | `/data/media/movies/Movie.2024.1080p.BluRay` | Only 1 searchee. Scans that specific movie only | :::tip Create one Dir Scan entry per category folder. Do not point at a parent folder that contains multiple category subfolders. ::: ### Docker and Path Mapping If qui and qBittorrent run in separate containers or use different mount points, you must configure path mapping. #### "Local filesystem access" explained When you enable **Local filesystem access** on a qBittorrent instance, it instructs qui: 1. qui can read files directly from the filesystem (same paths or mapped paths). 2. qui must use file-based matching (inode checks, size checks) instead of the qBittorrent API alone. qui requires direct read access to the files, either on the same host or through shared network or volume mounts. #### Recommended: Use the same volume paths The simplest configuration mounts volumes at the same path in both containers: ```yaml title="docker-compose.yml" services: qui: volumes: - /mnt/storage:/mnt/storage qbittorrent: volumes: - /mnt/storage:/mnt/storage ``` If both containers see `/data/media/movies`, you do not need path mapping. Leave **qBittorrent Path Prefix** empty. #### Path mapping example (different mount points) Container mounts: - qui container mounts: `-v /mnt/storage:/data` - qBittorrent container mounts: `-v /mnt/storage:/downloads` qui sees files at `/data/media/movies/Movie.2024/movie.mkv`. qBittorrent sees the same file at `/downloads/media/movies/Movie.2024/movie.mkv`. Configure Dir Scan: - **Directory Path**: `/data/media/movies` - **qBittorrent Path Prefix**: `/downloads/media/movies` When qui finds a match, it tells qBittorrent to add the torrent at `/downloads/media/movies/Movie.2024/` instead of `/data/media/movies/Movie.2024/`. ### How It Works For each configured scan directory, qui: 1. Enumerates immediate children of the directory path. 2. Recursively collects all files within each child (folder or file). 3. Groups files into a "searchee" with parsed release info. 4. Uses configured *arr instances to resolve external IDs when possible. 5. Searches enabled indexers via Torznab. 6. Downloads torrent files and matches their file lists against the files on disk. 7. If it finds a match, adds the torrent to the target qBittorrent instance. :::note Categories + AutoTMM Dir Scan adds torrents with an explicit `savepath` to point qBittorrent at the existing files on disk. That forces **AutoTMM off** for Dir Scan injections. Dir Scan categories come only from **Dir Scan → Default Category** and per-directory **Category override**. Cross-Seed → Categories and tags category modes (affix / indexer / custom) do not apply to Dir Scan. If you later enable AutoTMM on an injected torrent, qBittorrent can relocate files based on its default save path and category rules. ::: :::info Torznab searches run through the shared scheduler at background priority. They queue behind interactive, RSS, and completion cross-seed work. A full scan is a manual or scheduled scan of the whole directory. Full scans run one at a time. A new full scan shows as `queued` until the full scan before it ends. A webhook scan does not wait for a full scan. See [Webhook scans during a full scan](#webhook-scans-during-a-full-scan). Dir Scan waits between searches. See [Search pacing](#search-pacing). Dir Scan also pauses between torrent-file downloads from a native indexer. A native indexer is an indexer that qui reaches at the tracker's own Torznab endpoint. Dir Scan does not pause between downloads from an indexer behind Prowlarr or Jackett. Library Scan uses the same rule for downloads. ::: #### Search pacing Dir Scan searches for one item at a time. An item is a movie, a season, an episode, or another folder or file. A TV folder can give one season item and one item for each episode file. Before Dir Scan searches for an item, it waits until 60 seconds have passed since the search for the previous item ended. Library Scan uses the same minimum interval between two torrents. The wait applies to all indexers, including indexers behind Prowlarr or Jackett. It applies to manual, scheduled, and webhook scans. - A search counts even when the [search cache](#search-cache) answered it. - An item that sends no search does not wait. For example, an item that is already seeding, or an item that has no enabled indexer. - Dir Scan can search again for the same item without the year or with an alternate title. These retry searches do not wait. - The wait continues across runs. A webhook scan that starts 20 seconds after the last search of the previous run waits 40 seconds. A restart of qui resets the time. - Dir Scan does not wait after the last item of a run. - If you cancel a scan during the wait, the scan stops at once. - If an item of a webhook scan and an item of a full scan both wait, the webhook item searches first. The 60-second wait also applies between the two items. :::warning First scan of a large library At one item per minute, the first scan of a large library takes hours. A TV library with 3,000 episode files can take more than two days. Webhook scans do not wait for this scan. A webhook scan searches between the items of the full scan. See [Webhook scans during a full scan](#webhook-scans-during-a-full-scan). To keep scans short: - Set **Only process items changed within the last (days)**. See [the explanation](#only-process-items-changed-within-the-last-days-explained). - Set **Max searchees per run**. See [the explanation](#max-searchees-per-run-explained). - Turn on [Skip individual episodes](#skip-individual-episodes) for TV directories. Dir Scan then sends one search for a season, not one search for each episode. ::: #### Already-seeding detection Dir Scan maintains a FileID index (inode + device on Unix) to track files present in qBittorrent. It skips: - Files that are already part of a seeding torrent - Torrents whose infohash already exists in qBittorrent - Torrents whose infohash is on the target instance's [cross-seed blocklist](./overview.md#blocklist) This prevents redundant searches and duplicate additions. If you remove a torrent from qBittorrent, its files leave the index. For example, an automation rule can remove torrents with missing files. The next scan of the directory treats those files as new searchees and searches indexers for them again. Sometimes qui cannot read the torrents of the instance, the file list of a torrent, or a file of a torrent during a scan. Then the files that an earlier scan marked as already seeding keep that status. This happens when qBittorrent does not answer, when qui has not synced with the instance since it started, or when qui has no permission on a save path. It also happens when a file of a completed torrent is missing, for example because a save path is not mapped into qui's container. A missing file that qBittorrent skips does not count, because qBittorrent may not have written it. When a file of a torrent or the file list of a torrent is the reason, qui logs one of them at the Info level for each scan. #### Recheck Behavior - **Full matches**: qui adds the torrent with "skip hash check" enabled. Seeding starts immediately unless **Start torrents paused** is enabled. - **Partial matches** (when enabled): qui adds the torrent without a skipped hash check. qBittorrent verifies existing data and downloads missing files. ### What Gets Scanned #### Included file types **Video:** `.mkv`, `.mp4`, `.avi`, `.m4v`, `.wmv`, `.mov`, `.ts`, `.m2ts`, `.vob`, `.mpg`, `.mpeg`, `.webm`, `.flv` **Audio:** `.flac`, `.mp3`, `.wav`, `.aac`, `.ogg`, `.m4a`, `.wma`, `.ape`, `.alac`, `.dsd`, `.dsf`, `.dff` **Extras:** `.nfo`, `.sfv`, `.srt`, `.sub`, `.idx`, `.ass`, `.ssa` Extras belong to releases and affect partial-match behavior. If a torrent includes an `.nfo` file that does not exist on disk, the result is a partial match, not a full match. #### Disc layouts qui treats folders that contain `BDMV/`, `VIDEO_TS/`, or `AUDIO_TS/` structures as disc-based media. It includes all files within these structures, regardless of extension. #### Skipped items - **Hidden files and folders** (names starting with `.`) - **Symlinks inside a searchee folder** (skipped to avoid loops and permission issues). qui follows a symlinked media file placed directly in the scan root and scans its target. qui does not enter a symlinked folder in the scan root. - **Special entries on every platform**, including sockets, FIFOs (named pipes) and devices. - **Windows junctions**. A junction is not scanned as a media file even when its name ends in a media extension such as `.mkv`. - **Files with permission errors** (qui continues the scan and skips the file) - **Non-media files** outside disc layouts On Windows, recognized cloud-placeholder files and Windows Overlay Filter (WOF) data files remain eligible when their metadata is accessible. Other files with unknown reparse tags remain excluded. [Orphan Scan](../orphan-scan.md#abandoned-directories) explains these Windows terms. ### Settings (Global) Open **Dir Scan > Settings**: | Setting | Description | |---------|-------------| | Match Mode | `Strict` matches by filename + exact file size. `Flexible` ignores filenames for primary matching, but matched files must still have the same exact file size. | | Size Tolerance (%) | Allows small differences in total torrent size when qui filters candidates before file matching. | | Minimum Piece Ratio (%) | Sets the minimum percentage of torrent data that must exist on disk for partial matches. | | Max searchees per run | Limits how many eligible searchees each run processes. Set `0` for unlimited. Useful for progress across restarts. | | Only process items changed within the last (days) | Excludes stale work items before search. Uses video/audio mtimes only for manual and scheduled scans. Webhook scans ignore this cutoff. Set `0` to disable. | | Allow partial matches | Adds torrents even if they have extra or missing files compared to disk. | | Download missing files | Downloads files missing from disk for partial matches. Hardlink and reflink modes require this setting for season packs and partial releases. Enabled by default. | | Skip piece boundary safety check | Allows partial matches where missing-file downloads can modify pieces that contain existing content. | | Start torrents paused | Adds injected torrents in a paused state. | | Default Category / Tags | Applies categories and tags to all injected torrents. Directory settings add to these values. | In practice: - **Strict** works best when filenames on disk match the release layout. - **Flexible** works best for renamed libraries, but it still requires exact file-size matches for paired files. - **Size Tolerance** affects only candidate filtering based on **total torrent size**. It does **not** allow per-file size mismatches. - If a candidate lacks corroborating title or external ID evidence, qui rejects flexible single-file matches. This prevents false positives when an indexer falls back from ID-based search to plain title search. #### "Max searchees per run" explained This setting limits how many **top-level folders/files** Dir Scan processes in a single run. - If your directory is a TV root like `/mnt/storage/media/tv`, each **show folder** is one searchee (for example `Show.Name/`, `Another.Show/`). - If your directory is a movies root like `/mnt/storage/media/movies`, each **movie folder** is one searchee (for example `Movie.Title (2024)/`, `Another.Movie (2023)/`). If you configure **Max searchees per run = 5**, Dir Scan processes up to **5 show folders** (TV) or **5 movie folders** (movies) per run. It stops and saves per-file progress for the next run. The next run rechecks the directory, skips finalized files, and retries unfinished work. See [Incremental progress and resets](#incremental-progress-and-resets). The setting counts top-level folders, not episodes. It does **not** cap the total number of indexer searches. A TV folder can send one search for each season and one for each episode, but it counts as one searchee. Each of these searches waits for the [search pacing](#search-pacing) interval. #### "Only process items changed within the last (days)" explained This setting reduces tracker and API load. It excludes stale content before searches start. - If you scan movies or music, items stay in scope only when their newest video or audio file falls within the cutoff. - For TV, qui evaluates work items at the season and episode level. A single fresh episode does not pull an entire older show into scope. - If all episode files in a season work item fall within the cutoff, qui keeps the season-pack search. Otherwise, qui falls back to fresh episode-level work only. If you enable [Skip individual episodes](#skip-individual-episodes), no episode-level fallback occurs. The season pack stays in scope as long as its newest episode falls within the cutoff. - qui computes the cutoff as `now - N days` (for example, `7` means "older than 7 days"). - The timestamp is the filesystem **modified time (mtime)** from video and audio files only. It ignores subtitle and extra mtimes, release dates, and qBittorrent add times. - Webhook scans ignore the cutoff and use the webhook path as the freshness signal. - `0` disables age filtering. Example with `7` days: - If `Movie.2024/` has only an `.srt` updated yesterday while the `.mkv` is old, qui skips the folder. - If `Show.Name/Season 01/` has one fresh episode and nine old ones, only the fresh episode stays in scope. - If `Old.Show.S01/` has all episode files older than 7 days, qui skips the folder. ### Directories Each scan directory has its own configuration: | Setting | Description | |---------|-------------| | Directory Path | The path qui scans (immediate children become searchees). | | qBittorrent Path Prefix | Path mapping for container configurations. See [Docker and Path Mapping](#docker-and-path-mapping). | | Target qBittorrent Instance | Where qui adds matched torrents. Must have Local filesystem access enabled. | | Category override | Overrides the global Default Category for this directory. | | Additional tags | Added on top of the global Dir Scan tags. | | Scan Interval (minutes) | How often qui rescans (minimum 60 minutes, default 1440 = 24 hours). | | Skip individual episodes | The scan does not search single TV episodes. See [Skip individual episodes](#skip-individual-episodes). | | Enabled | Enable or disable the directory without deleting the configuration. | #### Skip individual episodes This option is off by default. When enabled, Dir Scan does not search for single TV episodes. It searches for a season pack containing the episodes instead. This setting does not affect movies, music, or other content. A season pack search requires two or more episodes of the same show and season. Dir Scan groups these episodes across the entire searchee, not per subfolder. If a folder contains episodes from multiple seasons, Dir Scan creates no pack for those seasons. Dir Scan skips any episode that cannot form a season pack. This option does not affect specials (season 0) or absolute episode numbers. ### Operational Behavior #### Concurrent scans A directory has at most one full scan, in progress or queued. If the schedule starts a scan while a full scan of the directory runs or waits in the queue, qui does not start a second full scan. A webhook scan can run at the same time as a full scan. See [Webhook scans during a full scan](#webhook-scans-during-a-full-scan). #### Incremental progress and resets Dir Scan persists per-file progress. It skips unchanged searchees whose files are already in a final state (matched, no match, already seeding, or in qBittorrent). This is **not** an exact checkpoint resume. If you start a new run after a cancellation or qui restart, Dir Scan: - Rechecks the directory from the top. - Skips unchanged finished files. - Retries unfinished or failed files. This behavior functions as a **restart with preserved progress** rather than continuing from the exact stoppage point. #### Deleted files leave the file list When a file disappears from disk, its entry stays in the file list until three scans in a row have run without finding it. Dir Scan then drops the entry. Only full scans that finish count. A scan that fails partway, and a scan that cannot reach the directory at all, both leave every entry in place. A webhook or manual scan of a single subfolder does not count either, because it only looks at part of the directory and cannot tell you anything about the rest. Dir Scan also skips the cleanup when a scan finds far fewer of its tracked files than previous scans did, so an unmounted or half-mounted network share does not empty the list. Because the cleanup needs three completed full scans, a deleted file stays listed for roughly three scan intervals. At the default of one scan per day, that is about three days. #### New indexers reopen "no match" files Each "no match" file records which indexers were enabled when the search ran. If you enable an indexer missing from that record, the next scan searches the file again. You do not need to reset anything. An indexer present in the record does not trigger a retry, because qui already searched it. Dir Scan marks a file as "no match" only when every queried indexer responds. If any indexers are down or rate-limited, the file remains pending and the next scan retries it. Files marked "no match" on older qui versions lack a recorded indexer set. They remain skipped until you requeue them. #### Retry Unmatched vs Reset Scan Progress Both buttons sit on the directory details card, next to the run history. - **Retry Unmatched** resets only "no match" files to pending. Matched and already-seeding files keep their state. Use this button after you add an indexer to search old "no match" files again. - **Reset Scan Progress** deletes all tracked file state for the directory. The next scan reprocesses all files, including previous matches. Use this button only for a complete reset. Neither button starts a scan. Trigger a scan with **Scan Now**, or wait for the next scheduled run. #### Search cache Dir Scan reuses cached indexer results from the [search cache](../search.md#search-cache). A cached result stays for the cache TTL, which is 24 hours at minimum. Dir Scan has no setting that bypasses the cache, so a scan after a reset can still get the same results. To clear the cached results of one indexer, open **Settings > Indexers**, edit the indexer, and save it. qui deletes the cached searches of an indexer when you save it. #### Scheduled vs manual scans - **Scheduled scans** run at the configured interval (minimum 60 minutes). - **Manual scans** start from the UI at any time with the **Scan Now** button. You can cancel both types from the UI while they run. The UI displays the **last 10 run entries** per directory. qui prunes older run rows automatically. #### Webhook trigger You can trigger a scan automatically when Sonarr, Radarr, Lidarr, or Readarr imports content. The webhook endpoint natively understands *arr webhook payloads without custom scripts. ```http POST /api/dir-scan/webhook/scan?apikey=YOUR_API_KEY ``` qui extracts the path from the *arr payload (`series.path`, `movie.folderPath`, `artist.path`, or `author.path`). It matches the path against the Dir Scan **Directory Path** values configured in qui and uses the payload path as the scan root. It does not use qBittorrent path prefixes for this lookup. On success, the response includes `runId`, `directoryId`, `directoryPath`, and `scanRoot`. Each Dir Scan directory can also define **Allowed Download Clients**. If configured, native *arr webhook scans run only when the payload `downloadClient` matches one of those names. Leave the list empty to accept all clients. Matching is case-insensitive and trims surrounding whitespace. Direct simple-mode `{"path": ...}` callers bypass the download client filter. ##### Configuration in Sonarr / Radarr 1. Go to **Settings → Connect → Add → Webhook**. 2. Set **Name** to a value like `qui Dir Scan`. 3. Under **Notification Triggers**, enable **On File Import**. If you want scans after upgrades, enable **On File Upgrade**. In Sonarr, **On Import Complete** also works. 4. Set **Webhook URL** to: ```text http://your-qui-host:7476/api/dir-scan/webhook/scan?apikey=YOUR_API_KEY ``` 5. Set **Method** to `POST`. 6. Leave **Username** and **Password** empty. The API key in the URL handles authentication. 7. Click **Test** or **Save**. qui accepts the built-in **Test** action as a no-op health check and does not start a scan. The same steps apply to Lidarr and Readarr. :::tip The webhook uses query-param API key authentication (`?apikey=...`), matching the cross-seed webhook format. You can also use the `X-API-Key` header instead. ::: ##### How path matching works qui uses longest-prefix matching against the configured Dir Scan **Directory Path** values to choose which directory settings apply. The actual scan root is the path from the webhook payload. For example, you configure directories for `/data/media/movies` and `/data/media/tv`. If Sonarr sends `series.path: "/data/media/tv/Show Name"`, qui matches `/data/media/tv` and scans `/data/media/tv/Show Name`. In split-mount configurations, the *arr app must send the same library path that qui sees on disk. If Sonarr or Radarr uses a different mount path than qui, the webhook does not find a matching directory. ##### Response codes | Status Code | Meaning | |-------------|---------| | `200` | Webhook accepted but skipped by directory filters. Example: `{"skipped": true, "reason": "download client not allowed"}` | | `202` | Scan accepted. If no webhook scan runs for that directory, qui starts the run immediately. This is also true when a full scan runs. If a webhook scan already runs for that directory, qui keeps one queued follow-up run and merges the paths of later webhooks into it. Example: `{"runId": 42, "directoryId": 3, "directoryPath": "/data/media/tv", "scanRoot": "/data/media/tv/Show Name"}` | | `204` | Test webhook accepted. No scan started | | `400` | Invalid JSON payload, or no supported path field in the request body | | `404` | No enabled directory matches the path in the payload | | `409` | Request conflicts with directory state, such as multiple matching directories | | `500` | Internal server error. qui failed to start the scan because of an internal failure | If a second webhook arrives while a webhook scan of the same directory runs, qui returns `202` again. It does not reject the request, and the client does not have to try again. qui updates one queued follow-up webhook scan for that directory. If necessary, it changes the queued `scanRoot` to the nearest common parent folder of the two paths. A webhook never merges into a queued full scan. ##### Webhook scans during a full scan A webhook scan is a scan that an import in Sonarr, Radarr, Lidarr, or Readarr starts. A webhook scan does not wait for a full scan of the same directory or of a different directory. Its first search starts within about 60 seconds. If a webhook item waits, it searches before the next item of the full scan. If no webhook item waits, the full scan continues. - Each scan in progress has its own status line on the directory card. The status line of a webhook scan starts with "Webhook scan". - **Scan** shows when the directory has no full scan in progress or queued. **Pause** shows when a scan is in progress. The card can show the two buttons at the same time. - **Pause** stops all scans of the directory, in progress and queued. - Before the full scan searches an item, it reads the status of the item again. If the webhook scan already finished the item, the full scan skips it. Webhook-triggered scans also ignore the global age cutoff. This avoids false skips when Sonarr/Radarr imports files that keep old filesystem mtimes. ##### Allowed download clients Use **Allowed Download Clients** on a Dir Scan directory when you want only specific Sonarr/Radarr clients to trigger scans for that path. - Leave it empty to allow all webhook clients. - Add exact client names as shown in Sonarr or Radarr, such as `SABnzbd`, `NZBGet`, or `qBittorrent`. - Matching is case-insensitive and ignores surrounding whitespace. - If the webhook is otherwise valid but the client is missing or not allowed, qui returns `200` and does not start a scan. - Direct simple-mode callers with `{"path": ...}` bypass this filter because they provide no *arr download client metadata. ##### Simple mode You can also call the webhook directly with a plain path. This is useful for scripts and other tools: ```bash curl -X POST "http://localhost:7476/api/dir-scan/webhook/scan?apikey=YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"path": "/data/media/movies/Movie Name (2024)"}' ``` #### Scan phases Each scan moves through these phases: 1. **Scanning**: qui reads the directory contents and builds the searchee list 2. **Searching**: qui queries indexers for each searchee. qui waits 60 seconds between the searches for two items, so this phase is usually the longest. See [Search pacing](#search-pacing) 3. **Injecting**: qui adds matched torrents to qBittorrent 4. **Final state**: Success, Failed, or Canceled The UI shows the current phase and progress during active scans. ### Hardlink/Reflink Modes You configure each instance under **Cross-Seed > After injection > [Hardlink / Reflink Mode](./hardlink-mode.md#how-to-enable)**. If the target qBittorrent instance has hardlink or reflink mode enabled, Dir Scan uses the same behavior as other cross-seed methods: - Builds a link tree that matches the incoming torrent's layout. - Adds the torrent pointing at that tree (`contentLayout=Original`). Full matches use `skip_checking=true`. For partial matches, qBittorrent verifies existing data and downloads missing files into the link tree. :::note Partial matches in link tree mode (hardlink or reflink) require **Download missing files** in Dir Scan settings. Without it, qui rejects partial link tree injections. ::: See: - [Hardlink Mode](./hardlink-mode.md) - [Link Directories](./link-directories.md) #### Fallback to regular mode If link-tree creation fails (such as across filesystems or on permission errors) and the instance enables **Fallback to regular mode**, Dir Scan falls back to regular add behavior. Otherwise, the candidate fails. Filesystem fallback adds the torrent against the matched source files instead of the link-tree directory. If the torrent file names differ from the on-disk names, qui adds the torrent paused, renames the paths, rechecks it, and resumes it. Partial matches and disc layouts get a recheck after the add and resume when the check completes. The cross-seed **Skip recheck** rule does not apply to Dir Scan. Dir Scan runs the piece-boundary check once, before it adds a partial match. If you enable **Skip piece boundary safety check**, Dir Scan skips the check for link-tree adds and fallback adds alike. ### Scanning Your *arr Library Dir Scan can scan Sonarr/Radarr library folders. Use caution with partial matches: :::warning If you enable **Allow partial matches**, qBittorrent can download missing files (extras like `.nfo`, subtitles) directly into your *arr-managed library folder. This creates unexpected files next to your media. ::: For a "read-only" scan of your library: 1. Disable **Allow partial matches** (full matches only). 2. Disable **Fallback to regular mode** on the target instance. Hardlink failures then do not add torrents directly against your library path. The safer configuration is usually: - Scan your completed downloads or staging folder instead of the final library. - Use hardlink or reflink mode, so cross-seeds live under your configured link-tree base directory. ### Troubleshooting #### Recent Scan Runs The **Recent Scan Runs** panel on the Dir Scan page shows: - Start time, status, file count, match count, added count, and duration - An error icon next to the status of a failed run Expand a run to see each added or failed torrent and its failure reason. #### Common issues **No results found:** - Make sure that at least one indexer is enabled and not rate-limited. - Make sure that the scan path contains valid media files. - Make sure that the target instance has **Local filesystem access** enabled. **Permissions errors:** - qui must have read access to the scan path. - If you run in Docker, check container volume mounts. **Wrong path mapping:** - Make sure that **qBittorrent Path Prefix** matches how qBittorrent sees the same files. - Test with a torrent's save path in the qBittorrent UI. **Rate limiting (HTTP 429):** When an indexer answers 429 (Too Many Requests), qui blocks the indexer for the time that the answer gives. The scan continues without that indexer, so it can miss matches from that tracker. The files stay pending, and the next scan searches them again. - Open **Scheduler Activity** on the Indexers page to see which indexers are blocked and until when. - The 429 can come from Prowlarr, not from the tracker. Prowlarr sends its own 429 when an indexer reaches its **Query Limit** in Prowlarr, or when Prowlarr disabled the indexer after failures. Open the indexer in Prowlarr and look at its limits and its status. - Dir Scan has no indexer selection. It searches every enabled indexer that supports the content type. To remove an indexer from Dir Scan, disable it in **Settings > Indexers**. This also removes it from all other searches in qui. - To send fewer searches, keep scans short. See [Search pacing](#search-pacing). For cross-seed-wide issues (matching behavior, hardlink failures, recheck problems), see [Troubleshooting](./troubleshooting.md). --- ## Cross-seed between OPS and RED ## OPS/RED (Gazelle) qui cross-seeds between Orpheus (OPS) and Redacted (RED) using the trackers' Gazelle JSON APIs. For the general flow, start with the [cross-seed overview](./overview.md). :::tip TL;DR - For the best OPS/RED cross-seed coverage, enable Gazelle and set **both** API keys. - If you set **only one** key, Gazelle matching still works, but coverage is **partial**: - OPS-sourced torrents need the **RED** key because qui queries the opposite site - RED-sourced torrents need the **OPS** key because qui queries the opposite site - Library Scan (Seeded Torrent Search) can run in Gazelle-only mode without Torznab. Use an interval of **10+ seconds**. - **Search Cross-Seeds** in the torrent list also works without Torznab indexers. It then asks only the Gazelle sites that have a key. ::: ### What it does If you enable Gazelle matching: - If a torrent comes from OPS or RED, qui queries **only the opposite site** (RED -> OPS, OPS -> RED). - If a torrent comes from another source, qui checks it against the Gazelle sites you configured. - qui asks Torznab and the Gazelle sites at the same time. qui removes the Torznab indexer of each OPS/RED site that has an API key from per-torrent searches (manual, completion, library scan). qui asks that site through its API instead. If you set only the RED key, qui keeps the OPS Torznab indexer, and the other way around. - In each search, qui waits 45 seconds at most for the Gazelle sites. If they do not answer in that time, qui returns the Torznab results. The search dialog shows "RED/OPS did not answer in time". A Library Scan records "search timed out after 45s" and asks the Gazelle sites again at the next run. - If qui cannot load the Torznab indexers, it still asks the OPS/RED sites that have a key. The search dialog then shows a note that Torznab failed. The Library Scan run history shows the error, and a completion search writes a warning to the log. - If Torznab is unavailable, qui still returns a successful empty result for a torrent that Gazelle handled. If a local prefilter proves the target tracker content is already present, qui sends no remote Gazelle request. Gazelle support gives qui music-specific handling for OPS/RED. The tracker-native APIs search by Gazelle release metadata and source-specific infohashes. Direct Gazelle API use lets Gazelle-only scans run without a Torznab backend. qui paces API requests and tracks key coverage separately from Torznab indexer rules. #### Content gate for non-OPS/RED torrents Before qui spends an API call on a non-OPS/RED torrent, it reads the torrent's file extensions. If most of the torrent's bytes are not audio, e-book, or comic files, qui skips the Gazelle query for that torrent. If a torrent is already on OPS or RED, it skips this gate because the source tracker proves that the content fits. In a Library Scan, qui searches one copy of each group of duplicate copies. If any copy of the group is from OPS or RED, qui skips the gate for the group. qui asks only the Gazelle sites where no copy of the group seeds. ### When it applies qui detects OPS and RED sources by reading the announce URL: - RED announce host: `flacsfor.me` - OPS announce host: `home.opsfet.ch` These map to the Gazelle API sites: - RED API host: `redacted.sh` - OPS API host: `orpheus.network` ### Keys and coverage You can configure one key or both. What qui queries depends on what you seed. - If a torrent is sourced from **OPS**, qui searches for it on **RED**. That requires a **RED key**. - If a torrent is sourced from **RED**, qui searches for it on **OPS**. That requires an **OPS key**. If you set only one key, expect this behavior: - Mixed OPS+RED libraries: some torrents return "no match" because qui cannot query the needed opposite site. - Non-OPS/RED torrents: qui queries whichever Gazelle sites you configured, one or both. ### What happens if Gazelle is not configured If you disable Gazelle or set no API keys: - qui falls back to Torznab (Jackett/Prowlarr) where available - Gazelle-only modes (Torznab disabled) cannot run ### How it matches In order: 1. Infohash match with the Gazelle-style `info["source"]` swap logic (see [nemorosa](https://github.com/KyokoMiki/nemorosa)). qui tries the current source flag first (`RED` or `OPS`), then the flag the site used before its rename (`PTH` or `APL`). Uploads from before a rename still carry the old flag. 2. Filename search plus exact total size 3. Filename search plus filelist verification If the target tracker is down or returns an error, qui logs a warning, does not stamp the torrent's Gazelle cooldown, and continues the run. The torrent stays eligible for the next run. ### Configuration UI: **Settings > Indexers > Gazelle (OPS/RED)**, below the Torznab indexers - Enable Gazelle matching - Set one or both API keys - qui encrypts the keys at rest and redacts them in API and UI responses ### Common issues #### "torznab disabled but gazelle not configured" You tried to run in Gazelle-only mode with Torznab disabled, but qui has no usable Gazelle client. Fix: - Enable Gazelle - Set at least one API key - If you changed `sessionSecret` (or `QUI__SESSION_SECRET`), qui cannot decrypt the stored keys, and the key fields show as empty. Put the old `sessionSecret` back to use the stored keys again, or enter the keys again. - For the best OPS/RED coverage, set **both** keys #### "OPS rejected the API key or this IP" or "RED rejected the API key or this IP" The tracker refused a request. The API key is wrong, or the tracker banned the IP address of qui. The text after the colon comes from the tracker. qui checks a new key when you save it. It sends one request to the tracker. If the tracker refuses the key, qui does not save the settings and shows this message. If the check fails for another reason, for example the tracker does not answer or is rate limiting, qui saves the key and shows a warning that it could not check the key. qui does not check a key while Gazelle matching is off. A ban can also start after you saved the key. When the tracker refuses a request during a search, qui sends no more requests to that tracker for the rest of the search. It keeps searching the other Gazelle site and Torznab. It does not stamp the Gazelle cooldown for the torrents it could not check, so they stay eligible for the next run. The run history shows the message. If that tracker was the only source of the run, the run ends as failed. Fix: - Check the API key for that tracker, and enter it again if necessary. - If the tracker banned your IP, contact the tracker staff. qui does not retry. #### Only one key set This configuration works, but coverage is partial. For example, if you set only the RED key: - qui can check OPS-sourced torrents against RED - qui cannot check RED-sourced torrents against OPS ### Rate limiting qui rate-limits requests to OPS/RED and shares the limit across the whole qui process. Multiple qBittorrent instances do not multiply API pressure. Gazelle and Torznab also differ in how qui applies time-based search constraints: - If you enable Torznab, Library Scan keeps the per-torrent interval floor of 60 seconds used for indexer searches. - If you disable Torznab and configure Gazelle, Library Scan can use a lower interval floor because requests go directly to the tracker APIs instead of through Torznab indexers. - qui stamps the Gazelle cooldown for a torrent when a Gazelle lookup completes, with or without a match. It also stamps it when Gazelle was enabled for the run but had nothing to look up for that torrent. Causes: the torrent failed the content gate, the local prefilter found the content, the target hash is already present, or a copy of the group seeds on each Gazelle site. A lookup that fails (tracker down, rate limited) does not stamp it, so the torrent stays eligible next run. - qui does not stamp the Gazelle cooldown when the API key for the target site is missing. If you add the key later, the next run searches the torrent on that site. - qui stamps Torznab cooldowns per indexer, and only for indexers that completed the search. An indexer that was rate limited or failed stays eligible on the next run. - After each search attempt, qui copies the representative torrent's Gazelle and per-indexer cooldown stamps to its duplicate torrents. #### Library Scan without Torznab If you configure Gazelle, Seeded Torrent Search (Library Scan) can run with **no enabled Torznab indexers**. In that mode: - qui still processes all source torrents - Matches come only from the configured Gazelle sites (RED/OPS) - You can lower the Library Scan interval below the Torznab floor, down to a minimum of 5 seconds. Actual request pacing still respects the shared OPS/RED API rate limits. - Use 10 seconds or more to reduce API pressure. The interval is per-torrent pacing, and each torrent can trigger multiple API calls. --- ## Cross-seed with hardlinks or reflinks ## Hardlink Mode Hardlink mode is an opt-in cross-seeding strategy. qui creates a hardlinked copy of the matched files in the layout that the incoming torrent expects. qui then adds the torrent and points it to that hardlink tree. qBittorrent starts seeding immediately without file rename alignment, and complete link trees skip hash rechecks. ### When to use - You want cross-seeds to have their own on-disk directory structure (per tracker, per instance, or flat) while they share data blocks with the original download. - You want to avoid qBittorrent rename alignment and hash rechecks for layout differences. ### Requirements - The target qBittorrent instance must have **Local filesystem access** enabled, or be a remote instance. - A link target that already holds a different file stops the add on every instance, local or remote, instead of falling back to a regular add. A regular add would put the torrent inside the matched torrent's own path and leave the half-built link tree behind, so qui refuses and leaves the target for you to clean up. On an instance with local filesystem access, a target that is already qui's own link to the same file is reused instead of stopping the add. A remote instance cannot compare file identity over SFTP, so any existing target stops the add there. - The hardlink base directory must reside on the **same filesystem/volume** as the instance download paths. Hardlinks cannot cross filesystems. - qui must have permission to read the instance content paths and write to the hardlink base directory. :::tip Multi-filesystem setups If your downloads span multiple filesystems (for example `/mnt/disk1` and `/mnt/disk2`), set **multiple base directories** separated by commas. qui selects a directory that is on the same filesystem as the source files. When several directories match, qui tries first the directory that shares the longest path prefix with the source files. Some hosts, such as OrbStack on macOS, report one device for several disks. On such a host, if a link fails with a cross-device error, qui tries the next directory. Example: `/mnt/disk1/cross-seed, /mnt/disk2/cross-seed, /mnt/disk3/cross-seed` ::: :::warning[Docker: Local Filesystem Access] Orphan scan, hardlinks, reflinks, and path-based automation rules require access to the same filesystem paths that qBittorrent uses. Mount the same paths that qBittorrent uses. The paths must match exactly: ```yaml volumes: - ./qui:/config - /data/torrents:/data/torrents # Must match qBittorrent's path ``` After you mount the paths, enable **Local Filesystem Access** on each instance in qui's Instance Settings. ::: ### Behavior - Hardlink mode is a **per-instance setting**, not a per-request setting. Each qBittorrent instance has its own hardlink configuration. - Torrents added in hardlink or reflink mode always use an explicit `savepath` (the link-tree root), which turns **AutoTMM off**. If you enable AutoTMM after the add, qBittorrent can move files out of the link tree. - If qui cannot create a hardlink (due to missing local access, a filesystem mismatch, or an invalid base directory), the cross-seed **fails** by default. - If you want failed hardlink operations to use regular cross-seed mode instead of failing, enable **"Fallback to regular mode on error"**. A link target that already holds a different file is the exception: it fails the cross-seed even with fallback on. Filesystem fallback uses a full recheck, except for a [byte-complete match](./rules.md#skip-cross-seeds-with-extra-files) when **Skip recheck** is on. See [troubleshooting](./troubleshooting.md#when-rechecks-are-required-reuse-mode). - If qBittorrent returns an unsafe file path, qui rejects the cross-seed without regular-mode fallback. This applies to hardlink and reflink modes. - When fallback handles a partial or non-perfect match, qui runs a piece-boundary safety check before it adds the torrent to qBittorrent. qui always enforces this fallback check, even when the **Piece boundary safety check** in **Cross-Seed > Matching rules > Safety & validation** is off (the default). - qui categorizes hardlinked torrents with your existing cross-seed category rules (category affix, indexer name, or custom category). The hardlink preset only affects the on-disk folder layout. ### Directory layout Configure in **Cross-Seed > After injection > Hardlink / Reflink Mode**, then expand the instance: - **Base directories**: paths where qui creates link trees, on the host that holds the instance's files. For an instance with local filesystem access that is the qui host; for a remote instance it is the remote host, so enter the paths as that host sees them. For multi-filesystem setups, set multiple paths separated by commas (for example `/mnt/disk1/cross-seed, /mnt/disk2/cross-seed`). - **Directory organization** preset: - `flat`: `base/TorrentName/...` - `by-tracker`: `base//TorrentName/...` - `by-instance`: `base//TorrentName/...` #### Isolation folders An isolation folder keeps the files of one torrent apart from the files of other torrents. For each preset, qui reads the file structure of the torrent to decide whether it needs one: - **Torrents with a root folder** (for example `Movie/video.mkv` and `Movie/subs.srt`): the files already share a top-level folder, so qui adds no isolation folder. - **Rootless torrents** (for example `video.mkv` and `subs.srt` at the top level): qui adds an isolation folder with the torrent name, for example `My.Movie.2024.1080p.BluRay`. The folder that qui adds to the preset directory must be new. If a folder with that name already exists, qui uses an isolation folder with the format `` (for example `My.Movie.2024.1080p.BluRay--abcdef12`). The short hash is the first 8 characters of the info hash. ### How to enable 1. For a qBittorrent instance on the same machine as qui, enable "Local filesystem access" in Instance Settings. For a remote instance, leave it off: turning it on makes qui treat the instance as local and link against paths on the qui host instead of the remote one. 2. In **Cross-Seed > After injection > Hardlink / Reflink Mode**, expand the instance you want to configure. 3. Set the **Cross-seed mode** to **Hardlink**. 4. Set **Base directories**: - Single filesystem: `/mnt/data/cross-seed` - Multiple filesystems: `/mnt/disk1/cross-seed, /mnt/disk2/cross-seed, /mnt/disk3/cross-seed` 5. Choose a **Directory organization** preset (`flat`, `by-tracker`, `by-instance`). 6. If you want failed hardlinks to use regular cross-seed mode instead of failing, enable **"Fallback to regular mode"**. ### Pause behavior By default, hardlink-added torrents start seeding immediately because `skip_checking=true` sets them to 100%. If you want hardlink-added torrents to stay paused, disable the "Auto-resume after injection" toggle for your cross-seed source on the source's tab (**RSS**, **Webhook**, **Completion**, or **Library**). When hardlink or reflink mode creates a complete link tree with no extra files to download, qui adds the torrent with hash checking skipped and does not trigger an automatic recheck. If qBittorrent reports `missing files`, see [Hardlink/reflink cross-seed shows "missing files"](./troubleshooting.md#hardlinkreflink-cross-seed-shows-missing-files). When the incoming torrent has extra files that are not present in the matched torrent, qui adds the torrent paused and triggers a recheck. If the recheck confirms that the missing data fits within the **Max auto-start download** limit, qui resumes the torrent. When only ignorable files are missing (samples, `.nfo`, subtitles), qui resumes anyway, up to 200 MiB (see [After injection](./rules.md#max-auto-start-download)). #### Linked files that fail a recheck A **linked file** is a file in the added torrent that qui hardlinked from local data before the add. A **pending file** is a file that was absent at add time, which qBittorrent downloads after the resume. A hardlink shares its data with the source file. If qBittorrent downloads into a linked file, the torrent that already seeds that file gets the new data too. To protect the source, qui checks the recheck result before every automatic resume in hardlink mode. This covers cross-seeds with extra files and season packs. If a linked file is below 100% and one of its failed pieces lies outside every pending file, qui leaves the torrent paused. The season pack history on the Cross-seed page and the log name the file: `Linked file does not match the torrent, left paused to protect the source`. A piece that spans a linked file and a pending file always fails the recheck, because the pending part is absent. qui allows that piece, so a pack with such pieces stays eligible for the normal resume rules. The **Piece boundary safety check** setting decides before the add whether such pieces are accepted at all. Reflink mode does not use this check. A reflink clone is copy-on-write, so a download into the clone never reaches the source. To seed the torrent after this message, remove the torrent and its link tree, and download the torrent normally. Do not resume it as it is. A resume downloads into the linked file and changes the local file. If hardlink or reflink mode falls back to regular mode for a partial or non-perfect match, the fallback add is stricter. qui checks piece boundaries first. If the check passes, qui adds the torrent in a paused state. Safe fallback adds require a full 100% recheck before auto-resume. With **Skip recheck** on, a [byte-complete match](./rules.md#skip-cross-seeds-with-extra-files) gets no recheck. If **Auto-resume after injection** is on, qui renames the paths if necessary and then resumes it. #### Pooled Partial Completion Enable **Automatically pool torrents with extra data** under Cross-Seed → After injection → Hardlink / Reflink Mode. The checkbox controls one global setting, remains available regardless of the per-instance mode selections, is off by default, and applies only to new partial hardlink or reflink additions; qui does not import existing partial torrents into pools. qui groups related members persistently by their original source torrent identity, not category, release name, save path, or the latest match. Each member keeps the managed link-tree root chosen when it was added, and unfinished work resumes after a qui restart. After each recheck, **Max auto-start download** under Cross-Seed → After injection determines whether a member may acquire missing data. Over-budget members remain paused and can be reconsidered when another member supplies files or the limit changes. The existing sidecar allowance for samples, `.nfo` files, and subtitles still applies. Only one member downloads in a pool at a time. When a whole wanted file completes, qui can link or clone it into stopped related members, recheck each target, and resume only targets that qBittorrent verifies as complete. Exact file evidence is required; ambiguous names, moved roots, changed priorities, conflicting targets, and unsafe paths remain paused for review. Pool path validation rejects dangling symbolic links, even when their missing destinations are inside the pool root. This applies on every platform. Ordinary missing files and directories remain valid, as do existing symbolic links that resolve inside the root. If the active member's downloaded-byte counter makes no progress for 15 minutes, qui pauses it, retains all partial data, and gives it a 30-minute cooldown before retry. Another eligible member may run during that cooldown. Disabling pooled completion pauses only a downloader qui started; persisted pool state remains available if the setting is enabled again. Hardlink members require every originally linked file to verify completely before acquisition because repair could modify the source through the shared inode. A propagated hardlink that fails verification is removed only when the current qui process can prove it created that exact link; otherwise the member stays paused for manual recovery. Reflink members can safely repair incomplete clones through copy-on-write, so failed target verification keeps the clone and can return the member to normal pooled acquisition. ### Notes - Hardlinks share disk blocks with the original file but increase the link count. Deleting one link does not free space until you remove all remaining links. - Windows support: qui sanitizes folder names to remove characters that Windows forbids. The torrent file paths must remain valid for your qBittorrent setup. - If extra files are piece-boundary safe, hardlink mode supports them. If the incoming torrent contains extra files that the matched torrent lacks (for example `.nfo` or `.srt` sidecars), hardlink mode links the content files and triggers a recheck so qBittorrent downloads the extras. If the extras share pieces with content (unsafe) and the **Piece boundary safety check** is enabled, qui skips the cross-seed. - In Dir Scan, partial matches (for example season packs where only some episodes exist on disk) require the **Download missing files** setting in [Dir Scan settings](./dir-scan.md#settings-global). Without it, Dir Scan rejects partial link tree injections. Other sources add partial season packs paused and recheck them. ### Deleting Hardlinked Cross-Seeds The delete dialog cross-seed check detects hardlinked copies by verifying filesystem identity, even when copies live in a different save path. Detected copies appear in the affected list with a **Hardlink** badge. You can delete them together with the selection with **Also delete these cross-seeded torrents**. Because hardlinked copies keep their own links to the data, deleting the original torrent files does not break the copies and does not free disk space. The filesystem reclaims disk space only after you remove all remaining links. The dialog warning text reflects this. Detection requires: - **Local filesystem access** enabled on the instances. qui must run in an environment where qBittorrent save paths are valid, identical to the requirements above. Without local access, qui detects only same-path cross-seeds. - The copy torrent must have the same name as the original, or the same release title and metadata. A copy with a different title also counts when it has the same total size and the other release details match. A copy that numbers its episodes in another way, for example `Show - 25` and `Show S02E01`, counts under the same condition. If such a copy has an extra file, its total size is different, and qui does not detect it. If qui cannot verify a copy (for example when its file list is temporarily unavailable), the check fails visibly instead of reporting "no cross-seeds found". The check also fails when qui cannot read a torrent's files. A common cause is a permission error: qui runs as a different user (PUID) than qBittorrent. The check fails in the same way when qui cannot map a torrent file name to a path under the save path. These failures stay until you fix the permissions or rename the file. On Windows, the same delete check also detects ReFS block-cloned files and displays a **Reflink** badge. This is a bounded verification step, not a disk scan: - qui considers only torrents that match by exact name or release metadata. - qui examines only the files that qBittorrent lists for those torrents. qui does not enumerate the volume, scan unrelated directories, query block reference counts, or calculate reclaimable space. - Source and candidate files must reside on the same ReFS volume and report block-cloning support. - qui pairs files by exact case-insensitive normalized relative path and qBittorrent-reported size. If layouts differ and the basename-and-size key is unique in both torrents, qui uses an exact basename-and-size fallback. - qui skips zero-length files, missing files, symbolic and reparse-point links, directories, and unsafe traversal paths. The ReFS check compares current allocated disk extents. It proves that the files share at least one allocated cluster at the time of the check. It does not prove clone history, and it does not prove that the files still share every byte. Copy-on-write modifications can leave only part of a file shared. If a process rewrites all formerly shared clusters, qui cannot detect the clone. Files smaller than one ReFS allocation cluster have no cloned extent, because qui's Windows reflink implementation copies the non-cluster-aligned tail. Those files cannot provide ReFS shared-extent evidence. ### Cross-seed instance Some setups use two qBittorrent instances on the same disk. Sonarr and Radarr manage the first instance. The second instance holds only cross-seeds, so Sonarr and Radarr never see them. A **route** tells qui to add the cross-seeds that it finds for the first instance to the second instance. - The **Source instance** holds the matched torrents and names a Cross-seed instance. In this example, it is the instance that Sonarr and Radarr manage. - The **Cross-seed instance** receives the cross-seeds that qui finds on the Source instance. When the Source instance has a route, qui adds no cross-seed to it from a search or a match. RSS, webhook, Library Scan, completion search, manual search, manual match, and season pack apply and assembly all add to the Cross-seed instance. [Dir Scan](./dir-scan.md) keeps its own target instance and does not follow the route. #### Requirements for a route - The Source instance uses hardlink or reflink mode and has at least one base directory. A routed add never uses regular mode, and it ignores the **Fallback to regular mode on error** setting. If a link fails, the add fails. - The Source instance has [Local Filesystem Access](../instance-settings.md#local-filesystem-access). Link mode alone does not need it, but a route does. - The Cross-seed instance is online and runs qBittorrent 5.0 or later. It needs no Local Filesystem Access. - The qBittorrent of the Cross-seed instance can read and write the folders that the route maps. It reads the linked files there, and it downloads files that the matched torrent does not have (pending files) into the same folders. - A route has one step. The Cross-seed instance cannot have a route of its own, and no other instance can route to the Source instance. Several Source instances can route to one Cross-seed instance. #### Example setup | Instance | Role | Base directory as the instance sees it | |----------|------|----------------------------------------| | `qbit-arr` | Source instance. Sonarr and Radarr manage it. | `/data/cross-seed` | | `qbit-cross` | Cross-seed instance, in a container that mounts the same disk at `/mnt/data` | `/mnt/data/cross-seed` | 1. On `qbit-arr`, enable Local Filesystem Access in Instance Settings. 2. In **Cross-Seed > After injection > Hardlink / Reflink Mode**, expand `qbit-arr`. Set the mode to **Hardlink** or **Reflink**, set the base directory `/data/cross-seed`, and save. 3. In the **Cross-seed instance** field of `qbit-arr`, select `qbit-cross`. 4. In the row for `/data/cross-seed`, type `/mnt/data/cross-seed`. That is the path where `qbit-cross` sees the folder. 5. Click **Test route**. Each row must show that the Cross-seed instance sees it. 6. Click **Save route**. qui builds the link tree on the disk of the Source instance, with the link settings of the Source instance. qui then adds the torrent to the Cross-seed instance with the mapped path. The `by-instance` preset uses the name of the Cross-seed instance. The category, the tags, the recheck, the resume, and the External Program run on the Cross-seed instance. #### Path rows The route has one row for each base directory of the Source instance. In each row, type the path where the Cross-seed instance sees that folder. An empty row means that both instances see the folder at the same path. Each row suggests folders from the Cross-seed instance as you type. A new base directory shows as a new empty row. qui refuses two rows that map to the same folder, or to folders inside each other. If the Cross-seed instance has Local Filesystem Access, every row must keep the same path. #### Test route **Test route** tests the rows in the form, also before you save them. For each base directory, qui creates a marker folder on the Source instance. qui then asks the qBittorrent of the Cross-seed instance to list the mapped folder, and looks for the marker. qui removes the marker after the test, also after an error. Each row shows one of these results: - The Cross-seed instance sees the folder. The row is correct. - The Cross-seed instance sees the folder but not the marker. The mapped path names another folder, or a cache on the mount of the Cross-seed instance hides the new marker. An NFS mount can show an old folder listing for up to 60 seconds. Wait a minute and test again. If the result stays, make sure that the row names the same folder on the same disk. - The Cross-seed instance cannot see the folder. The path is wrong, or the Cross-seed instance does not mount the folder. - qui cannot write to the folder on the Source instance. Give qui write access to the base directory. Test route lists each folder one time and does not try again. If the Cross-seed instance is unavailable, the test shows "Cross-seed instance unavailable" one time, for all rows. #### Check before each routed add Before each routed add, qui makes sure that the Cross-seed instance sees the linked files. qui asks the qBittorrent of the Cross-seed instance to list the folder that holds one linked file. If the file is not there, qui lists the folder 3 more times over about 15 seconds. If the file is still not there, qui removes the link tree, adds nothing, and reports "Cross-seed instance cannot see the data at ``". RSS tries the item again on its next run. In one run, after the check fails for a base directory, later adds under that base directory list one time and do not try again. If the Cross-seed instance uses an NFS mount and this check fails often, lower the folder cache time of the mount. NFS can keep a folder listing for up to 60 seconds. The `acdirmax` mount option sets this time. Before the add, qui also skips a torrent that the Source instance or the Cross-seed instance already has. qui applies the [blocklist](./overview.md#blocklist) of the Cross-seed instance to a routed add. A [manual assembly](./overview.md#manual-match) from selected episodes ignores the blocklist, as it does without a route. The blocklist of the Source instance does not apply. #### Files of routed cross-seeds A routed cross-seed is a hardlinked or reflinked copy of the files of the Source instance. The delete dialog does not list it as a cross-seed on another instance. See [Shared files on other instances](./overview.md#shared-files-on-other-instances). The route protects these files on the Source instance: - [Orphan scan](../orphan-scan.md) on the Source instance keeps the files that routed torrents use, also pending files that the Cross-seed instance downloaded. - [Hardlink scope](../automations.md#hardlink-detection) on the Source instance counts routed torrents as "Only other torrents". Before a change removes this protection, qui asks you to confirm, and shows the number of routed torrents. Such changes are a route change, a route clear, a removed base directory, and an edited row. The delete dialog of a Cross-seed instance shows the same count for each Source instance that routes to it, and says that the Source instance adds cross-seeds to itself again after the delete. #### When an instance is unavailable A Cross-seed instance is unavailable when it is offline or turned off in qui. Then: - Routed adds and season pack apply stop with "Cross-seed instance unavailable". qui does not add to the Source instance instead. - A Library Scan on the Source instance does not start. - The orphan scan of the Source instance fails. - Hardlink scope rules on the Source instance read unknown, and their deletes wait. - If the target of a Dir Scan is a Source instance, Dir Scan skips the match and logs a warning. The next scan tries again. To end this, enable the Cross-seed instance or clear the route. If the qBittorrent of the Cross-seed instance is older than 5.0, routed adds, Test route, and the start of a Library Scan also stop with "Cross-seed instance unavailable". Upgrade it to 5.0 or later, or clear the route. An add to a Cross-seed instance also looks for the torrent on each of its Source instances. If a Source instance is offline, adds to the Cross-seed instance fail and name the Source instance. To end this, enable the Source instance or clear its route. qui skips a Source instance that is turned off in qui. #### Move from the export and delete automations Some users moved cross-seeds with two automations: an [Export to Instance](../automations.md#export-to-instance) to the instance that holds the cross-seeds, and a delete on the instance that Sonarr and Radarr manage. With a route, qui adds new cross-seeds to the Cross-seed instance directly. You can turn those two automations off. The route does not move cross-seeds that the Source instance already holds. #### Swap the roles of two instances A route has one step, so the Cross-seed instance cannot get a route while the Source instance routes to it. To swap the roles, you must click **Clear route** first. After you clear a route, the routed torrents stay on the Cross-seed instance, and their files stay in the base directories of the Source instance. The orphan scan of the Source instance then no longer keeps their reflinked files and their pending files. A hardlinked file stays kept while a torrent on the Source instance uses the same file. Move or delete the old routed torrents before you clear the route. ### Reflink Mode (Alternative) Reflink mode creates copy-on-write clones of the matched files. Unlike hardlinks, reflinks allow qBittorrent to modify the cloned files (download missing pieces, repair corrupted data) without any effect on the original seeded files. **Key advantage:** reflink mode **bypasses piece-boundary safety checks**. You can cross-seed torrents with extra or missing files even when those files share pieces with existing content, because qBittorrent can modify the clones safely. #### When to use reflink mode - You want to cross-seed torrents that hardlink mode skips with "extra files share pieces with content" - Your filesystem supports copy-on-write clones (BTRFS or XFS on Linux, APFS on macOS, ReFS on Windows) - You prefer the safety of copy-on-write over hardlinks #### Reflink Requirements - You must enable **Local filesystem access** on the target qBittorrent instance. - The base directory must reside on the **same filesystem/volume** as the instance download paths. For multi-filesystem setups, set multiple paths separated by commas. - The base directory must be a **real filesystem mount**, not a pooled or virtual mount (common examples: `mergerfs`, other FUSE mounts, `overlayfs`). - The filesystem must support reflinks: - **Linux**: BTRFS, XFS (with reflink=1), and similar copy-on-write filesystems - **macOS**: APFS - **Windows**: ReFS on the same volume as the source files and reflink base directory - **FreeBSD**: not supported :::note Windows reflink mode uses ReFS block cloning and requires a ReFS filesystem. qui does not support NTFS. If the matched source path is a symlink, qui resolves it before cloning. The resolved source and the reflink base directory must reside on the same ReFS volume. If reflink creation fails, fallback depends on the "Fallback to regular mode" setting. ::: :::tip On Linux, verify the filesystem type with `df -T /path`. You want `xfs` or `btrfs`, not `fuseblk`, `fuse.mergerfs`, or `overlayfs`. ::: #### Behavior differences | Aspect | Hardlink mode | Reflink mode | |--------|--------------|--------------| | Piece-boundary check | Skips if unsafe when the **Piece boundary safety check** is enabled | Never skips (clones are safe to modify) | | Recheck | Only when extras or disc layouts require verification | Only when extras or disc layouts require verification | | Disk usage | Zero (shared blocks) | Starts near zero, grows as modified | #### Disk usage implications Reflinks use copy-on-write semantics: - Cloned files initially share disk blocks with the originals, so they require near-zero extra space. - When qBittorrent writes to a clone (downloads extras, repairs pieces), the filesystem copies only the modified blocks. - If qBittorrent rewrites the entire file in the worst case, disk usage approaches the full file size. #### How to enable reflink mode 1. Enable "Local filesystem access" on the qBittorrent instance in Instance Settings. 2. In **Cross-Seed > After injection > Hardlink / Reflink Mode**, expand the instance you want to configure. 3. Set the **Cross-seed mode** to **Reflink (copy-on-write)**. 4. Set **Base directories**: - Single filesystem: `/mnt/data/cross-seed` - Multiple filesystems: `/mnt/disk1/cross-seed, /mnt/disk2/cross-seed` 5. Choose a **Directory organization** preset (`flat`, `by-tracker`, `by-instance`). 6. If you want failed reflinks to use regular cross-seed mode instead of failing, enable **"Fallback to regular mode"**. :::note Hardlink and reflink modes are mutually exclusive. You can enable only one per instance. ::: --- ## Cross-seed link directories ## Link Directories If you enable **Hardlink mode** or **Reflink mode** for a qBittorrent instance, qui creates a directory tree that matches the expected layout of the incoming torrent. qui then adds the torrent and points it at that tree. Because these modes set an explicit `savepath` (the link-tree root), qui always disables AutoTMM for torrents added in hardlink or reflink mode. This applies to: - Cross-seed searches (RSS, completion, manual, scan) - Directory scan (dirscan) injections - Season pack webhook injections (see [Season Packs](./season-packs.md)) - Manual season pack assembly from several episodes (see [Manual Match](./overview.md#manual-match)) ### Settings Configure these options per qBittorrent instance in **Cross-Seed > After injection > Hardlink / Reflink Mode**: - **Base directories** (`HardlinkBaseDir`): root paths where qui creates link trees. Separate several paths with commas. qui uses a path that is on the same filesystem as the matched source files. When several paths match, qui tries first the path that shares the longest path prefix with the source files. If a link fails with a cross-device error, qui tries the next matching path. - **Directory organization** (`HardlinkDirPreset`): controls how qui groups trees below the base directory. - **Fallback to regular mode on error** (`FallbackToRegularMode`): if link-tree creation fails, qui falls back to regular mode instead of failing. ### Directory presets qui supports three presets: - `flat`: puts each torrent directly in the base directory - Example: `base/Torrent.Name/...` - `by-tracker`: groups torrents in a folder for each tracker display name - Example: `base/TrackerName/Torrent.Name/...` - `by-instance`: groups torrents in a folder for each instance name - Example: `base/MyInstance/Torrent.Name/...` #### Tracker names (by-tracker) If you use `by-tracker`, qui resolves the folder name with the same fallback chain as cross-seed statistics: 1. **Tracker customization display name** ([Tracker Customizations](../tracker-customizations.md), on the Dashboard under **Tracker Breakdown**) 2. Indexer name (from Prowlarr/Jackett) 3. Raw announce domain qui sanitizes folder names to make them filesystem-safe. #### Isolation folders An isolation folder is a folder that qui adds so that the files of one torrent do not mix with the files of other torrents. All presets use the same rule: - A torrent with a root folder brings its own folder. qui adds no isolation folder. - A "rootless" torrent (files at the top level) goes into an isolation folder with the torrent name, for example `Torrent.Name`. The folder that qui adds to the preset directory must be new. If a folder with that name already exists, qui puts the torrent in an isolation folder with the name `--`, for example `Torrent.Name--abcdef12`. So two torrents with the same name do not share a folder. qui cuts a long torrent name to 245 bytes, so that the folder name with the hash fits the limit of 255 bytes of most filesystems. qui does not move or rename the folders of torrents that it added before. ### Fallback to regular mode If you enable **Fallback to regular mode** and link-tree creation fails, qui adds the torrent with a standard `savepath` that points at the matched source files. If hardlinks fail across filesystem or device boundaries, this fallback prevents injection errors. For example, a pooled mount presents paths that look identical but resolve to different underlying devices. If no base directory shares a filesystem with the source files, or link creation failed, qui adds the torrent paused and rechecks it. qui starts the torrent after qBittorrent reports 100% complete. For Cross-Seed, **Skip recheck** skips these candidates, except a [byte-complete match](./rules.md#skip-cross-seeds-with-extra-files), which qui adds without a recheck. Dir Scan runs the recheck even when **Skip recheck** is on. Fallbacks for configuration problems (an empty base directory, or no local filesystem access) add the torrent in regular mode with the normal regular-mode rules. If you disable fallback and link-tree creation fails, qui skips or fails the candidate. --- ## Cross-seed for qBittorrent ## Cross-Seed Overview qui finds torrents on other trackers that match content you already seed. It adds them to your qBittorrent instances, so you seed the same content on more than one tracker. qui cross-seed is a complete setup on its own. It needs no other cross-seeding tool. If you move from one, the torrents it added stay in the client, and qui skips any infohash that is already in the instance. See [Move from standalone cross-seed](./standalone-cross-seed.md). ### How It Works When you cross-seed a torrent, qui: 1. Finds a matching torrent in your library (same content, different tracker) 2. Adds the new torrent and points it to your existing files 3. Applies the correct category and save path qui supports three modes for file handling: - **Default mode**: qui reuses the existing files directly. It creates no new files or links. If the incoming torrent has a different folder or file layout, qui must align the names first. - **Hardlink mode** (optional): qui creates a hardlinked copy of the matched files in the layout that the incoming torrent expects. It then adds the torrent against that tree. This avoids rename alignment. - **Reflink mode** (optional): qui creates copy-on-write clones (reflinks) of the matched files. qBittorrent can write to or repair the clones without changes to the originals. This makes torrents with extra or missing files safe to cross-seed. Disc-based media (Blu-ray/DVD) requires manual verification. See [troubleshooting](./troubleshooting.md#blu-ray-or-dvd-cross-seed-left-paused). ### Prerequisites You need at least one enabled Torznab indexer. Add indexers in **Settings → Indexers**. Click **Discover** to import them from Prowlarr or Jackett, or **Add single** to add a native tracker endpoint by hand. See [Add indexers](../search.md#add-indexers). Library Scan also runs without Torznab if you configure Gazelle keys for OPS/RED. See [OPS/RED (Gazelle)](./gazelle-ops-red.md). :::note Prowlarr filters also apply here A Prowlarr indexer's own search filters, such as freeleech only, also apply to cross-seed searches. See [troubleshooting](./troubleshooting.md#prowlarr-filters-remove-expected-results). ::: Optional: qui can query OPS/RED directly through tracker Gazelle JSON APIs. This complements Torznab and handles OPS/RED searches even when no Torznab backend is available. qui removes the Torznab indexer of each OPS/RED site that has a Gazelle key from per-torrent searches. See [OPS/RED (Gazelle)](./gazelle-ops-red.md). **Optional but recommended:** Configure [Sonarr and Radarr integrations](../search.md#sonarr-and-radarr-integrations) for external ID lookups (IMDb, TMDb, TVDb, TVMaze). ID-based queries return more exact matches, most of all when names differ by locale ("AKA" content). Without *arr IDs, qui uses a fallback. Some release groups embed IMDb/TMDb/TVDb tags in their MKV files. When a search finds no usable results, qui reads these tags from the torrent's largest `.mkv` file. It then retries indexers that support ID-based search. This fallback requires [Local Filesystem Access](../instance-settings.md#local-filesystem-access) on the instance. qui caches each successful scan per torrent, so it reads the file only once. If a read fails, a later search tries again. ### Discovery Methods qui provides several ways to find cross-seed opportunities: #### RSS Automation qui polls tracker RSS feeds on a schedule. Configure this in the **RSS** tab on the Cross-Seed page. The tab holds every RSS setting: the schedule, the instances to search, the indexers, the source filters, the tags for added torrents, the auto-resume switch, and the recent runs. - **Run interval**: How often qui polls the feeds (minimum 30 minutes) - **Instances to search**: The qBittorrent instances whose torrents qui searches for matches. qui adds each cross-seed to the instance that holds the match. If that instance has a Cross-seed instance, qui adds the cross-seed to the Cross-seed instance. - **Target indexers**: Limit to specific indexers, or use all enabled ones RSS automation processes the full feed from each selected target indexer on each run. If you select no target indexers, qui uses all enabled indexers. qui compares each feed title and byte count with eligible local torrents. qui makes this comparison before it downloads the intended torrent file. RSS does not fetch extra torrent files to measure candidates. #### Library Scan Library Scan searches other trackers for torrents you already seed. Configure it in the **Library** tab. **Save** stores the settings without a run. **Start** stores them and starts a run. - **Source instance**: The qBittorrent instance to scan - **Categories/Tags**: Filter which torrents to include - **Interval**: The delay between torrents. If you enable Torznab, the minimum is 60 seconds. If you disable Torznab and configure Gazelle, the minimum is 5 seconds. Set 10 seconds or more for Gazelle-only runs. - **Cooldown**: qui skips torrents that it searched within this window (minimum 12 hours). qui records a Torznab cooldown after an indexer completes its search. If you enable Gazelle, qui records a cooldown when it sends a lookup or local checks find nothing to look up. If the search fails before a lookup, qui can try the torrent in the next run. - **Skip individual episodes**: The run does not search single TV episodes. If [automatic assembly](./season-packs.md#automatic-assembly) is on, groups of episodes still start season pack searches. ##### What the scan card counts The unit of a run is a search candidate: one source torrent, or one season group that season pack automation formed from episodes you seed. - **Progress**: Processed candidates out of the due candidates. A due candidate still needs a search. Cooldown and per-indexer search history retire candidates, so the same filters give a smaller total on each later run. The total is not the size of your library. - **Results**: Each processed candidate lands in one bucket: with cross-seeds, skipped, or failed. The three buckets add up to the processed count when the run completes. A candidate with one added cross-seed and one failed apply counts as with cross-seeds. The failed apply stays in the run details. - **Cross-seeds added**: Successful adds into the client. One candidate can add several cross-seeds, so this number can be larger than the candidate count. :::warning Run this sparingly. The scan touches every matching torrent and queries Torznab and/or Gazelle for each one. Use RSS automation or autobrr for routine coverage. Reserve Library Scan for occasional catch-up passes. ::: #### Auto-Search on Completion When a torrent finishes downloading, qui starts a cross-seed search. Configure this in the **Completion** tab. The **On completion** card holds the tags and the auto-resume switch. The per-instance card below it turns the search on and sets its filters. - **Categories/Tags**: Filter which completed torrents trigger searches - **Target indexers**: Limit completion searches to specific indexers (empty means all enabled) - **Exclude categories/tags**: Skip torrents that match these filters - **Bypass Torznab cache**: If you enable this setting for an instance, completion searches for that instance always run a fresh Torznab search instead of using cached indexer results. Default: off. This setting does not affect Gazelle (OPS/RED) searches, because Gazelle searches do not use the Torznab cache. - **Search delay**: qui waits 0 to 600 seconds after completion before it searches. Default: 0. If post-completion file moves or sister-torrent injection tools need a head start before qui searches trackers, use this setting. If a torrent is still **checking** or **moving**, qui waits and runs the completion search afterward. This avoids a search against an unstable path or state. Completion searches use the same Torznab result classifier as interactive and scheduled searches. An equal positive reported size can activate the same controlled fallback. #### Manual Search Right-click any torrent in the list to open the cross-seed actions: - **Search Cross-Seeds**: Query indexers for matching torrents on other trackers - **Filter Cross-Seeds**: Shows the torrents in your library that hold the same data as the selected torrent. qui compares the files of each torrent and leaves out the files that search ignores, such as `.nfo` and `.srt` files. A torrent on the same instance that uses one of the same files on disk gets the Content badge. A hardlinked or reflinked copy gets the Hardlink or Reflink badge. A torrent with the same name or release gets the Name or Release badge when its file sizes pair one to one. That torrent is a separate copy, so it stays when you delete the selected torrent with its files. qui does not show other torrents. If qui cannot read a file list or check a link, Filter Cross-Seeds shows an error and does not filter the list. Interactive searches, scheduled or on-demand Library Scans, and completion searches use one reported-size rule. Strict release matching always runs first. An exact positive byte count can relax approved name differences. Reported size is evidence, not proof that the torrent has the same bytes. qui still checks the downloaded torrent metadata, files, layout, and piece boundaries. Title, season, episode, and split release-group fallbacks require a full recheck. RSS uses the same classifier with its feed title and byte count. The [autobrr integration](./autobrr.md) uses passive announcement data during `/check`. Announce matching over alternate titles, such as an anime announced under its English or romaji name, needs a [Sonarr or Radarr integration](../search.md#sonarr-and-radarr-integrations). Without one, qui matches announces on the release name only. Sonarr also maps a single anime episode between numbering schemes. When Sonarr names exactly one episode for a release, qui reads its season, episode, and absolute number, and stores the map with the cached IDs. A search for an absolute-numbered episode (`Show - 81`) then asks ID-capable indexers for the mapped `S04E15`, and a `S04E15` announce or search result matches a local `Show - 81` file as a strict match, in both directions. The map only adds matches: when a tracker numbers the episode differently from Sonarr, qui treats the pair as an episode mismatch, as before. Season packs are not mapped. See [Season Packs](./season-packs.md#anime-absolute-numbering). If autobrr has no positive size, qui uses a narrow name-only preflight. This preflight can approve one download, but it cannot approve an add. #### Manual Match A Manual match is a cross-seed apply where you choose the target torrent yourself. Use it when automatic matching fails, for example when the release name parses as the wrong content type, or when the tracker has no searchable indexer. Two entry points open the same flow: - **Add Torrent dialog**: select exactly one `.torrent` file, then click **Match manually**. Magnets, URLs, and multi-file adds cannot use this option. - **Right-click a torrent** and select **Add Cross-Seed Manually**. The flow opens with that torrent preselected as the target. qui ranks torrents from the same instance by file-size overlap with the uploaded file. You can also pick any other torrent. A pick with no file overlap shows a warning, but you can proceed. When the upload parses as a season pack, you can select several episode torrents from the same instance. One selected target uses the existing manual match. If the upload does not parse as a season pack, the dialog permits only one target. Multiple targets require local filesystem access, hardlink or reflink mode, and a configured link base directory. The dialog shows why assembly is unavailable. Manual assembly works even when season pack automation is off. The check first selects a complete matching pack alone, if one exists. Otherwise, it suggests the episodes that automatic discovery pairs. You can change the selection or use search to add targets that the proposal list omits. The proposal limit grows with the pack episode count, up to 60 torrents. The dialog reports this limit when it truncates the list. Before you add the pack, the check shows matched episodes, coverage, missing bytes, rejected targets, and the resolved destination. Coverage uses the episode files in your upload. No coverage threshold applies to manual assembly. Each selected torrent must be complete and provide one playable episode file with an exact size match. Manual selection bypasses title, source-filter, and numbering-scheme checks, but each file still needs a parsed episode identity. Piece boundary protection also applies to manual assembly in hardlink mode. It blocks the pack when selected and missing files share a data block. Downloading that block can change the original files through hardlinks. The warning links to Cross-Seed > Matching rules, where you can review this protection under Safety & validation. qui adds the assembled pack paused and rechecks it. It resumes when verified progress reaches the linked byte fraction, with the assembly margin for piece boundaries. If a file moves between check and apply, qui drops that target, reports its name, and assembles the remaining files. Season pack run history records the matched count, coverage, and link mode. A manual selection bypasses candidate discovery and the category and content-type gates. Link mode per instance settings and tag and category treatment stay the same as the automatic pipeline. Every manual match runs a full recheck before it seeds; you cannot skip it, and it decides a wrong pick. A failed recheck leaves the torrent paused for manual review. For one selected target, the dialog prefills the category from that torrent and the tags from the cross-seed tag settings. You can edit both. If **Use Custom Category** is on, every cross-seed goes to that one category. The dialog then shows the category and locks it. The save path shows the effective destination and is read-only. With **By Tracker** directory organization, the tracker folder comes from the announce URL in the uploaded file. The tracker does not need a configured indexer. For multiple targets, season pack category routing supplies the initial category. Your category and tag choices control the add. qui does not append the automatic season pack tags. The destination uses the selected episode files and the instance link directory preset. #### Season Pack Assembly qui can assemble season-pack torrents from individual episodes you already seed. To use automatic assembly, first enable **Assemble season packs automatically** in the settings; it is disabled by default. When autobrr announces a season pack, qui checks your qBittorrent instances for matching episodes. RSS automation, a cross-seed apply, and Library Scan can also start this flow when you seed only episodes of a pack. qui links the episodes that exist locally. When coverage passes the configured threshold (default 75%), qui adds the pack and qBittorrent downloads the remainder after a recheck. When available, Sonarr, TVDB, and TVMaze improve the threshold decision. This feature requires a link mode on the target instance: local filesystem access with hardlink or reflink mode, or a remote instance with hardlink mode. See [Season Packs](./season-packs.md) for setup. ### Blocklist Use the per-instance blocklist to stop qui from injecting specific infohashes again. - **Manage**: Cross-Seed page → Blocklist tab - **Quick add**: Delete dialog checkbox (appears only for torrents tagged `cross-seed`) The blocklist applies to these add paths: - Cross-seed applies from search, RSS, completion, autobrr, and a manual match with one target - [Dir Scan](./dir-scan.md) - Season pack assembly from the [apply webhook](./season-packs.md#4-configure-the-apply-action) and from [automatic assembly](./season-packs.md#automatic-assembly) An entry blocks the infohash only on its own instance. Season pack assembly can still use another eligible instance that has no entry. A [manual assembly](#manual-match) from several selected episodes ignores the blocklist, because you select that pack yourself. The delete dialog also detects cross-seeds that the deletion affects. This includes [hardlinked copies and ReFS block clones](./hardlink-mode.md#deleting-hardlinked-cross-seeds) on instances with local filesystem access. #### Shared files on other instances Two qBittorrent instances can save into one folder on one disk. A torrent on the second instance then reads the same files as a torrent on the first. A delete with files on the first instance removes the files of both. The delete dialog lists such a torrent with its instance name. qui finds it when both instances have [Local Filesystem Access](../instance-settings.md#local-filesystem-access). Two files are one file on disk when their folders have the same file identity on disk and their names are equal. The folders can have different paths, for example two mounts of one folder. If you select **Also delete these cross-seeded torrents**, qui deletes the torrent on the other instance too. A hardlinked or reflinked copy, or a separate copy with the same name, on another instance keeps its own files. The dialog does not list it. qui does not compare every file of every torrent. It checks a torrent on another instance when it has the same save path or content path, the same name, the same release, or the same total size. Known limit: qui does not find a torrent that reads a file inside the folder of the selected torrent through a mount with another path, and that has another name, release, and total size. An example is a single episode that reads a file in a season pack through a second mount. qui does not check remote instances, also when two of them are on one host. qui cannot make sure that the file identity that a remote host reports is correct. If qui cannot read the torrent list of an instance with local filesystem access, the dialog shows the matches that it found and adds a line that it could not check that instance. If an instance with local filesystem access is turned off in qui, the dialog adds a line that it did not check that instance. Automations do not delete torrents on other instances. See [Delete](../automations.md#delete) for how the modes that preserve or include cross-seeds keep the files. --- ## Cross-seed matching rules The settings that apply to every cross-seed source sit in three sections of the Cross-Seed page: **Matching rules**, **Categories and tags**, and **After injection**. Settings that belong to one source, such as its tags, live on that source's tab: **RSS**, **Webhook**, **Completion**, **Library**, or **Season packs**. ### Matching These settings sit in **Matching rules**. - **Cross-seed episodes from packs**: If enabled, season packs also match individual episodes. If disabled, season packs only match other season packs. qui adds episodes with AutoTMM disabled to prevent save path conflicts. - **Skip recheck**: If enabled, qui skips any cross-seed that requires a recheck. See [Skip cross-seeds with extra files](#skip-cross-seeds-with-extra-files). - **Rescue title mismatches**: Disabled by default. If only the title differs and the positive reported size matches, this rule tests that result. Each source search tries at most three rescue downloads across all indexers. RSS and autobrr use this rule only when the announcement provides an exact size. qui adds rescued torrents in a paused state and starts them only after a full qBittorrent recheck reaches 100%. **Skip recheck** disables this rule. - **Piece boundary safety check**: Off by default. Turn the switch on to block cross-seeds whose extra files share torrent pieces with content files. With the switch off, qBittorrent can corrupt your existing seeded data if the content differs. Reflink mode protects the original files. If hardlink or reflink mode falls back to regular mode, qui runs the check even when the switch is off. This fallback check covers matches that are not exact, need renames, or have extra files. :::note If a torrent uses filesystem fallback, disc layouts (`BDMV`/`VIDEO_TS`), title rescue, or exact-size season, episode, or release-group matches, qui auto-resumes it only after a full recheck reaches 100%. With **Skip recheck** on, a byte-complete filesystem fallback is the exception. qui renames the paths if necessary and adds it without a recheck. If **Auto-resume after injection** is on, qui then resumes it. ::: #### Skip cross-seeds with extra files To stop qui from adding a cross-seed that has extra files, such as samples, `.nfo` files, or subtitles, enable **Skip recheck**. qBittorrent must download the extra files that you do not have, and the torrent needs a recheck. With **Skip recheck** on, qui does not add the torrent. **Skip recheck** also skips the other matches that require a recheck: renamed paths, filesystem fallback, disc layouts, title rescue, and exact-size matches with different season, episode, or release-group details. A byte-complete match is the exception. In a byte-complete match, each file has a file of the same size, and the torrent has no extra files. The paths are the same (an exact match), or only the paths differ (a rename-only match). If two or more files have the same size and their names do not show which file is which, the match is not a byte-complete match. A sidecar file, such as an `.nfo` file or a subtitle, matches only by name, not by size. An episode in a season pack, a disc layout, and a title rescue are never byte-complete matches. An exact-size match with different season, episode, or release-group details is also never a byte-complete match. qui renames the paths of a byte-complete match if necessary and adds the torrent without a recheck. This rule applies to regular, hardlink, and reflink modes. You get fewer cross-seeds. In the row details of a search run, these matches have the `skipped_recheck` status. See [Cross-seed search run statuses](./troubleshooting.md#cross-seed-search-run-statuses). #### Reported-size fallback Strict release matching runs first. If qui finds an exact positive reported byte count, it relaxes approved name differences. Reported size does not prove that two torrents contain the same bytes. qui still checks the torrent metadata, files, paths, layout, and piece boundaries. If torrents have title, season, episode, or split release-group differences, qui requires a full piece check. qui adds these torrents paused and resumes them only at 100%. Soft descriptive differences keep the normal fast path. These differences include codec, source, HDR, and edition. A checksum tag, such as `[ABCD1234]`, on one name only is not a difference. Indexer titles often leave it out. The file check after the download decides. Two checksum tags that differ prevent a match. **Skip recheck** removes only matches that need verification. RSS and autobrr reject those matches before the planned torrent download. ### Search Category Rules qui reads the torrent name to find the content type. It then corrects that guess with the file extensions inside the torrent. Both signals can fail. A search category rule forces the content type for every torrent in a qBittorrent category. The rule overrides the name and the file extensions. The content type decides which Torznab categories qui requests, and which search mode it uses. As a result, it decides which indexers can answer the search. #### When a rule helps File extensions cannot always correct the name: - A disc image contains one `.iso` file. Because this extension is neither audio nor video, the extensions give no signal and the name decides alone. - An ebook contains one `.epub` or `.pdf` file. A name such as `Author Name - Book Title (2021)` can parse as music or as a movie. In both examples, the torrent is in a category that you control. A rule on that category gives qui the correct content type. #### Add a rule 1. Open **Matching rules** on the Cross-Seed page. 2. Find **Search category rules**. 3. Select **Add rule**. 4. Select or type one or more qBittorrent categories. 5. Select the content type in the **search as** list. The content types are Movie, TV, Music, Audiobook, Book, Comic, Game, and App. #### How rules match One rule can hold more than one category. A torrent in any of those categories gets the content type of that rule. The match is exact and case-sensitive because qBittorrent categories are case-sensitive. A rule for `ebooks` does not match a torrent in `Ebooks`. If two rules name the same category, the first rule keeps it. When qui saves the settings, it removes that category from the later rule. If this empties the later rule, qui removes that rule. :::note Manual search, Library Scan, completion search, RSS matching, and autobrr matching apply these rules to local source torrents. Dir Scan uses its own detection. ::: :::note Audiobook and Music request the same categories from indexers, and both send an artist and an album parameter. Only the text of the search query differs. ::: ### Season packs Season pack settings have their own **Season packs** tab. See [Season Packs](./season-packs.md). ### Categories These modes sit in **Categories and tags**. They set the category that qui gives to a new cross-seed. To choose the search content type from the category of the source torrent, see [Search Category Rules](#search-category-rules). Choose one of four mutually exclusive category modes: #### Reuse matched torrent category Keeps the category of the matched torrent unchanged. qui adds no affix. #### Category Affix (default) Adds a configurable affix to the category of the matched torrent. This prevents Sonarr and Radarr from importing cross-seeded files as duplicates. If you use **regular mode** (no hardlink/reflink), the cross-seed inherits AutoTMM from the matched torrent. **Affix Mode:** - **Suffix** (default): Appends the affix to the category (for example `movies` → `movies.cross`) - **Prefix**: Prepends the affix to the category (for example `movies` → `cross/movies`) **Affix Value:** The text to add (default: `.cross`). Common examples: - `.cross` with suffix mode → `tv.cross`, `movies.cross` - `cross/` with prefix mode → `cross/tv`, `cross/movies` :::tip If you use prefix mode with a trailing `/`, qBittorrent creates nested categories1. This groups all cross-seeds under a parent category. A filter on `cross` returns all cross-seeds (`cross/movies`, `cross/tv`, and more). ::: :::warning Do not use a leading `/` in suffix mode (for example `/cross-seed`). This creates the cross-seed as a **child** of the original category1. A `movies` category in Radarr then also returns `movies/cross-seed` torrents. This causes conflicts. If you want nested categories, use prefix mode instead. ::: *1 Nested categories require you to enable subcategories (Instance Preferences → Files → Enable Subcategories).* #### Use indexer name as category Sets the category to the indexer name (for example `TorrentDB`). qui always disables AutoTMM and uses explicit save paths. #### Custom category Uses a fixed category name for all cross-seeds (for example `cross-seed`). qui always disables AutoTMM and uses explicit save paths. ### Source Tagging Each source tab has a **Cross-seed tags** field for the torrents that source adds. The default is `cross-seed` for every source. | Source | Where | |--------|-------| | RSS automation | **RSS** tab | | `/apply` webhook | **Webhook** tab, "Webhook / autobrr" card | | Completion-triggered search | **Completion** tab, "On completion" card | | Library Scan | **Library** tab | | Season packs | **Season packs** tab | **Inherit source torrent tags** in **Categories and tags** also copies the tags of the matched source torrent. It applies to every source. The **RSS**, **Webhook**, **Completion**, and **Library** tabs each have an **Auto-resume after injection** switch. When it is off, torrents from that source stay paused for review. ### Max Auto-Start Download This limit sits in **After injection**. After a recheck, qui reads how much data the new cross-seed still lacks. If the missing data is at or below **Max auto-start download** (default: 50 MiB), qui starts the torrent. Torrents that lack more data stay paused for manual review. Set 0 to start only fully complete torrents. If only ignorable files are missing (samples, `.nfo`, subtitles, and similar sidecar files), qui starts the torrent anyway. This exception has a fixed 200 MiB ceiling. This limit applies to new cross-seed additions from RSS, seeded search, completion search, and the webhooks. The season-pack flow and Dir Scan use their own resume rules and ignore this limit. ### External Program In **After injection**, qui can run an external program after it injects a cross-seed torrent. If you select a program, each cross-seed add sends one execution request (a request to run the program for one torrent). This includes season-pack adds, manual assemblies, and Dir Scan adds. A Dir Scan full scan sends one execution request for each torrent that it adds. A refused add or a failed add sends no execution request. ### Category Behavior Details #### autoTMM (Auto Torrent Management) The active category mode determines autoTMM behavior: | Category Mode | autoTMM Behavior | |---------------|------------------| | **Reuse matched category** | Inherited from matched torrent (regular mode only, hardlink/reflink disables autoTMM) | | **Category Affix** | Inherited from matched torrent when the affix category has the same save path (regular mode only, hardlink/reflink disables autoTMM) | | **Indexer name** | Always disabled (explicit save paths) | | **Custom** | Always disabled (explicit save paths) | If the cross-seed inherits autoTMM in reuse or affix mode: - If the matched torrent uses autoTMM, the cross-seed uses autoTMM - If the matched torrent has a manual path, the cross-seed uses the same manual path If autoTMM is disabled (indexer and custom modes), qui gives cross-seeds explicit save paths derived from the location of the matched torrent. :::note Hardlink/reflink mode always adds torrents with an explicit `savepath` that points at the link tree. This forces autoTMM off. Dir Scan injections are separate from cross-seed rules and also always add with explicit `savepath` (autoTMM off). ::: #### Save path determination Priority order: 1. Base category's explicit save path (if configured in qBittorrent) 2. Matched torrent's current save path (fallback) **Examples:** *Suffix mode (default):* - The `tv` category has save path `/data/tv` - The cross-seed gets the `tv.cross` category with save path `/data/tv` - qui finds the files because they are in the same location *Prefix mode:* - The `movies` category has save path `/data/movies` - The cross-seed gets the `cross/movies` category with save path `/data/movies` - The nested `cross/` parent in qBittorrent groups all cross-seeds together ### Best practices **Do:** - Use autoTMM consistently across your torrents - Let qui create cross-seed categories automatically - Keep category structures simple - If you want all cross-seeds grouped under one parent category, use prefix mode with `/` (for example `cross/`) **Do not:** - Manually move torrent files after you add them - Create cross-seed categories manually with different paths - Mix autoTMM and manual paths for the same content type --- ## Cross-seed season packs from episodes ## Season Packs qui assembles season-pack torrents from individual episodes that you already seed. When autobrr announces a season pack, qui checks your qBittorrent instances for completed, release-compatible episodes. If enough local data exists, qui builds a linked directory tree, adds the torrent, and lets qBittorrent download any missing files. The webhook flow below is one of two triggers. The second trigger is [Automatic Assembly](#automatic-assembly), which requires no autobrr filter. ### How it works 1. autobrr sees a season pack release. 2. autobrr sends the torrent name (and optionally the torrent file) to the qui `/api/cross-seed/season-pack/check` endpoint. 3. If you provide a torrent file, qui parses its file list to determine the playable episode files. If not, qui queries metadata providers for episode counts. 4. qui scans your qBittorrent instances for completed individual episodes that match the release details of the season pack. 5. qui computes coverage from completed, matching local episodes: - If the request includes torrent data, the playable episode files in the pack torrent define the expected pack layout. - If Sonarr can resolve the show, qui asks Sonarr for the season total first. - If Sonarr cannot resolve the show, qui falls back to metadata providers: TVDB when configured, then TVMaze. - If the request includes torrent data, qui never uses a total lower than the playable episode count inside the pack torrent. 6. qui responds with: - `200 OK`: coverage meets the threshold, ready to apply - `404 Not Found`: local coverage is too low, the release is not a season pack, or the feature is disabled 7. If qui returns `200 OK`, autobrr sends the torrent file to `/api/cross-seed/season-pack/apply`. 8. qui links the matched episodes, applies your configured season-pack tags, and adds the season pack torrent. qui never links a local episode file if its size or release details differ from the pack file. qui treats that episode as missing and downloads it instead. If these demotions drop coverage below the threshold, the apply fails as `drifted`. 9. If episodes or extras are missing, qui adds the torrent paused, attempts an automatic recheck, and queues automatic resume. After the recheck, qui resumes the torrent when qBittorrent confirms the linked bytes. qBittorrent then downloads the missing files. If the recheck reports far fewer bytes than the linked bytes, some links are invalid, and qui leaves the torrent paused for manual review. In hardlink mode, qui also leaves the torrent paused when a linked file fails its recheck on a piece it does not share with a pending file, because a download into that file would change the local episode. See [Hardlink mode](./hardlink-mode.md#linked-files-that-fail-a-recheck). qui reports best-effort fallbacks by name, including `automatic recheck failed`, `automatic resume is unavailable`, and `automatic resume queue is full`. ### Automatic Assembly qui also assembles season packs without autobrr webhooks. To turn this on, enable **Assemble season packs automatically** in **Cross-Seed > Season packs**. The switch is off by default and operates independently of the webhook feature. If the switch is on, qui diverts a season pack into the assembly pipeline when all of these conditions are true: - RSS automation, an autobrr cross-seed action, or a manual apply sends the season pack to cross-seed - You seed episodes of the same show and season - No direct cross-seed match applies The diverted pack then goes through the same steps as a webhook apply: qui computes coverage, links the matched episodes, and lets qBittorrent download the rest. Automatic assembly uses the same settings as the webhook flow: the coverage threshold, the matching settings, category routing, tags, and metadata providers. qui records each attempt in the [Activity](#activity) panel. :::note Automatic assembly also extends library search runs. If a show has three or more seeded episodes of one season and no seeded pack, the search run queries your indexers for the season pack and assembles a match through the same pipeline. If you want to search for season packs without single-episode searches, enable **Skip individual episodes** in the Library Scan form. ::: ### Coverage model qui uses a provider-first episode total with the pack torrent as the layout source. For `/check` without torrent data: - qui asks Sonarr for the season episode total first - If Sonarr fails or cannot resolve the show, qui asks TVDB when configured, or TVMaze - If no provider returns a total, qui skips threshold enforcement and only verifies that matching episodes exist For `/check` or `/apply` with torrent data: - The torrent file is the source of truth for the pack layout and playable episode files - qui still asks Sonarr, then TVDB or TVMaze, for a season total - If the provider total is lower than the playable episode count in the torrent, qui uses the playable file count instead The apply endpoint always requires the torrent file and enforces the threshold. If qui falls back to the pack torrent, it: - Counts only playable video files (mkv, mp4, avi, and more) - Ignores subtitles, NFOs, samples, and other extras - Deduplicates episodes that appear more than once - Rejects packs with zero usable episode files Coverage is then: `matchedLocalEpisodes / coverageTotalEpisodes` For an episode to count toward coverage, it must: - Be fully downloaded (`100%` progress) - Pass the same release-compatibility checks used by normal cross-seeding - Belong to the same episode in the season pack A plain `WEB` source matches both `WEB-DL` and `WEBRip`. If the check has the torrent data, a `WEB-DL` episode also matches a `WEBRip` pack, and the reverse, when the size of the episode torrent is within 5% of the episode file in the pack. Trackers often give the same web release a different label. At apply, qui compares the exact file sizes. Mixed variants do **not** count toward coverage. For example, `720p WEB` episodes do not satisfy a `1080p BluRay` season pack. The default threshold is **75%**. Change it in **Cross-Seed > Season packs** in the qui UI. ### Matching settings These settings affect only season-pack checks and applies. They do not change normal cross-seed matching in Matching rules. The defaults match common seasonpackarr expectations. | Setting | Default | Effect | Example | | --- | --- | --- | --- | | Ignore REPACK/PROPER differences | On | Treat REPACK and PROPER episodes as compatible with the season pack. | `Show.S01E01.REPACK` matches `Show.S01E01.PROPER` | | Simplify HDR matching | Off | Treat HDR10, HDR10+, and HDR+ as HDR for season-pack matching. | `HDR10+` matches `HDR10` | | Simplify WEB source matching | Off | Treat WEB-DL as WEB for season-pack matching. A WEB-DL episode then also matches a WEBRip pack at any size. | `WEB-DL` matches `WEBRip` | | Ignore year differences | Off | Allow matches when release dates differ or when one side omits the year. | `Show.2024.S01E01` matches `Show.2025.S01E01` | #### Alternate titles If Sonarr resolves the show, qui pulls its series-wide alternate titles and uses them during season-pack matching. This allows a pack and a local episode to match when they use different title forms, such as a romaji pack against English-titled episodes, or an abbreviated title against the full title. Season-scoped alternate titles apply only to their own season, so they cannot bridge one season's episodes onto another season's pack. If the pack title uses an alias that Sonarr maps to a different season than the pack labels (for example, a `Show 2nd Season` pack labeled `S01`), qui skips alias expansion for that pack. Its numbering follows the alias rather than the canonical series. If Sonarr does not recognize the show, qui compares only the literal parsed titles. #### Anime absolute numbering If both sides use the same absolute numbering, qui matches absolute-numbered anime episodes (for example `Show - 1140`, with no season number) against a season pack. qui keys the local episode to the pack season and uses the absolute episode number to identify it. If a pack file has no season in its name, qui reads its number as an absolute episode, with one exception. If the pack is season 2 or later and the lowest episode number of these files is 1, the files use season numbering. For example, in a `Show S02` pack, the files `Show - 01` to `Show - 12` are `S02E01` to `S02E12`. In the same pack, the files `Show - 13` to `Show - 24` are absolute episodes 13 to 24. Some pack names have no season number, but the title ends with a Roman numeral from II to X, such as `Show II [Batch]`. qui reads the numeral as the season of the pack, so `Show II [Batch]` is season 2 of `Show`. Season-pack matching does not translate between numbering schemes. A pack that uses `SxxExx` numbering does not match local episodes numbered with absolute numbers, and the reverse also holds. Translation needs per-episode data for every file in the pack. Single episodes are different: with Sonarr linked, qui maps one episode between schemes. See [Manual Search](./overview.md#manual-search) in the overview. A `/check` call without torrent data has no file list to determine the pack's numbering scheme. The check remains optimistic and reports ready against local episodes that use the other scheme. The `/apply` endpoint verifies the real file list of the pack and acts as the authority. A false ready result from the light check costs only one wasted `.torrent` download, and qui injects nothing. ### Apply model Passing the threshold does **not** require 100% local coverage. When `/apply` runs, qui: - Links every matched episode file that it verifies locally - Leaves unmatched episodes and extras for qBittorrent to download - Adds the torrent paused if any files are missing - Attempts an automatic recheck so qBittorrent discovers the linked bytes - Queues automatic resume after the recheck. After the recheck, qui resumes the torrent when qBittorrent confirms the linked bytes, which allows qBittorrent to download the remaining files or pieces. If the recheck reports far fewer bytes than the linked bytes, some links are invalid, and qui leaves the torrent paused for manual review. In hardlink mode, a linked file that fails its recheck on a piece it does not share with a pending file also leaves the torrent paused. See [Hardlink mode](./hardlink-mode.md#linked-files-that-fail-a-recheck). If automatic recheck or resume queueing cannot start, qui reports `automatic recheck failed`, `automatic resume is unavailable`, or `automatic resume queue is full`. If **Skip Recheck** is enabled and the pack is incomplete, qui skips the apply instead of adding a broken torrent. In hardlink mode, qui can also apply piece-boundary protection to incomplete packs. If pending files share torrent pieces with linked episode files and the **Piece boundary safety check** in **Cross-Seed > Matching rules > Safety & validation** is enabled, qui blocks the apply. This check is off by default. Reflink mode avoids that hardlink corruption risk because qBittorrent writes to cloned files instead of the original seeded files. ### Prerequisites - The target instance must have **Local filesystem access** enabled, or be a remote instance - You must enable **Hardlink or reflink mode** on the target instance. Season packs always use linked trees. A remote instance supports hardlink mode only; reflink mode needs local access. - You must configure a writable link-mode base directory for the instance. In the current UI/API, this is the same base directory field used by hardlink/reflink mode. During eligibility checks, qui skips instances that lack filesystem access or a link mode. See [Hardlink Mode](./hardlink-mode.md) for setup instructions. ### Setup #### 1. Enable season packs in qui - Go to **Cross-Seed > Season packs** - Enable the feature - Set the coverage threshold (default 75%) - Optionally, add a TVDB API key for better episode count accuracy. qui uses TVMaze as a free fallback without any configuration. - Optionally, configure **Category routing** for season pack injects. Add rules that map a resolution (and optionally a source) to a qBittorrent category. Then set an **Anything else** fallback category for packs that match no rule. If you run multiple Sonarr instances, point each rule to the category that Sonarr monitors on its qBittorrent download client (for example, route `1080p` to `tv-hd` and `2160p` to `tv-uhd`). Sonarr picks up the assembled pack and imports it. If Sonarr uses hardlinks and the library sits on the same filesystem, the same on-disk bytes back both the library and every seeded episode. If a category does not exist yet, qui creates it on demand. qui leaves existing categories untouched. If no rule matches and you set no fallback, season packs use the global Category Mode configured under **Cross-Seed > Categories and tags > Categories**. ##### Category routing Each routing rule matches on a resolution and an optional source: | Field | Values | Effect | | --- | --- | --- | | Resolution | `2160p`, `1080p`, `720p`, `576p`, `480p` | Required. The pack resolution that the rule targets. | | Source | Any, `WEB`, `BluRay`, `Remux`, `HDTV` | Optional. Restricts the rule to a single source. Leave as **Any** to match every source at that resolution. | | Category | A qBittorrent category | The destination category for matching packs. qui creates the category on demand if it does not exist. | If multiple rules match a pack, the most specific rule wins. An explicit-source rule takes precedence over an **Any**-source rule at the same resolution. If no rule matches, qui uses the **Anything else** fallback category. :::tip qui detects **Remux** from the release tags, not from the source field. A BluRay remux carries the remux tag, so qui routes it under the **Remux** option rather than the **BluRay** option. If you want to separate remuxes from regular BluRay packs, add a dedicated `Remux` rule. ::: #### 2. Create an API key If you do not already have an API key for autobrr: - Go to **Settings > API Keys** - Click **Create API Key** - Copy the generated key #### 3. Configure the autobrr external filter :::warning Create a **separate autobrr filter** for season packs. Do not reuse your existing cross-seed filter. The endpoints and payload differ. ::: Set the filter priorities in this order: 1. Your regular [qui cross-seed filter](https://autobrr.com/filters/cross-seed-qui#create-the-filter) 2. The season-pack filter from this guide 3. Your normal TV or Sonarr grab filters autobrr stops after the first successful matching filter. This order lets a direct whole-pack cross-seed win first. If qui rejects the season-pack check, autobrr can continue to a normal grab filter. In the **Movies and TV** tab, use the [season-pack matcher](https://autobrr.com/filters/examples#only-season-packs): | Field | Value | | -------- | ------ | | Seasons | `1-99` | | Episodes | `0` | This includes ordinary `S01` through `S99` packs and excludes specials (`S00`), seasonless packs, and individual episodes. :::tip **Docker Compose:** Use your qui container hostname instead of `localhost` (often the Compose service name), for example: `http://qui:7476/api/cross-seed/season-pack/check`. ::: In your new autobrr filter, go to **External** tab > **Add new**: | Field | Value | | ------------------------- | --------------------------------------------------------- | | Type | `Webhook` | | Name | `qui season pack` | | On Error | `Reject` | | Endpoint | `http://localhost:7476/api/cross-seed/season-pack/check` | | HTTP Method | `POST` | | HTTP Request Headers | `X-API-Key=YOUR_QUI_API_KEY` | | Expected HTTP Status Code | `200` | Leave every field under **Retry** blank. The grey `10` and `1` values are placeholders, not active defaults. A blank retry section makes one check request. The endpoint uses `404` as a normal "not eligible" result, so retrying it does not help. **Data (JSON):** ```json { "torrentName": {{ toRawJson .TorrentName }}, "instanceIds": [1], "indexer": {{ toRawJson .Indexer }} } ``` If you want to search all instances, omit `instanceIds`: ```json { "torrentName": {{ toRawJson .TorrentName }}, "indexer": {{ toRawJson .Indexer }} } ``` :::tip The check endpoint does not require the torrent file. Sending only the release name avoids downloading the `.torrent` for every season pack announce. qui uses Sonarr, TVDB, or TVMaze to determine the episode count for threshold enforcement. If you want to include the torrent file in the check request, add `"torrentData": "{{ .TorrentDataRawBytes | toString | b64enc }}"` to the payload. ::: **Field descriptions:** - `torrentName` (required): the release name as announced - `torrentData` (optional): Base64-encoded torrent file. If you provide this field, qui parses the file to determine the playable pack files. If you omit it, qui uses metadata providers for episode counts. - `instanceIds` (optional): qBittorrent instance IDs to scan. Omit this field to search all eligible instances. - `indexer` (optional): autobrr indexer identifier. qui uses this when you enable **Use indexer name as category**. #### 4. Configure the apply action If `/check` returns `200 OK`, send the torrent to `/api/cross-seed/season-pack/apply`: **Action setup in autobrr:** | Field | Value | | ----------- | -------------------------------------------------------------------------------- | | Action Type | `Webhook` | | Name | `qui season pack apply` | | Endpoint | `http://localhost:7476/api/cross-seed/season-pack/apply?apikey=YOUR_QUI_API_KEY` | **Payload (JSON):** ```json { "torrentName": {{ toRawJson .TorrentName }}, "torrentData": "{{ .TorrentDataRawBytes | toString | b64enc }}", "instanceIds": [1], "indexer": {{ toRawJson .Indexer }} } ``` **Field descriptions:** - `torrentName` (required): the release name - `torrentData` (required): Base64-encoded torrent file - `instanceIds` (optional): target instances (omit to apply to any matching instance) - `indexer` (optional): autobrr indexer identifier. qui uses this when you enable **Use indexer name as category**. ### API endpoints | Method | Path | Description | | ------ | ------------------------------------- | -------------------------- | | POST | `/api/cross-seed/season-pack/check` | Check if a pack can be assembled | | POST | `/api/cross-seed/season-pack/apply` | Assemble and add the pack | | GET | `/api/cross-seed/season-pack/runs` | List recent activity | The `/runs` endpoint accepts an optional `limit` query parameter (default 20, max 400). qui keeps the newest 200 applied runs. Runs with another status share a second limit of 200. qui deletes older runs when it records a new run. `/check` returns `404 Not Found` for expected skips, such as below-threshold coverage, disabled season packs, non-season-pack releases, or missing eligible instances. `/apply` returns `500 Internal Server Error` if qui cannot apply the pack. Reasons include skipped recheck-required packs, layout mismatches, torrent add failures, or operational errors while qui reads qBittorrent state. ### Added torrent behavior When qui applies a season pack, it: - Always adds the torrent with an explicit `savepath` that points to the linked tree - Applies the **Cross-seed tags** configured in **Cross-Seed > Season packs** - Adds incomplete packs in a paused state, attempts an automatic recheck, and queues automatic resume on a best-effort basis. After the recheck, qui resumes the torrent when qBittorrent confirms the linked bytes. If the recheck reports far fewer bytes, or a hardlinked file fails the recheck on a piece it does not share with a pending file, the torrent remains paused for manual review. - Resolves the category in this order: - The category from the matching **Category routing** rule under **Cross-Seed > Season packs**. If multiple rules apply, the most specific rule wins (an explicit-source rule beats an Any-source rule at the same resolution). This configuration integrates with Sonarr so that the pack lands in Sonarr's download-client category and uses hardlink-aware imports. - The **Anything else** fallback category, if set. - The global cross-seed category rules (custom category if enabled, otherwise category affix mode if enabled, otherwise indexer-name category if enabled, otherwise the category of the matched episode). - Creates the resolved category on the target instance if the category does not exist. ### Episode torrents after the pack qui does not remove or change the episode torrents when it adds a season pack. The pack has its own linked tree, so it does not use the paths of the episode torrents. If the tracker removes the episodes after the pack arrives, qBittorrent reports them as unregistered. To remove these episode torrents automatically, make an [automation](../automations.md) with these conditions and this action: - Condition: `Unregistered` is `true`. This condition needs qBittorrent 5.1 or newer. - Condition: `Season pack status` is `packed`. This matches only when a pack of the same release is in the client. See [Season pack status](../automations.md#season-pack-status). - Action: Remove with files (preserve cross-seeds). The action deletes only the files of the episode torrent. The pack keeps its data. qui makes the hardlinks or reflinks of the pack before it adds the pack, and a pack that you downloaded has its own copy. With hardlinks or reflinks, the rule frees little or no disk space. :::warning Keep the `Season pack status` condition in the rule. It limits the rule to episodes that a pack already covers. Without it, the rule removes every torrent that the tracker reports as unregistered. That happens to all torrents of a tracker during an outage or after a passkey change. ::: ### Instance selection If `instanceIds` is omitted or contains multiple instances: 1. qui filters the list to instances with a link mode qui can use: local filesystem access with hardlink or reflink mode, or a remote instance with hardlink mode 2. Inside each instance, qui counts only the episode torrents that pass the webhook source filters (categories and tags) 3. qui selects the instance with the highest coverage 4. qui breaks ties by highest matched episode count, then lowest instance ID ### Activity Each check request, apply request, and automatic assembly attempt records a season-pack run. qui keeps the newest 200 applied runs, and the newest 200 runs with another status. Recent runs appear in **Cross-Seed > Season packs**. The list shows only applied runs by default. To show other runs, turn on the **Ready**, **Skipped**, or **Failed** chip. Each chip shows the number of runs with that status. The panel displays the torrent name, phase (`check` or `apply`), status, reason, message, selected instance, matched episodes, total episodes, coverage, link mode, and timestamp. You can also query recent runs directly: ```bash curl -H "X-API-Key: YOUR_QUI_API_KEY" "http://localhost:7476/api/cross-seed/season-pack/runs?limit=20" ``` ### Debugging Start with autobrr: - A rejected check usually appears as `[external webhook status code] not matching: got 404 want: 200` - This status means qui processed the season-pack check, but the release was not ready to apply. - Verify that the release matched the season-pack filter and not the standard cross-seed filter. Then check qui: - Open **Cross-Seed > Season packs**, turn on all status chips, and find the row for the torrent name. - Check the phase (`check` or `apply`), status, reason, message, coverage, matched episodes, total episodes, selected instance, and link mode. - If the row is missing, autobrr failed to reach qui or used the wrong endpoint or API key. Confirm this with `/api/cross-seed/season-pack/runs?limit=20`. For deeper logs, set: ```toml loglevel = 'DEBUG' ``` Look for log messages that contain the torrent name and these phrases: - `season pack: failed to resolve Sonarr season total`: The Sonarr lookup failed, so qui fell back to metadata providers or skipped threshold enforcement. - `season pack: metadata provider lookup failed`: The TVDB or TVMaze lookup failed. - `load cached torrents for instance`: The qBittorrent cache lookup failed, causing the check or apply operation to fail. - `unsafe piece boundary with pending files`: Hardlink mode blocked an incomplete pack for safety. - `torrent added paused; recheck queued`: qui added the pack and queued automatic resume. - `Recheck completed below threshold, torrent left paused for manual review`: The recheck reported fewer bytes than qui linked, indicating bad links. - `Linked file does not match the torrent, left paused to protect the source`: A hardlinked episode failed its recheck. qui did not resume the torrent, because the download would change that local file. See [Hardlink mode](./hardlink-mode.md#linked-files-that-fail-a-recheck). qui logs field-level matching details at `DEBUG`, which is the default level. If you upgraded from an older version, open `config.toml`. If `logLevel` holds another value, set it to `DEBUG`. Then look for `[CROSSSEED-MATCH] Release filtered` entries. Each entry names the release field that did not match. --- ## Move from standalone cross-seed ## Move from Standalone Cross-Seed qui cross-seed does not need the standalone [cross-seed](https://www.cross-seed.org/) app. This page tells you what happens when both run on one qBittorrent instance, and how to move your setup to qui. ### Run Both at the Same Time You can run both tools on the same qBittorrent instance. They do not add the same torrent two times: - Each tool checks the infohash before it adds a torrent. If the torrent is already in qBittorrent, the tool does not add it, no matter which tool added it first. - qBittorrent also refuses a second torrent with the same infohash. - qui does not search a tracker for a torrent when the instance already seeds that content from that tracker. This includes torrents that the standalone app added. Each tool limits only its own requests. When both run, Prowlarr, Jackett, and your trackers get the searches from both tools. If a tracker limits your API use, run only one of the tools, or make the searches less frequent in one of them. Both tools add the tag `cross-seed` by default. qui does not start a completion search for a torrent that has this tag, so torrents that the standalone app added do not start new qui searches when they complete. The default categories are different. qui adds `.cross` to the category of the matched torrent. The standalone app keeps the category of the matched torrent, adds `.cross-seed` when `duplicateCategories` is on, or uses `cross-seed-link` for linked torrents. With linking on, `duplicateCategories` adds the marker as a tag instead. ### Move to qui qui cannot import the settings or the history of the standalone app. Do these steps: 1. Add your indexers in **Settings → Indexers**. Click **Discover** to import them from Prowlarr or Jackett. See [Add indexers](../search.md#add-indexers). 2. If you used `linkDirs`, turn on hardlink or reflink mode for each instance and set the base directories. See [Hardlink mode](./hardlink-mode.md) and [Link directories](./link-directories.md). 3. If autobrr sends announces to the standalone app (`/api/announce`), change the autobrr action to the qui endpoints. See [autobrr integration](./autobrr.md). 4. Set the rules and the discovery methods in qui. Use the table below. 5. Stop the standalone app. You do not have to remove anything. The torrents that the standalone app added continue to seed. qui does not manage or remove the link directories of the standalone app. ### Settings | Standalone setting | qui setting | |---|---| | `torznab` | **Settings → Indexers** | | `linkDirs`, `linkType` | Hardlink or reflink mode for each instance. qui has no symlink mode. | | `flatLinking` | **Directory organization**. No preset matches `flatLinking: true`, because the qui `flat` preset puts each torrent in its own folder. `by-tracker` is the closest match for the standalone default. | | `matchMode` | No setting. qui accepts matches with extra files and rechecks them. Dir Scan has **Allow partial matches**. | | `autoResumeMaxDownload` | **Max auto-start download** in [rules](./rules.md) | | `skipRecheck` | **Skip recheck** in [rules](./rules.md). The meaning is different, see below. | | `rssCadence` | RSS Automation **Run interval** | | `delay`, `excludeRecentSearch` | Library Scan interval and **Cooldown** | | `includeSingleEpisodes` | Turn Library Scan **Skip individual episodes** off to include episodes. For episodes from season packs, use **Cross-seed episodes from packs** in [rules](./rules.md). | | `seasonFromEpisodes` | [Season pack assembly](./season-packs.md). Set the coverage threshold to the standalone value multiplied by 100. The standalone default `1` is 100%, and the qui default is 75%. `null` means off. | | `dataDirs` | [Dir Scan](./dir-scan.md) | | `duplicateCategories` | **Category Affix** in [rules](./rules.md) | | `blockList` | No direct equivalent. The qui [Blocklist](./overview.md#blocklist) only stops an infohash from being added again. To keep a torrent out of searches, use the category and tag filters of each discovery method. | :::warning Skip recheck is not the same setting In the standalone app, `skipRecheck` adds the torrent without a recheck, except for partial matches and disc layouts. In qui, **Skip recheck** does not add a cross-seed that needs a recheck. ::: qui has no equivalent for these standalone settings: symlink links, `action: save`, `excludeOlder`, `searchCadence`, and blocklist entries by name, tracker, or size. A Library Scan runs only when you start it. For continuous discovery, use RSS Automation, Auto-Search on Completion, or [autobrr](./autobrr.md). The standalone app also supports torrent clients other than qBittorrent. qui supports only qBittorrent. --- ## Cross-seed troubleshooting ## Cross-Seed Troubleshooting ### Why was my cross-seed not added? #### Rate limiting (HTTP 429) Indexers limit request frequency. If you see an error such as `indexer TorrentLeech query rate-limited until ...`, qui uses the Retry-After value from the response, or 1 minute if the indexer sends none. It skips that indexer until the cooldown ends. qui tracks search (`query`) and download (`grab`) cooldowns separately. The **Scheduler Activity** panel on the Indexers page shows which indexers are in cooldown and when they become ready. #### Release didn't match qui uses strict matching to ensure that cross-seeds have identical files. Both releases must match on: - Title, year, and release group - Resolution (1080p, 2160p) - Source (WEB-DL, BluRay) and collection (AMZN, NF) - Codec (x264, x265) and HDR format. A bare `HDR` counts as `HDR10`. - Audio format and channels - Language, edition, cut, and version (v2, v3) - Variants like IMAX, HYBRID, REPACK, PROPER Search has one exception for a HYBRID tag on only one name. If HYBRID is the only difference and the reported sizes are within the size tolerance, search keeps the result. The file comparison after the download then decides. RSS uses this rule too, but only for feed items with the exact size of a local torrent. If the sizes are outside the tolerance, the rejection reason shows the size gap, for example `HYBRID (size differs by 7.20%)`. The Cross-Seed tab of a torrent and the autobrr webhook keep HYBRID strict. Their exception is an exact size when both names have a group tag. Then the exact-size rule below can match the pair. If strict release matching rejects an approved metadata difference, some discovery methods use an exact reported byte count. Interactive Torznab search, Library Scan, and completion search share this rule. RSS uses the title and byte count from the feed before its single download. The autobrr `/check` endpoint uses `.Size` without fetching the torrent file. The value is exact, rounded, or `0`. If autobrr sends `0`, qui uses a narrow name-only preflight. The `/apply` endpoint calculates the actual size and repeats the match against live sources. An exact reported size is evidence, not byte verification. qui still checks the downloaded torrent metadata, files, layout, and piece boundaries. #### Season pack vs episodes By default, season packs only match other season packs. If you enable **Cross-seed episodes from packs** under Cross-Seed > Matching rules, season packs match individual episode releases. #### Prowlarr filters remove expected results qui searches the selected Prowlarr indexer directly. If that indexer has a search filter enabled, such as freeleech only, the filter also applies to cross-seed searches. The tracker can return no results even when matching cross-seed candidates exist. Prowlarr does not support per-search filter overrides. Add a second entry for the tracker in Prowlarr with the filter disabled, then select that second entry in qui. ### Cross-seed search run statuses Library scan and completion search rows use **added**, **skipped**, or **failed** as the top-level outcome. Open the row details to see the per-attempt status and message. | Status or message | Outcome | What it usually means | What to check | | --- | --- | --- | --- | | `exists` | Skipped | The exact torrent infohash is already in the target qBittorrent instance. | This is normally harmless. If you expected a new tracker result, check the source and target indexers in [Cross-Seed Overview](./overview.md#discovery-methods). | | `no_match` | Skipped | qui searched but did not find an existing local torrent with the required files. | Review [release matching](#release-didnt-match), source filters, and the discovery method in [Library Scan](./overview.md#library-scan) or [Auto-Search on Completion](./overview.md#auto-search-on-completion). | | `blocked` | Skipped | The candidate infohash is on the cross-seed blocklist. | If you want qui to try it again, remove it from **Cross-Seed > Blocklist**. See [Blocklist](./overview.md#blocklist). | | `skipped_recheck` | Skipped | The match requires a recheck, but **Skip recheck** is enabled. | See [When Rechecks Are Required](#when-rechecks-are-required-reuse-mode) and [Matching rules](./rules.md#matching). | | `skipped_unsafe_pieces` | Skipped | The incoming torrent has missing or extra files whose pieces overlap existing content, or a link-mode fallback leaves unsafe unmaterialized pieces. qui skips the match before adding to protect existing data. | See [Cross-seed skipped: "extra files share pieces with content"](#cross-seed-skipped-extra-files-share-pieces-with-content) and [Reflink Mode](./hardlink-mode.md#reflink-mode-alternative). | | `below_threshold` | Skipped | The matched local files cover less than 95% of the release in hardlink or reflink mode. qui skips the match before it adds the torrent. | See [release matching](#release-didnt-match) and [Hardlink Mode](./hardlink-mode.md). This limit is fixed and is not a setting. | | `requires_hardlink_reflink` | Skipped | The torrent layout scatters rootless or extra files in regular reuse mode. | Enable [Hardlink Mode](./hardlink-mode.md) or [Reflink Mode](./hardlink-mode.md#reflink-mode-alternative), or download the torrent normally. | | `size_mismatch` | Failed | A search result already exists by infohash, but the earlier content prefilter rejected it because the torrent file list did not match the source sizes. | Compare the torrent files on the trackers. This protects you from treating different content as a valid cross-seed. See [release matching](#release-didnt-match). | | `content_mismatch` | Failed | A search result already exists by infohash, but the earlier content prefilter rejected it for a non-size file-level reason. | Review the row message. See [How do I see why a release was filtered?](#how-do-i-see-why-a-release-was-filtered). | | `hardlink_error` | Failed | You enabled hardlink mode, but qui failed to create or use the hardlink tree. | See [Hardlink mode failed](#hardlink-mode-failed) and [Hardlink Mode requirements](./hardlink-mode.md#requirements). | | `reflink_error` | Failed | You enabled reflink mode, but qui failed to create or use the reflink tree. | See [Reflink mode failed](#reflink-mode-failed) and [Reflink Requirements](./hardlink-mode.md#reflink-requirements). | | `no_save_path` | Failed | qui did not find a valid target save path for the cross-seed. The matched torrent has no usable SavePath and the category does not provide an explicit SavePath. | Check the matched torrent's save path and category save path in qBittorrent, then review [category behavior](./rules.md#category-behavior-details). | | `error`, `alignment_failed`, or `pause_failed` | Failed | qBittorrent rejected the add (`error`), a required file or folder rename failed or qui could not confirm it in qBittorrent (`alignment_failed`), or qui failed to pause a misaligned torrent after an alignment failure (`pause_failed`). | Check the instance connection, qBittorrent logs, and save path/category behavior in [Categories and tags](./rules.md#category-behavior-details). | Failed search or completion runs can trigger notification events. See [Notifications](../notifications.md#event-types) for the event keys. :::tip `size_mismatch` comes from the file sizes in torrent metadata. qui found a size difference between the source and candidate file lists. A different encode or layout can produce this status. The check does not compare piece hashes. Compare both torrents' metadata and file lists before reporting bad data to a tracker. The `debug` log entry `[CROSSSEED-ASYNC] Starting async torrent analysis` includes the source torrent hash. ::: :::tip Use [piece boundary protection](./rules.md#matching) to protect content against bad hash torrents. ::: ### Why did my season-pack check return 404? The season-pack check webhook returns `404 Not Found` whenever the pack is not ready to apply. In autobrr, this status appears as `[external webhook status code] not matching: got 404 want: 200`. Common reasons: - **Coverage is below your threshold**: qui did not find enough matching episodes - **Episodes are still downloading**: only fully completed episode torrents count toward coverage - **Release details do not match**: the episodes must match the pack's title, season, and normal release details such as source, resolution, and release group - **No eligible instance was scanned**: the instance requires local filesystem access plus hardlink or reflink mode - **Webhook source filters excluded your episodes**: include/exclude category or tag filters removed them from the scan - **The release is not a season pack** or **season-pack matching is disabled** If the pack matches except for REPACK, HDR, WEB, or year differences, check **Cross-Seed > Season packs > Matching settings**. Open **Cross-Seed > Season packs** to review recent season-pack activity. The page displays the check/apply phase, status, reason, message, coverage, matched episodes, total episodes, selected instance, and link mode. The list shows only applied runs by default. To show other runs, turn on the **Ready**, **Skipped**, or **Failed** chip. You can also query `/api/cross-seed/season-pack/runs?limit=20` directly. See [Season Packs](./season-packs.md) for the full flow, setup requirements, and season-pack-specific debugging steps. ### How do I see why a release was filtered? For a manual search, open the **Search breakdown** section in the search dialog. If qui searched Torznab indexers, this breakdown appears under the results. A Gazelle-only search does not show it. It shows: - One row for each indexer with its outcome: searched, incomplete, error, or excluded - The count for each rejection reason - The first rejected candidates for each reason, with the indexer, title, and size Use **Copy report** to copy a plain-text summary for a bug report. The report contains the source torrent name and the rejected candidate titles. The sections below cover the same decisions in the logs. If you run automatic tasks or need fully parsed release fields, use the logs. qui logs rejection reasons at `DEBUG`, which is the default level: ```toml logLevel = 'DEBUG' ``` If you upgraded from an older version, open `config.toml`. If `logLevel` holds another value, set it to `DEBUG`. For **season-pack** checks, look for `[CROSSSEED-MATCH] Release filtered` entries. Each entry carries the `pack`, `season`, and `candidate` that qui compared. Each entry also has a `reason` field for the mismatch (for example `title mismatch`, `group mismatch`, `resolution mismatch`, `hdr mismatch`, `source mismatch`, `episode not in pack`, or `episode numbering mismatch`). Two of these reasons show that the candidate belongs to different content. `title mismatch` indicates a different show. `episode not in pack` indicates an episode that this pack does not contain. Because these two reasons apply to most of a library, qui logs them at `TRACE`. All other reasons appear at `DEBUG`. For regular cross-seed search, look for `[CROSSSEED-SEARCH] Candidate rejected` entries. Each entry names the indexer, the rejected candidate, the two sizes, and the reason. The entry `[CROSSSEED-SEARCH] Release filtering rejection summary` reports the count for each reason. `TRACE` adds `[CROSSSEED-SEARCH] Candidate rejected by search classifier`, which shows the parsed fields of both releases. For the **autobrr webhook check**, look for `Webhook check: rejected near miss` entries. qui writes one entry for each rejected torrent that has the same release group as the announce. For a fansub release, such as `[SubsPlease] Show - 01`, the tag in brackets counts as the group. Each entry names the announced release (`incomingName`), the torrent in qBittorrent (`existingName`), and the reason (`rejectReason`). qui does not log the rejected torrents of other groups, because most torrents in a library have no relation to the announce. For content-prefilter decisions, `DEBUG` is enough. Look for messages such as: - `crossseed: rejected existing content prefilter candidate after file-level matching` - `[CROSSSEED-SEARCH] Late content filter exclusion` - `[CROSSSEED-APPLY] Failed cached search selection already present after content prefilter rejection` - `[CROSSSEED-SEARCH-AUTO] Existing search result failed due to prior content prefilter rejection` For season-pack checks, `DEBUG` is often enough. Look for the torrent name and messages such as: - `season pack: failed to resolve Sonarr season total` - `season pack: metadata provider lookup failed` - `load cached torrents for instance` - `unsafe piece boundary with pending files` - `torrent added paused; recheck queued` - `Recheck completed below threshold, torrent left paused for manual review` - `Linked file does not match the torrent, left paused to protect the source` ### When Rechecks Are Required (Reuse Mode) In reuse mode (the default), qui adds most cross-seeds with hash verification skipped (`skip_checking=true`) and resumes them immediately. Some scenarios require a recheck: #### 1. Name or folder alignment needed If the cross-seed torrent has a different display name or root folder, qui renames them to match. qBittorrent must run a recheck to verify the files at the new paths. If **Skip recheck** is on, qui adds a [byte-complete match](./rules.md#skip-cross-seeds-with-extra-files) without a recheck. #### 2. Extra files in source torrent If the source torrent contains files that do not exist on disk (NFO, SRT, or samples that match no allowed extra-file pattern), a recheck determines the actual progress. #### 3. Hardlink/reflink filesystem fallback If the source files and the link-tree base reside on different filesystems, or if the filesystem does not support the requested link type, link-tree creation fails. If you enable **Fallback to regular mode on error**, qui falls back to regular mode and adds the torrent against the matched source files instead of the link-tree directory. qui treats these fallback torrents like disc-based content: it adds them paused, rechecks them, and auto-resumes only after qBittorrent reports 100% complete. If you enable **Skip recheck**, qui adds only [byte-complete matches](./rules.md#skip-cross-seeds-with-extra-files) after a fallback, and it adds them without a recheck. qui skips every other match that falls back. Keep **Fallback to regular mode** on to keep those byte-complete adds. If matches are partial-in-pack, size-based, renamed, or otherwise non-perfect, qui also runs piece-boundary protection before the fallback add. qui always enforces this check for link-mode fallback, even if the **Piece boundary safety check** switch in Matching rules is off. If the check fails, qui skips the torrent before adding it to qBittorrent. #### 4. Exact-size identity fallback Sometimes two names describe the same bytes differently. One name uses a different codec, source, season, or episode number. A fansub name also splits its release-group identity across two parsed fields. Exact positive reported sizes let qui consider these approved differences. Title, season, episode, and split release-group differences require verification. qui adds these torrents paused and resumes them only after a 100% recheck. Soft differences, such as codec, source, HDR, edition, or a year that only one name has, keep the normal fast path after all safety checks. If you enable **Skip recheck**, qui skips only decisions that require verification. RSS and autobrr reject these decisions before their planned download. #### Auto-resume behavior - If missing data is at or below **Max auto-start download** (default: 50 MiB), qui auto-resumes after the recheck - If only ignorable files are missing (samples, `.nfo`, subtitles), qui auto-resumes up to 200 MiB - Torrents that miss more data stay paused for manual investigation - Filesystem fallback, disc-layout, title-rescue, and exact-size identity matches require 100% completion before auto-resume. With **Skip recheck** and **Auto-resume after injection** on, a byte-complete filesystem fallback resumes without a recheck - Configure this limit with **Max auto-start download** in Cross-Seed > After injection - In hardlink mode, a linked file that fails its recheck on a piece it does not share with a pending file blocks the auto-resume regardless of the limit. See [Linked files that fail a recheck](./hardlink-mode.md#linked-files-that-fail-a-recheck). ### Hardlink mode failed Common causes: - **Filesystem mismatch**: the hardlink base directory resides on a different filesystem or volume than the download paths. Hardlinks cannot cross filesystems. - **Missing local filesystem access**: the target instance does not have "Local filesystem access" enabled in Instance Settings. - **Permissions**: qui cannot read the instance content paths or write to the hardlink base directory. - **Invalid base directory**: the hardlink base directory path does not exist and qui failed to create it. ### Directory permissions and umask qui creates directories in your hardlink/reflink base (and cross-seed and dir-scan link trees) with mode `0777` and lets the process **umask** decide the final permissions. This follows the standard Unix pattern. It never makes anything world-writable by default. It only lets your umask control the group and other bits: - umask `022` produces `0755` directories (`rwxr-xr-x`), the traditional default. - umask `002` produces `0775` directories (`rwxrwxr-x`), which preserves group-write. If qBittorrent and qui run as **different users that share a group** (a common hardlink/reflink setup), or if a tool like `fclones` deduplicates across the tree, those processes need group-write permissions on directories that qui creates. Set the umask to match, such as `UMASK=002`. qui honors the `UMASK` environment variable (octal, for example `002`) and applies it at startup. It works on the official Docker image and on hotio or LinuxServer base images: ```bash docker run -e UMASK=002 ... ghcr.io/autobrr/qui ``` :::note If `UMASK` is unset, qui leaves the inherited umask unchanged. The official Docker image runs as root with default umask `022`. Without `UMASK`, it produces `0755` directories, the same as previous releases. `UMASK` is a no-op on Windows, where directory permissions follow inherited ACLs. ::: The umask applies only to directories that qui creates moving forward. Existing directories keep their current permissions. If old permissions block access after you set `UMASK`, apply a one-time `chmod` to the existing tree, such as `chmod -R g+w /path/to/base`. ### Hardlink/reflink cross-seed shows "missing files" If hardlink or reflink mode creates every file that the incoming torrent needs, qui usually adds the torrent with hash checking skipped and starts it immediately. Title rescue and exact-size season, episode, or release-group matches are exceptions. qui adds those torrents paused and requires a full recheck, because their names do not prove identical releases. If qBittorrent still marks the torrent as `missing files`, the new torrent file most likely does not fully match the existing source and candidate files, even though qui matched them by name and size. Review the matching torrent group on the trackers before you resume or recheck the torrent, because one copy has corrupted hashes. - **Hardlink mode**: If you resume the torrent, qBittorrent overwrites the data and corrupts other torrents that share those piece hashes. - **Reflink mode**: If you resume the torrent, copy-on-write protects other torrents from data corruption. :::tip Report torrents with bad hashes at their relevant sites. ::: :::warning If you ignore the bad hashes in hardlink mode and resume, the torrents in the matching group repeat full rechecks and download bad pieces. This happens every time a peer requests the mismatched hashes and forces qBittorrent to validate. ::: ### "Files not found" after cross-seed (default mode) In default mode, this error usually means the save path does not match the file location on disk: - Ensure the cross-seed save path matches where the files exist - Check the matched torrent save path in qBittorrent - Ensure the matched torrent reached 100% download progress ### Reflink mode failed Common causes: - **Filesystem does not support reflinks**: the filesystem at the base directory does not support copy-on-write clones. On Linux, use BTRFS or XFS (with reflink enabled). On macOS, use APFS. - **Pooled/virtual mount**: the base directory resides on a pooled or virtual filesystem (such as `mergerfs`, other FUSE mounts, or `overlayfs`) that does not implement reflink cloning. Use a direct disk mount for both your seeded data and the reflink base directory. - **Filesystem mismatch**: the base directory resides on a different filesystem than the download paths. - **Missing local filesystem access**: the target instance does not have "Local filesystem access" enabled. - **Skip recheck enabled**: if reflink mode requires a recheck (extra files), qui skips the cross-seed. ### Cross-seed skipped: "extra files share pieces with content" In regular reuse mode, this occurs if the **Piece boundary safety check** switch in Cross-Seed > Matching rules > Safety & validation is on (it is off by default). Link-mode fallback is stricter: for partial or otherwise non-perfect matches, qui always runs the check before adding the torrent to qBittorrent. The incoming torrent contains files absent from your matched torrent, and those files share torrent pieces with your existing content. Downloading them can overwrite parts of your existing files. **Solutions:** - **Use reflink mode** (recommended): enable reflink mode for the instance. It clones the files, so qBittorrent modifies the clone without affecting the originals. - **Disable the safety check**: turn off the **Piece boundary safety check** switch in Cross-Seed > Matching rules > Safety & validation (the default). If the content differs, the match proceeds, but it **can corrupt your existing seeded files**. - If reflinks are unavailable and you want to avoid risk, download the torrent normally. ### Cross-seed stuck at low percentage after recheck - Check if the source torrent contains extra files (NFO, samples) that do not exist on disk - Check the "Max auto-start download" setting in Cross-Seed > After injection - Torrents that miss more data than the limit stay paused for manual review ### Linked file does not match the torrent The season pack history or the log shows `Linked file does not match the torrent, left paused to protect the source`. A hardlinked file failed its recheck, and the missing pieces are not on a boundary with a pending file. The local file differs from the file in the torrent, even though the name and size matched. Do not resume the torrent. A resume downloads into the linked file, and the torrent that seeds the source file then carries wrong data. Remove the torrent and its link tree, then download the torrent normally. See [Linked files that fail a recheck](./hardlink-mode.md#linked-files-that-fail-a-recheck). ### Blu-ray or DVD cross-seed left paused qui always adds torrents that contain disc-based media (Blu-ray `BDMV` or DVD `VIDEO_TS` folder structures) in a paused state. **Why?** Disc layout torrents are sensitive to file alignment. Even minor path differences can cause qBittorrent to redownload large video segments and can corrupt your seeded content. Pausing these torrents lets you verify that the recheck reached 100% before you resume. **What to do:** 1. If you enable **Skip recheck** in Cross-Seed > Matching rules, qui skips disc-layout matches. 2. Otherwise, qui triggers a recheck automatically and auto-resumes only after the recheck reaches **100%**. 3. If auto-resume is disabled, resume the torrent manually after the recheck reaches 100%. The result message states when this policy applies, for example: `"disc layout detected (BDMV), full recheck required"` ### Webhook returns HTTP 400 "invalid character" error This error indicates that the torrent name contains special characters (such as double quotes `"`) that break JSON encoding. The error looks like: ```json {"level":"error","error":"invalid character 'V' after object key:value pair","time":"...","message":"Failed to decode webhook check request"} ``` **Solution:** In your autobrr webhook configuration, use `toRawJson` instead of quoting the template variable directly: ```json { "torrentName": {{ toRawJson .TorrentName }}, "instanceIds": [1] } ``` **Not:** ```json { "torrentName": "{{ .TorrentName }}", "instanceIds": [1] } ``` The `toRawJson` function (from Sprig) escapes special characters and outputs a valid JSON string, including quotes. ### Cross-seed in wrong category - Check your cross-seed configuration in qui - Ensure the matched torrent has the expected category - For Dir Scan injections, Cross-Seed > Categories and tags category modes do not apply. Dir Scan uses its own Default Category / Category override. If you leave it blank, the torrent receives no category. ### autoTMM unexpectedly enabled/disabled - In reuse/affix mode (regular mode), autoTMM mirrors the setting of the matched torrent. This behavior is intentional. - In affix mode, qui inherits autoTMM only when the cross-seed category and the matched torrent share a save path. Otherwise qui turns autoTMM off and sets an explicit `savepath`. - In indexer name or custom category mode, qui always disables autoTMM. - In hardlink/reflink mode, qui always disables autoTMM (explicit `savepath`). - Dir Scan injections always disable autoTMM (explicit `savepath`). - Check the autoTMM status of the original torrent in qBittorrent. --- ## Custom CSS themes for the qBittorrent web UI ## Custom themes :::info Premium feature Custom themes require an active premium license. This license also unlocks the built-in premium themes. See [License Management](../licenses.md) to get a license. ::: If you place your `.css` files into the custom themes directory, they appear in the theme picker next to the built-in themes. You do not need to rebuild qui. ### The theme picker The theme picker is under **Settings → Premium Themes**. It shows every theme in one grid: free themes, premium themes, and your custom themes. Each card displays a badge. Click a theme card to apply it. If you do not have an active license, premium themes appear as locked cards that show only preview colors. You cannot apply a locked theme. To get a license, click **Unlock premium** in the **Custom Themes** box below the grid. ### Theme selection syncs across devices qui stores your theme selection in its database, so it [syncs across devices](./dashboard.md#interface-preferences-sync) like other interface preferences. The login page also paints a selected built-in theme. A custom theme paints on the login page only in a browser that applied it before. The browser cannot load custom theme files until you log in. If your premium license lapses, qui applies the default theme instead. If you use a built-in premium theme, qui preserves your stored selection and restores the theme when you renew the license. #### A separate theme for the mobile layout qui shows the mobile layout when the window is less than 768 px wide. qui uses the window width, not the device type. A narrow desktop window also shows the mobile layout. To use a different theme on the mobile layout, turn on **Separate theme for mobile layout** below the theme grid. The mobile layout then starts with your current theme. After that, a theme change on the mobile layout changes only the mobile theme. A theme change on the desktop layout changes only the desktop theme. The theme, the light, dark, or auto mode, and the variation split together. A line under the theme grid tells you which theme the picker changes. qui stores this setting in its database, so it applies to every browser. To change the mobile theme, use a phone or a narrow window. When you turn the setting off, qui deletes the mobile theme, and every layout shows the desktop theme. #### Keep the theme of one browser local To keep a theme on one browser only, for example on a shared computer, turn on **Keep this browser's theme local**. This browser then does not take the theme from the server and does not send its theme changes to the server. It keeps one theme for both layouts. The setting applies only to this browser. If this setting is on, you cannot change **Separate theme for mobile layout** in this browser. When you turn the setting off, the browser shows the theme from the server again. Your other devices do not change. ### Where to put theme files qui reads custom themes from a directory on disk. By default, this directory is a `themes` folder next to your configuration file: - **Docker:** `/config/themes` - **Linux:** `~/.config/qui/themes` - **Windows:** `%APPDATA%\qui\themes` qui creates the directory on startup. If you want to use a different location, set `customThemesDir` in `config.toml` or set the `QUI__CUSTOM_THEMES_DIR` environment variable (see the [configuration reference](../configuration/reference.md)). Place each theme as a single, self-contained `.css` file directly in that directory. qui ignores subdirectories and symlinks, skips files larger than 1 MiB, and reads at most 100 theme files. You can find ready-made themes in [qui-community-themes](https://github.com/autobrr/qui-community-themes). The repository also accepts submissions. ### Authoring a theme A theme file contains an optional metadata comment header, a `:root` (light mode) block, and a `.dark` (dark mode) block of CSS variables: ```css /* @name: Ocean * @description: A calm blue theme * @lightOnly: false */ :root { --background: oklch(0.98 0.01 250); --foreground: oklch(0.2 0.02 250); --primary: oklch(0.55 0.15 250); --secondary: oklch(0.9 0.03 250); --accent: oklch(0.7 0.12 200); /* ...the remaining design tokens... */ } .dark { --background: oklch(0.18 0.02 250); --foreground: oklch(0.95 0.01 250); --primary: oklch(0.65 0.15 250); --secondary: oklch(0.3 0.03 250); --accent: oklch(0.6 0.12 200); /* ... */ } ``` #### Start from a built-in theme If you want to build a complete theme, copy one of the free built-in themes in qui and adjust the values. The source files provide the authoritative starting point: [github.com/autobrr/qui/tree/main/internal/themes/assets](https://github.com/autobrr/qui/tree/main/internal/themes/assets) (`minimal.css` is the neutral default and a good base). Copy the `:root` and `.dark` blocks into your own file. You do **not** need the `@theme inline { ... }` block from those files. qui maps the tokens to the UI internally. #### Available design tokens Define any of these tokens in the `:root` (light) and `.dark` blocks. If you omit tokens, qui falls back to the default theme values, so partial themes work. Built-in themes use the [OKLCH](https://oklch.com/) color space, but any valid CSS color works. | Group | Tokens | | --- | --- | | Surfaces | `--background`, `--foreground`, `--card(-foreground)`, `--popover(-foreground)` | | Semantic colors | `--primary(-foreground)`, `--secondary(-foreground)`, `--muted(-foreground)`, `--accent(-foreground)`, `--destructive(-foreground)` | | Controls | `--border`, `--input`, `--ring` | | Sidebar | `--sidebar`, `--sidebar-foreground`, `--sidebar-primary(-foreground)`, `--sidebar-accent(-foreground)`, `--sidebar-border`, `--sidebar-ring` | | Charts | `--chart-1` … `--chart-5` | | Ratio colors (qui-specific) | `--ratio-bad`, `--ratio-almost`, `--ratio-good`, `--ratio-best` | | Typography | `--font-sans`, `--font-serif`, `--font-mono` | | Shape & spacing | `--radius`, `--spacing`, `--tracking-normal` | | Shadows | `--shadow-2xs` … `--shadow-2xl` | #### Requirements and notes - **Both blocks are required.** A file must contain a `:root` block **and** a `.dark` block, each with at least one variable, even for a `@lightOnly` theme. If qui cannot parse a file, it skips the file and lists the error in the **Custom Themes** box in the theme picker. - **`@name`** sets the display name. If you omit `@name`, qui defaults to "Untitled Theme". `@description` and `@lightOnly` are optional. - **Fonts.** If you set `--font-sans`, `--font-serif`, or `--font-mono` to a font that qui knows (for example Inter, Montserrat, or JetBrains Mono), qui loads it from Google Fonts. The browser must be able to reach fonts.googleapis.com. If you use any other font, include an `@import` or `@font-face` rule directly in your CSS. - **Arbitrary CSS works.** qui injects the file as a stylesheet, so you can add custom selectors and rules beyond design tokens. Scope your selectors carefully because a broad selector affects the entire app. qui does not sanitize CSS. Only load theme files that you trust or wrote yourself. - **Variations.** qui does not support variations (the multi-swatch built-in themes) in custom themes. ### Using a custom theme 1. Place your `.css` file into the themes directory. 2. Open **Settings → Premium Themes**. Your theme appears in the theme grid with a **Custom** badge. The **Custom Themes** box below the grid shows the directory path and the number of discovered themes. Click **Refresh** in that box to load new or edited files without a restart of qui. 3. Select the theme like any other theme. If you remove a custom theme file or your premium license lapses, qui falls back to the default theme. A built-in premium selection returns when you renew. A custom theme selection does not. --- ## qBittorrent statistics dashboard in qui ## Dashboard The Dashboard is the start page of qui. It shows statistics for every qBittorrent instance and combined totals across all instances. ### Sections The Dashboard has four sections. You can hide and reorder each one. Server Statistics and Tracker Breakdown also collapse. #### Server Statistics The section header shows the combined all-time download, upload, ratio, and peer count across all instances. Expand the section to see one row for each instance that reports all-time data: | Column | Content | |--------|---------| | Downloaded / Uploaded | All-time totals that qBittorrent reports | | Downloaded (Session) / Uploaded (Session) | Totals since qBittorrent last started | | Ratio | All-time upload divided by all-time download | | Peers | Current peer connections | If no instance reports all-time data yet, qui hides this section. #### Tracker Breakdown One row per tracker, aggregated across all instances: | Column | Content | |--------|---------| | Tracker | Display name or announce domain, with the tracker icon | | Uploaded / Downloaded | All-time totals for the torrents on this tracker | | Uploaded (Session) / Downloaded (Session) | Totals for this qBittorrent session | | Ratio | Upload divided by download | | Buffer | Upload minus download | | Torrents | Number of torrents | | Size | Total content size | | Seeded | Upload divided by content size | Click a column header to sort. The row actions rename trackers or merge several announce domains into one entry. See [Tracker Customizations](./tracker-customizations.md). #### Global Stats Cards Cards with combined numbers: connected instances, total torrents, total download speed, and total upload speed. #### Instance Cards One card per instance with: - Torrent counts: **Downloading**, **Active**, **Total** - Current download and upload speed, total size, and free disk space - qBittorrent, Web API, and libtorrent versions, and the qBittorrent connection status (connectable, firewalled, or disconnected). The tooltip shows the listen port. - **Show more** reveals uptime, peer connections, queued I/O jobs, buffer sizes, and external IP addresses - A turtle or rabbit button that toggles alternative speed limits after a confirmation dialog - Warning rows for unregistered torrents, torrents whose tracker is down, torrents with a tracker error, and errors. A row shows only when its count is above zero. Click a row to open the torrent list with that filter active. The eye icon next to the instance URL toggles [Incognito Mode](./incognito.md) for the whole app. On the Dashboard it blurs host names and external IP addresses and replaces tracker names with fake domains. ### Configure the layout Click **Layout Settings** to open the **Dashboard Settings** dialog. | Setting | Description | Default | |---------|-------------|---------| | Sections | Show, hide, and reorder the four sections | All visible | | Default Sort | Sort column for Tracker Breakdown | Uploaded | | Direction | Sort direction for Tracker Breakdown | Descending | | Items Per Page | Tracker Breakdown rows per page (10, 15, 25, or 50) | 15 | qui stores these choices and the collapsed state of Server Statistics and Tracker Breakdown in its database. Every browser and device shows the same layout. ### Live updates qui streams statistics changes to the browser over Server-Sent Events (SSE). The Dashboard applies stream updates every 2 seconds. If the stream connection is down, the Dashboard polls a lightweight endpoint every 5 seconds instead. If the stream sends no data for 2 minutes, the Dashboard polls every 30 seconds until data comes again. If qBittorrent returns an error, the Dashboard does not poll. The open stream sends the new numbers when qBittorrent answers again. A status icon next to the instance name indicates that the numbers are not live: | Icon | Meaning | |------|---------| | Red alert circle | The stream failed. If the connection to qui dropped, qui refreshes over polling. If qBittorrent returned an error, qui waits for the stream. | | Database | qui shows a cached snapshot. If the snapshot is stale, the icon turns amber. | | Circular arrows | qui refreshes the statistics over polling. | A card without a status icon shows live data. If a qBittorrent instance responds slowly, qui serves the last cached data instead of an error until fresh data arrives. ### Interface preferences sync qui stores interface preferences in its database, so they apply on every browser and device. This covers: - Theme selection - Torrent table columns: visibility, order, sorting, and widths - Active filters, sidebar state, and collapsed categories - View mode, speed units, language, incognito mode, and date and time format Each browser keeps a local copy for fast startup. After a short delay, the browser pushes changes to the server automatically. Other open tabs receive these updates through the live stream. You do not need to configure anything. :::note qui is single-user software. Interface preferences and the Dashboard layout belong to the installation, not to a browser or an account. Everyone who logs in to the same qui sees the same layout. ::: --- ## Launch external programs from qui ## External Programs Launch scripts or desktop applications from the torrent context menu. Each program definition stores the executable path, optional arguments, and path-mapping rules. qui uses them to pass torrent metadata to your tools. ### Security: allow list Define an allow list in [`config.toml`](../configuration/reference.md) so qui executes only trusted paths: ```toml externalProgramAllowList = [ "/usr/local/bin/sonarr", "/home/user/bin" # Directories allow any executable inside them ] ``` If you leave the list empty, qui accepts any path. The allow list lives only in `config.toml`. The web UI cannot edit this file, so you retain full control over the binaries that qui runs. ### Where programs run External programs run on the machine or container that hosts the qui backend, not on the browser client. Make sure that the host process has access to all required executable paths, mounts, and environment variables. If you deploy qui inside Docker, qui executes programs inside the container. If an executable resides on the host, mount that executable into the container. ### Creating and editing a program 1. Open qui and go to **Settings → External Programs** 2. Click **Create External Program** 3. Fill in the form fields, then click **Create**. Toggle **Enable this program** to display the program in torrent context menus 4. Use the edit and delete actions in the list to manage existing programs #### Field reference | Field | Description | |-------|-------------| | **Name** | Display label in the torrent context menu and settings list. Must be unique. | | **Program Path** | Absolute path to the executable or script. Use the host path that the qui backend sees (for example `/usr/local/bin/my-script.sh`, `C:\Scripts\postprocess.bat`, `C:\python312\python.exe`). | | **Arguments Template** | Optional string of command-line arguments. qui substitutes torrent metadata placeholders before it spawns the process. | | **Path Mappings** | Optional array of `from → to` prefixes that rewrite remote qBittorrent paths into local mount points. If qui runs locally and qBittorrent stores data elsewhere, configure path mappings here. | | **Launch in terminal window** | Opens the program in an interactive terminal window. See [Supported terminal emulators](#supported-terminal-emulators) for the list of detected terminals. If you run GUI apps or background daemons, disable this option. | | **Enable this program** | Controls whether the program appears in the torrent context menu. | ### Torrent placeholders qui parses arguments with shell-style quoting and replaces each placeholder with the torrent value before execution. | Placeholder | Value | |-------------|-------| | `{hash}` | Torrent hash (always lowercase) | | `{name}` | Torrent name | | `{save_path}` | Torrent save path after qui applies path mappings | | `{content_path}` | Full content path (file or folder) after qui applies path mappings | | `{category}` | Torrent category | | `{tags}` | Comma-separated list of tags | | `{state}` | qBittorrent torrent state string | | `{size}` | Size in bytes | | `{progress}` | Progress value between 0 and 1 rounded to two decimal places | | `{comment}` | Torrent comment | **Example arguments:** ```text "{hash}" "{name}" --save "{save_path}" --category "{category}" --tags "{tags}" ``` ```text "D:\Upload Assistant\upload.py" "{save_path}\{name}" ``` qui splits the template into arguments before it runs substitutions. Quotes keep a path with spaces as one argument. qui removes the quotes, so the program receives the value without them. If the program requires literal quotes, put a different quote type inside the outer pair, for example `'"{name}"'`. ### Path mappings If the filesystem paths from qBittorrent do not match the paths visible to qui, use path mappings. Each mapping replaces the longest matching prefix. | Remote path (from qBittorrent) | Local path seen by qui | Mapping | |--------------------------------|------------------------|---------| | `/data/torrents` | `/mnt/qbt` | `from=/data/torrents`, `to=/mnt/qbt` | | `Z:\downloads` | `/srv/downloads` | `from=Z:\downloads`, `to=/srv/downloads` | With the first mapping, `{save_path}` becomes `/mnt/qbt/Movies` instead of `/data/torrents/Movies`. Use the same path separator style (`/` or `\`) as the remote qBittorrent instance. If no mapping matches, qui uses the original path. ### Launch modes - **Enable terminal window**: Use this option for scripts that require interaction or visible output. - **Disable terminal window**: Use this option for GUI applications or background tasks. Programs run asynchronously. qui does not wait for processes to complete. #### Supported terminal emulators If you enable "Launch in terminal window", qui detects and uses an available terminal emulator. Detection priority: 1. **TERM_PROGRAM environment variable**: qui accepts `WezTerm`, `Hyper`, `kitty`, `alacritty`, `iTerm.app`, and `Apple_Terminal`. If qui finds the matching terminal, it uses it 2. **Cross-platform terminals** (checked on all platforms): - WezTerm - Hyper - Kitty - Alacritty 3. **Linux terminals**: - GNOME Terminal - Konsole - Xfce4 Terminal - MATE Terminal - xterm - Terminator 4. **macOS native terminals**: - iTerm2 - Terminal.app 5. **Fallback**: If qui finds no terminal, qui runs the command in the background with `sh -c` On Windows, terminal-window programs use `cmd.exe`. With the terminal option disabled, qui launches native executables directly and passes arguments literally, including shell characters such as `&` and `%`. Batch files (`.bat` and `.cmd`) also use `cmd.exe`. In terminal and batch mode, qui quotes each argument for `cmd.exe`, so the program gets it literally too. `%VARIABLE%` does not expand, and operators such as `&` do not run. If a batch file needs an environment variable, read it in the script. A double quote (`"`) in a value reaches the program as two double quotes. This is the rule for batch file arguments. Programs built with current Microsoft compilers read the pair as one quote. Some other programs, for example programs written in Go, split the value at that point. For Python, PowerShell and other scripts, set **Program Path** to the interpreter executable and pass the script path as the first argument. File associations and shortcuts are not used for background launches. If an existing program uses a shortcut, change **Program Path** to its target executable. :::tip Terminal windows stay open after the command finishes so you can inspect output. Close the window when you finish. ::: ### Executing programs 1. Select one or more torrents 2. Right-click to open the context menu 3. Hover **External Programs**, then click the program name 4. qui queues one execution per selected torrent and reports results through toast notifications (success, partial success, or failure) Execution requests include only torrents from the currently selected instance. The submenu hides disabled programs. qui logs start failures at `error` level and non-zero exit codes at `warn` level with the full command line. If you enable debug logging, qui also logs each command before execution. ### REST API Manage external programs through the backend API. All endpoints require authentication: | Method | Endpoint | Description | |--------|----------|-------------| | `GET` | `/api/external-programs` | List programs | | `POST` | `/api/external-programs` | Create a program | | `PUT` | `/api/external-programs/{id}` | Update a program | | `DELETE` | `/api/external-programs/{id}` | Remove a program | | `POST` | `/api/external-programs/execute` | Execute a program | **Example request:** ```http POST /api/external-programs/execute Content-Type: application/json { "program_id": 2, "instance_id": 1, "hashes": ["c0ffee...", "deadbeef..."] } ``` The response contains a `results` array with per-hash `success` flags and optional error messages. Treat the endpoint as fire-and-forget. It returns after qui queues the programs. A program can start later. For more information, see [Execution limit](#execution-limit). ### Execution limit qui has 8 execution slots. This limit applies to all instances, automations, cross-seed rules, and manual runs together. Other programs wait for a free slot, so a program can start later than its trigger. To change the limit, set `externalProgramMaxRunning` in `config.toml` or `QUI__EXTERNAL_PROGRAM_MAX_RUNNING`, then restart qui. - A program that runs directly holds its slot until it exits, including console executables on Windows. - A recognized Windows GUI executable releases its slot after startup. It still receives arguments literally. - A program that runs in a terminal window, or a Windows batch file, holds its slot only while qui starts it. - If qui finds no terminal emulator, for example in Docker, a terminal-window program runs directly and holds its slot until it exits. - If a program already waits for a torrent, qui does not queue the same program for that torrent again. An automation rule that matches the torrent on each pass therefore queues only one run. - At most 1000 programs can wait. When the queue is full, qui does not start the program. qui writes "not started: execution queue full" to the activity log and a warning to the qui log. - A program that waits for more than 30 minutes does not start. qui writes "not started: execution limit reached" to the activity log and a warning to the qui log. - When qui shuts down, it drops the programs that wait. On Windows, qui resolves the program through `PATH` and `PATHEXT` before choosing how to launch it. A path without an extension that resolves to `.bat` or `.cmd` follows the batch-file behavior above. If an argument for a batch file or a terminal window contains a line break, qui does not start the program. `cmd.exe` stops the command at a line break and drops the rest of the arguments. A native GUI program can still show its window. GUI programs often stay open for user interaction, so they release their slot after startup. Other programs can then start without waiting for a window to close. qui identifies these programs from the executable's Windows GUI subsystem. If it cannot read that information, it holds the slot until the process exits. If a program starts another process and exits, qui tracks the process it launched, not the replacement. ### Automation integration When torrents match configured conditions, [automation rules](./automations.md) trigger external programs. Cross-seed [rules](./cross-seed/rules.md) can also run a program after qui adds a cross-seed torrent. #### Setting up automation triggers 1. Create and enable an external program in **Settings → External Programs** 2. Go to **Automations** and create or edit a rule 3. Add an **External Program** action and select your program 4. If you need a custom condition for this action, add a condition override #### Behavior | Aspect | Description | |--------|-------------| | **Execution** | Programs run asynchronously (fire-and-forget) and do not block automation processing | | **Configuration** | Automation uses the same program configuration (path, arguments, path mappings) as manual execution | | **Availability** | The dropdown lists enabled programs. A disabled program stays in the list, marked "(disabled)", only when the rule already uses it | | **Combinable** | You can combine this action with other actions (speed limits, share limits, pause, tag, category) | #### Activity logging qui logs automation executions in the activity feed with: - Rule name and rule ID that triggered the execution - Torrent name and hash - Success or failure status - Error details if the program failed to start :::note qui logs success after the program starts, not when qui queues the task. If the program fails to start (for example, executable not found or permission denied), qui captures and logs the error. On Windows, batch and terminal launchers report their activity after the command wrapper exits so qui can detect dispatch errors. A long-running batch script therefore delays its activity entry until completion. Restarting qui before it exits can leave no entry for that run. Native GUI programs report successful startup without waiting for the window to close. ::: #### Example use cases **Post-processing completed downloads:** - Condition: `State is completed` - Action: External Program that runs a media processing script **Webhook notifications:** - Condition: `Is Unregistered is true` - Action: External Program that sends a notification via curl/webhook **Media library scans:** - Condition: `Category is movies` - Action: External Program that triggers a Plex or Jellyfin scan ### Troubleshooting - **Docker**: If qui runs in Docker, place the executable inside the container or bind-mount it from the host. - **Paths are wrong**: Add or adjust path mappings so `{save_path}` and `{content_path}` resolve to local mount points. - **Multiple torrents**: The program runs once per torrent, and runs can overlap. Runs that open a terminal window, and Windows batch files, hold a slot only while qui starts them. For more information, see [Execution limit](#execution-limit). Make sure that your script handles concurrent executions or uses a lock. - **Automation not triggering**: Make sure that you enabled the program in **Settings → External Programs**. Disabled programs do not appear in the dropdown for new rules. --- ## Incognito mode for screen sharing ## Incognito Mode Incognito mode disguises your torrent data so you can share your screen. qui replaces torrent names with Linux ISO names. It also replaces categories, tags, trackers, and save paths with matching fake values. The disguise is display-only. qui does not change any data in qBittorrent. Each torrent maps to the same fake values every time, based on its info hash. The pool of fake names is small, so two torrents can show the same fake name. ### Turn it on Incognito mode is one global toggle: - On the torrent list, click the eye icon in the status bar at the bottom. The label reads **Incognito off** or **Incognito on**. - On mobile, tap the **Incognito** button in the torrent view. - The eye icons next to instance URLs on the Dashboard and under **Settings > Instances** toggle the same setting. qui saves the toggle with your client settings and syncs it to the server. The setting applies across tabs and browsers, and it is off by default. ### What it hides | Data | Shown instead | |------|---------------| | Torrent names | Linux ISO names, for example `debian-12.7.0-amd64-DVD-1.iso` | | Categories | Linux-themed categories, for example `distributions` and `server-editions` | | Tags | Linux-themed tags, for example `lts` and `rolling-release` | | Trackers | Linux mirror domains, for example `mirrors.kernel.org` | | Save paths | Linux paths, for example `/home/downloads/distributions` | | File and folder names | Linux ISO and distribution names | | Torrent metadata | Fake "Created by", comment, and info hash | | Peer addresses | `192.168.x.x` with masked ports | | Ratios and sidebar filter counts | Deterministic fake numbers | qui blurs some values instead of replacing them: - Instance URLs and usernames on instance cards - External IP addresses in the status bar and on the Dashboard - Instance hosts and proxy URLs under **Settings > Client Proxy** ### What it does not hide Sizes, speeds, progress, states, and dates stay real. Incognito mode is a visual disguise for casual viewers, not a privacy control. :::warning If you export a `.torrent` file while incognito mode is on, qui renames the downloaded file with the fake name. The file still contains the real torrent data. Do not share exported files as if they were disguised. ::: ### Spreadsheet disguise themes The **Spreadsheet** and **Spreadsheet Classic** themes make qui look like a spreadsheet app. Spreadsheet Classic renders a 2003-era look and is light-only. Both are premium themes and need the same license that unlocks [custom themes](./custom-themes.md). Select them under **Settings > Premium Themes**. While one is active, qui renders spreadsheet chrome: | Element | What it does | |---------|--------------| | Ribbon tabs | Tabs such as **File**, **Home**, and **Data** across the top. Each tab is a real navigation target: **File** opens Settings, **Home** opens your first active instance, and the rest map to qui pages. Spreadsheet Classic renders a 2003-era menu bar with different names. There, **Data** opens your first active instance. | | Formula bar | The name box shows the cell reference `A1`, or the selected row count such as `3R`. The `fx` input filters the torrent list, the same as the header search. | | Sheet tabs | Tabs at the bottom, one per active instance. The **+** tab opens instance management. | | Tab title | The browser tab reads `Book1.xlsx` (`Book1.xls` for Classic) and the favicon becomes a spreadsheet grid. | | Renamed labels | Navigation entries, table headers, and filter labels use office words: Seeds becomes Sources, Peers becomes Links, Ratio becomes Yield, and ETA becomes Due. These strings stay English in every UI language. | The spreadsheet chrome only renders on desktop-width screens. The ribbon tabs render on every page. The formula bar and the sheet tabs render only on the torrent list. Dialogs, configuration pages, and toasts keep their real names. While a spreadsheet theme is active, incognito mode switches its vocabulary from Linux ISOs to office documents. Torrent names become spreadsheet files, for example `Q1 Budget Consolidation v3.xlsx`. Categories become departments such as `Finance`, and trackers become internal file servers such as `fileserver-01.corp.internal`. :::note A spreadsheet theme disguises the app chrome, not your data. Real torrent names stay visible until you also turn on incognito mode. ::: --- ## Add qBittorrent instances to qui ## Instance Settings Add and configure the qBittorrent instances that qui connects to. Each instance is a separate qBittorrent WebUI that qui manages. ### Add an instance 1. Open **Settings → Instances**. 2. Click **Add Instance**. 3. Enter the connection details and click **Add Instance**. ### Edit an instance Two paths open the instance settings dialog: - On the Dashboard, click the gear icon next to the instance name. - In **Settings → Instances**, open the three-dot menu on the instance card and select **Edit**. #### Connection settings | Field | Description | |-------|-------------| | **Instance Name** | Display name in qui's sidebar and instance selector. | | **URL** | Full URL to the qBittorrent WebUI (for example, `http://localhost:8080`). | | **Skip TLS Verification** (**Skip TLS Certificate Verification** in the Add Instance form) | Accept self-signed or otherwise untrusted certificates. | | **Local Filesystem Access** | Enable for features that read files directly. See [Local Filesystem Access](#local-filesystem-access). | #### Authentication Select how qui authenticates to qBittorrent under **qBittorrent Authentication**: | Option | When to use | |--------|-------------| | **None** | qBittorrent bypasses authentication for localhost or whitelisted IPs. | | **Username and Password** | Standard WebUI credentials. | | **API Key** | The instance accepts an API key instead of credentials. | If a reverse proxy requires credentials in front of qBittorrent, enable **HTTP Basic Authentication**. :::note HTTP Basic Authentication is separate from qBittorrent's built-in authentication. If your reverse proxy, for example nginx or Caddy, requires credentials before requests reach qBittorrent, enable it. ::: ### Local Filesystem Access If enabled, qui reads the same filesystem as qBittorrent. This setting turns on these features: - **Content file download**: Download single files from a torrent through the browser. Right-click a file in the Content tab. - **Hardlink detection**: Automations detect whether torrent files have hardlinks into your media library. - **Orphan scan**: Find files on disk that no torrent references. - **Free space (path)**: Automation rules check free space on a specific mount point instead of the value that qBittorrent reports. - **Has Missing Files condition**: Automation rules check whether a completed torrent has files missing on disk. - **MediaInfo**: Show MediaInfo for a file in the Content tab. - **Cross-seed hardlink and reflink mode**: Create links instead of a second copy. Hardlink mode also works on a remote instance; reflink mode needs local access. - **Cross-seed ID fallback**: Read IMDb, TMDb, and TVDb tags from MKV files when a search finds no results. - **Directory scan**: Use the instance as a directory scan target. :::warning Enable this setting only if qui runs on the same machine as qBittorrent or has the same mounts. If the paths differ, these features fail without an error or return wrong results. ::: If qui runs in Docker, mount the same data volumes in the qui container. See [Docker configuration](../getting-started/docker.md) for details. ### Incognito mode In **Settings → Instances**, click the eye icon next to an instance URL to toggle [incognito mode](./incognito.md). ### Instance actions In the instance settings dialog, open the three-dot menu next to the dialog title: - **Disable Instance** / **Enable Instance**: Control whether qui connects to and manages this instance. - **Delete Instance**: Remove the instance from qui. This does not change qBittorrent itself. ### qBittorrent Preferences After the **Instance** tab, the settings dialog shows the tabs of the qBittorrent WebUI in the same order: **Behavior**, **Downloads**, **Connect**, **Speed**, **BitTorrent**, **RSS**, **WebUI**, and **Advanced**. qui sends these preferences to the qBittorrent API. They work the same as in the qBittorrent WebUI. qui shows a preference only when your qBittorrent version sends it and your libtorrent version and platform use it. qui hides a tab that has no preferences. Some preferences are read-only. qui shows the value, and you change it in qBittorrent. All tabs share one form. When you click **Save Changes** on any tab, qui sends only the preferences that you changed, on all tabs. If the save fails, qui shows an error and keeps your changes in the form. Other screens in qui read the preferences each time that you open them. An example is the default save path in the add torrent dialog. If you change a preference in the qBittorrent WebUI, qui shows the new value the next time that you open the screen. qui can take up to 30 seconds to get the change from qBittorrent. #### Behavior The **Log file** section sets whether qBittorrent writes its log to a file, and the folder of that file. It also has the backup of the log file at a maximum size in KiB, and the deletion of backups that are older than a number of days, months, or years. qBittorrent 4.6 and later send these preferences. The other settings on the **Behavior** tab of the qBittorrent WebUI change only the qBittorrent WebUI or the desktop app. Examples are the language and the saved search tabs. qui does not show them. #### Downloads The **When adding a torrent** section has the default content layout, **Add to top of queue**, **Start Torrents Paused**, and the torrent stop condition. The stop condition stops a new torrent when it receives its metadata or when qBittorrent checked its files. The section also sets when qBittorrent deletes the .torrent file that it added, for example from a watched folder. The choices are never, when the torrent is added, and always. "Always" also deletes the file when you cancel the add. The **When adding a duplicate torrent** section sets whether qBittorrent adds the trackers of the duplicate to the existing torrent. The **Backup of .torrent files** section sets the folders where qBittorrent keeps a copy of each .torrent file. On qBittorrent 5.3 and later, a switch turns on each folder. You can move the copy to a second folder when the torrent finishes, and remove the copy when you remove the torrent. Before qBittorrent 5.3, an empty folder turns the copy off. The next section has the pre-allocation of disk space, the `.!qB` extension for incomplete files, and the `.unwanted` folder for files that you did not select. qBittorrent 5.0 and later send the `.unwanted` folder preference. The **Saving management** section has automatic torrent management and its relocation rules, the category paths in Manual Mode, subcategories, the default save path, the temporary download path, and the watch folders. qBittorrent 4.6 to 5.1 send the subcategories preference. The **Excluded file names** section has a list of file name patterns, one per line. qBittorrent does not download a file whose name matches a pattern. qBittorrent 4.5 and later send these preferences. On qBittorrent 5.0 and later, the default save path, the temporary download path, and the backup folders suggest folders on the qBittorrent host while you type. The watch folders get no suggestions. On qBittorrent 4.x, each path field is a plain text box. The **Email notification upon download completion** section makes qBittorrent send an email when a download finishes. The section has the sender address, the recipient addresses, the SMTP server, and the user name and password for the server. In the recipient field, separate the emails with a semicolon, and separate the addresses in one email with a comma. If the server does not use the default port, add a colon and the port after the server name, for example `smtp.example.com:587`. On qBittorrent 5.3 and later, you select the encryption: None, STARTTLS, or SMTPS. Before qBittorrent 5.3, a switch turns on SSL. On qBittorrent 5.0 and later, the section has a **Send test email** button. Save your changes before you click the button, because qBittorrent sends the test email with the saved settings. The button stays off while the saved email notification switch is off, because qBittorrent then sends nothing. A success message in qui tells you only that qBittorrent queued the email, and the email can still fail. Look for the email in your inbox, and look for SMTP errors in the qBittorrent log. The **Run External Program** section has the commands that qBittorrent runs when a torrent is added and when a torrent finishes. A list of placeholders follows them. ##### Start torrents paused The **Start Torrents Paused** switch on the **Downloads** tab changes the qBittorrent preference "Do not start the download automatically". Torrents that other tools add to qBittorrent also start paused. The add torrent dialog uses this preference as the default for its **Start paused** option. The choice in the dialog always applies to the torrents that you add. :::note Earlier versions of qui kept this setting in qui and did not send it to qBittorrent. After you update qui, open the **Downloads** tab and set **Start Torrents Paused** again. ::: ##### Monitored folders qBittorrent watches folders and adds any torrent file that appears in them. Configure this in qui: 1. Open the instance settings dialog and select the **Downloads** tab. 2. Under **Watch Folders**, click **Add Folder**. 3. Enter the path of the folder to monitor. 4. Select the **Torrent Destination** for discovered torrents: **Monitored folder**, **Default save location**, or **Other** with a custom save path. 5. Click **Save Changes**. #### Connect The **Protocol Settings** section has the BitTorrent protocol: TCP, μTP, or both. The **Listening Port** section has the port for incoming connections and UPnP/NAT-PMP port forwarding. On qBittorrent 5.2 and later, it also has the port for SSL torrents. An SSL torrent is a libtorrent torrent that uses certificates. Only libtorrent clients support SSL torrents, and normal torrents do not use this port. The qBittorrent WebUI does not show this preference. The **Connection Limits** section has the global and per-torrent maximum connections and upload slots. The **I2P (experimental)** section connects qBittorrent to an I2P router. I2P is an anonymous network. The section has the host and the port of the router, and the mixed mode. In mixed mode, I2P torrents also connect to normal IP addresses, and these connections are not anonymous. qui shows this section only on qBittorrent 4.6 and later with libtorrent 2. On libtorrent 2.1 and later, the section also has I2P peer exchange. qBittorrent applies a change to peer exchange after a restart. The **Proxy server** section has the proxy type, the host, the port, the hostname lookup through the proxy, and the user name and password. qBittorrent saves the password unencrypted. The other switches set which traffic uses the proxy: - On qBittorrent 4.6 and later, you select BitTorrent, the peer connections, RSS, and other traffic. - Before qBittorrent 4.6, you select the peer connections, and you can use the proxy only for torrents. - Before qBittorrent 4.6, the proxy type also sets the authentication. To use the user name and password, select **SOCKS5 with authentication** or **HTTP with authentication**. The **IP Filtering** section has the IP filter file, the filter for trackers, and the manually banned IP addresses. #### Speed The **Global rate limits** and **Alternative rate limits** sections show the limits in KiB/s. An empty limit means no limit. The alternative rate limits section also has the schedule: the start time, the end time, and the days. The **Rate limits settings** section sets whether the limits apply to μTP, to transport overhead, and to peers on the LAN. #### BitTorrent The **Security & Privacy** section has DHT, PeX, local peer discovery, encryption, and anonymous mode. The **Queue Management** section has queueing, the limits for active torrents, and the thresholds for slow torrents. The **Seeding Limits** section has the share ratio limit, the seeding time limit, and the inactive seeding time limit. The times are in minutes. qBittorrent 4.6 and later send the inactive seeding time limit. The section also has the action at a limit. The action stops the torrent, removes it, removes it and its files, or enables super seeding. On qBittorrent 5.3 and later, you also select whether the action starts when the torrent reaches one limit or only when it reaches all limits. The **Automatically add trackers to new downloads** section has the list of trackers that qBittorrent adds to each new torrent. The **Automatically add trackers from a URL to new downloads** section has the URL of a tracker list. qBittorrent downloads the list from the URL and adds its trackers to each new torrent. The fetched trackers are read-only. qBittorrent 5.1 and later send these preferences. #### RSS The **RSS reader** section has RSS processing, the refresh interval, the delay in seconds between two requests to the same host, and the maximum number of articles for each feed. qBittorrent 5.0 and later send the request delay. The **RSS torrent auto downloader** section has RSS auto-downloading. The **RSS smart episode filter** section sets whether qBittorrent downloads REPACK and PROPER episodes. It also has the episode filters. These are regular expressions, one per line, that find the season and the episode number in an article title. #### WebUI These settings control the WebUI server of qBittorrent. qui connects to qBittorrent through this server. The **Web User Interface (remote control)** section has the IP address and the port of the WebUI, and UPnP/NAT-PMP port forwarding for the WebUI port. The **HTTPS** section sets whether the WebUI uses HTTPS, and the files of the certificate and the key. The **Authentication** section has the username, the authentication bypass for clients on localhost and for clients in whitelisted IP subnets, and these settings: - The ban of a client after a number of failed logins, and the duration of the ban in seconds. A value of 0 failed logins turns off the ban. - The session timeout in seconds. With 0, a session does not expire. - The maximum number of sessions. qBittorrent 5.3 and later send this preference. An empty box means no limit. The **Security** section has the clickjacking protection, the CSRF protection, the Secure flag of the cookie, and the Host header validation with the list of server domains. The **Reverse proxy** section has reverse proxy support and the list of trusted proxies. With reverse proxy support, qBittorrent uses the client address from the `X-Forwarded-For` header of a trusted proxy. The address, the port, HTTPS, the certificate, the key, the username, and the authentication bypass are read-only in qui. qui uses these settings to connect to qBittorrent. A change to one of them can stop the connection. The Host header validation and the server domains are also read-only. If the server domains do not include the host name in the instance URL, qBittorrent rejects every request from qui. To change one of these settings: 1. Change the setting in qBittorrent. 2. In qui, [edit the instance](#edit-an-instance) and update its URL or its credentials to match. qui does not show the WebUI password, because qBittorrent never sends it. qui does not show the API key and does not send it to the browser. The alternative WebUI, the custom HTTP headers, and the dynamic domain name change only the qBittorrent WebUI. qui does not show them. #### Advanced The **qBittorrent** section has these preferences: - The resume data storage type, the save interval of the resume data and of the statistics, and the size limit of .torrent files in MiB. - The removal mode of torrent content: delete the files permanently, or move them to the trash. - The memory working set limit, the [network binding](#network-binding), the lookup of peer countries, and the reannounce to trackers when the IP address changes. - The recheck of torrents on completion, the embedded tracker with its port and port forwarding, Mark-of-the-Web or macOS quarantine for downloaded files, and the option to ignore SSL errors. - On qBittorrent 5.3 and later, the start of the BitTorrent session in paused state, and the session shutdown timeout. The paused start pauses every torrent when qBittorrent starts. It is not the [Start torrents paused](#start-torrents-paused) setting of the Downloads tab. An empty shutdown timeout means no limit. The **libtorrent** section has these preferences: - The bdecode depth limit and token limit. - The asynchronous I/O threads, the hashing threads, the file pool size, the memory for torrent checks, the disk cache, and the disk queue size. - The disk I/O type, the read mode, the write mode, and the OS cache on qBittorrent 4.3 and 4.4. - The coalescing of reads and writes, the piece extent affinity, and the upload piece suggestions. - The send buffer watermarks, the outgoing connections per second, and the outgoing connections while seeding. - The socket send and receive buffer sizes in KiB, the socket backlog size, the outgoing ports, and the UPnP lease duration. A socket buffer size of 0 uses the system default. - The peer ToS byte, the μTP-TCP mixed mode, the hostname resolver cache, and support for internationalized domain names. - Multiple connections from one IP address or one peer ID, the validation of HTTPS tracker certificates, the SSRF mitigation, and the block of peers on privileged ports. - The upload slots behavior and the upload choking algorithm. - The announce to all trackers and to all tiers, the IP address and the port that qBittorrent reports to trackers, the maximum concurrent HTTP announces, and the stop tracker timeout. - The peer turnover, the request queue size, the maximum outstanding block requests from a peer, the DHT bootstrap nodes, and the STUN server for WebTorrent. - The I2P tunnel quantity, length, and length variance, inbound and outbound. qui shows a preference only where qBittorrent uses it: - On libtorrent 1, qui shows the disk cache and the coalescing of reads and writes. - On libtorrent 2, qui shows the memory working set limit, the hashing threads, the disk I/O type, and the I2P tunnel settings. - The write-through disk I/O write mode needs libtorrent 2.0.6 or later. The I2P length variance needs libtorrent 2.0.12 or later. Multiple connections from one peer ID need libtorrent 2.0.13 or later. The STUN server for WebTorrent needs libtorrent 2.1 or later. - qui does not show the memory working set limit on Linux or macOS. qui shows Mark-of-the-Web only on macOS and Windows. qBittorrent before 5.0 does not report its platform, so qui shows both there. The refresh interval, the application instance name, the confirmation of a torrent recheck, the Python executable path, and the lookup of peer host names change only the qBittorrent WebUI or desktop app. qui does not show them. ##### Network binding The network binding is the network interface and the IP address that qBittorrent uses for peer connections. The first list sets the interface, and the second list sets the address. **Any interface** makes qBittorrent use all interfaces. **All addresses**, **All IPv4 addresses**, and **All IPv6 addresses** use all the addresses of the selected interface. The other entries in the second list are the addresses of that interface. If you select a different interface, qui sets the address to **All addresses**. qBittorrent keeps a saved interface or address that is not available, for example a VPN interface that is down. qui shows that interface or address with the mark "not available" and keeps it selected. If you save other settings, qui does not change the network binding. On qBittorrent 4.6 and later, the mark is next to the readable name of the interface. On earlier versions, the mark is next to the system name, for example `tun0`. If qui cannot get the list of interfaces from qBittorrent, it shows the network binding as read-only text. You can still save the other settings. --- ## qBittorrent notifications for Discord, Telegram, and webhooks ## Notifications qui sends notifications to the Notifiarr API and to Shoutrrr targets. Configure one or more targets in **Settings → Notifications** and select the events to send. ### Setup 1. Open **Settings → Notifications**. 2. Add a target name and URL. 3. Select the events to send. 4. Save, then click the send icon (paper plane) on the target card to send a test notification. Notes: - If a qui update adds new events, existing targets keep their saved event list. - qui truncates long messages to stay within provider limits. - Discord and Notifiarr targets receive rich embeds with fields. Other services receive plain text. ### Event types | Event key | Description | | --- | --- | | `torrent_added` | The client adds a torrent (includes tracker, category, tags, and ETA when available). | | `torrent_completed` | A torrent download completes (includes tracker, category, and tags when available). | | `backup_succeeded` | A backup run completes successfully. | | `backup_failed` | A backup run fails. | | `dir_scan_completed` | A directory scan run finishes. | | `dir_scan_failed` | A directory scan run fails. | | `orphan_scan_completed` | An orphan scan run completes (includes clean runs). | | `orphan_scan_failed` | An orphan scan run fails. | | `cross_seed_automation_succeeded` | RSS cross-seed automation completes (summary counts and samples). | | `cross_seed_automation_failed` | RSS cross-seed automation fails or completes with errors (summary). | | `cross_seed_search_succeeded` | Seeded search run completes (summary counts and samples). | | `cross_seed_search_failed` | Seeded search run fails or cancels (summary). | | `cross_seed_completion_succeeded` | Completion search run completes (summary counts and samples). | | `cross_seed_completion_failed` | Completion search run fails. | | `cross_seed_webhook_succeeded` | Webhook apply adds one or more torrents. No-op checks and applies do not notify. | | `cross_seed_webhook_failed` | Webhook check or apply fails. | | `automations_actions_applied` | Automation rules apply actions (summary counts and samples, only if actions occur). | | `automations_run_failed` | Automation rules fail to run for an instance (system error). | ### Notifiarr API If you want output similar to Discord embeds, use the native Notifiarr API scheme: - `notifiarrapi://apikey` - Optional override: `notifiarrapi://apikey?endpoint=https://notifiarr.com/api/v1/notification/qui` ### Shoutrrr URLs Use any Shoutrrr-supported URL scheme. Examples: - `discord://token@channel` - `notifiarr://apikey` - `slack://token@channel` - `telegram://token@telegram?chats=chat-id` - `gotify://host/token` Notifiarr also accepts optional parameters such as `channel` and `name`, for example `notifiarr://apikey?name=qui&channel=123456789`. #### Services without a Shoutrrr scheme If Shoutrrr has no scheme for your service, but the service accepts a JSON webhook, use the generic webhook service. This example is for a service that reads the message from a `content` field: - `generic://chat.example.com/api/webhooks//?template=json&messagekey=content` The generic service uses HTTPS. If the host uses plain HTTP, add `disabletls=yes`. To send a header, add `@Header=value`, for example `@Authorization=Bearer%20token`. For all options, see the [generic service documentation](https://shoutrrr.nickfedor.com/latest/services/specialized/generic/). See the Shoutrrr documentation for the full list of services and URL formats: https://github.com/nicholas-fedor/shoutrrr --- ## Orphan scan for qBittorrent download folders ## Orphan Scan Orphan scan finds and removes files in your download directories that no torrent references. ### How it works 1. qui builds the scan roots from the save paths of your current torrents. It does not scan qBittorrent's default save path unless you turn on **Scan Default Save Path**. 2. qui flags files that no torrent references as orphans. A file a torrent references also protects the other paths to it that the scan reaches, such as a hardlink, a bind mount or a path through a symlinked folder, as long as the scan reaches the torrent's file too. If you delete a hardlink of a torrent's file, you free no space, because the torrent's file holds the same data. 3. Before you confirm deletion, you preview the list. 4. qui re-checks each listed file against the files your torrents use now, by path and by file identity. A file that a torrent started to use through another path since the preview, such as a hardlink, a bind mount or a symlinked folder, stays. A listed folder that a torrent now reaches through another path stays too, even when the torrent has not written anything yet. qui reads the folders along your torrents' paths only when the preview lists a folder. A file or folder your torrents use that is missing protects nothing, because qBittorrent cannot read it either. On Linux, macOS and remote instances, the same goes for a path that runs into a symbolic link loop. qui skips a file your torrents use when it is not allowed to look it up, so another path to it is not protected. If qui is not allowed to look up a folder that your torrents use, the deletion stops before qui deletes anything, because qBittorrent could reach a listed folder through it. The deletion also stops if qui cannot read one of those files or folders for any other reason. This includes a file that qui can look up but whose file identity it is not allowed to read, for example because of a Windows ACL. 5. qui deletes the files, then removes the directories the preview listed. :::note When matching paths, qui normalizes Unicode paths to canonical NFC form. If the filesystem and qBittorrent report composed and decomposed forms of the same name, this normalization prevents false orphans. On normalization-sensitive filesystems, qui treats two byte-distinct canonical-equivalent names as one logical path. ::: :::info If multiple **active** qBittorrent instances have **[Local Filesystem Access](./instance-settings.md#local-filesystem-access)** enabled and their torrent save paths overlap, qui also protects files that torrents from those other instances reference. qui applies this protection even when it scans a single instance. To protect files safely, qui must determine whether the scan roots overlap. If any other local-access instance is unreachable or not ready, the scan fails to prevent false positives. ::: :::warning qui does not protect disabled instances. If a disabled instance with local filesystem access shares save paths with an active instance, qui can flag its files as orphans. Before you scan, enable the instance or make sure that the paths do not overlap. ::: :::warning[Docker: Local Filesystem Access] Orphan scan, hardlinks, reflinks, and path-based automation rules require access to the same filesystem paths that qBittorrent uses. Mount the same paths that qBittorrent uses. The paths must match exactly: ```yaml volumes: - ./qui:/config - /data/torrents:/data/torrents # Must match qBittorrent's path ``` After you mount the paths, enable **Local Filesystem Access** on each instance in qui's Instance Settings. ::: ### Directories no torrent points at By default, qui scans a directory only if at least one torrent points to it. If you delete all torrents from a directory, that directory stops being a scan root. qui does not detect leftover files there. **Example:** You have torrents in `/downloads/old-stuff/`. If you delete all those torrents, orphan scan stops tracking `/downloads/old-stuff/` and does not clean it up. The same gap applies one level up. If your torrents all save to `/data/torrents/mydata/`, a stray `/data/torrents/test.txt` is never walked, because no torrent points at `/data/torrents/`. For a directory outside the default save path and outside each category path, keep one small torrent with its save path in that directory. Orphan scan then walks the directory and all its subdirectories. The save path must match the case of the directory name. On Linux, if the save path is `/data/mtv` and the directory is `/data/MTV`, qBittorrent makes a second, empty `mtv` directory and moves the torrent into it. The scan then walks the new directory and reports it as clean. ### Scanning the default save path Turn on **Scan Default Save Path** to close that gap. qui reads the default save path from the instance's own qBittorrent settings and walks it as a scan root, including subdirectories that no torrent uses. Turn on **Including Category Paths** underneath it to also walk every category destination: the save path a category sets, or `default save path / category name` for a category that inherits it. This matters when a category points somewhere outside the default save path, which the first toggle alone would not reach. It is available only while **Scan Default Save Path** is on. Both are off by default. Turning them on widens what a scan can flag, so review the preview before you confirm a deletion. Everything else still applies inside the wider roots: - Files that torrents reference are protected, including torrents on other active instances with local filesystem access. - Ignore paths, the grace period, and max items per run all apply. - A save path missing from disk, such as an unmounted volume, is reported rather than treated as scanned, even when a wider root covers it. If qui cannot read the default save path or the category list from qBittorrent, or qBittorrent reports an empty or relative default save path, or a relative download path that a protected folder depends on, the run fails and names the cause. qui does not fall back to a narrower scan, because a narrower scan would report a clean result over a tree you asked it to check. :::note These paths come from qBittorrent, so they are paths as qBittorrent sees them. If qui runs in a different container, they must resolve to the same directories on the host that runs qui. ::: ### Abandoned directories Moves and deletions leave empty directories behind. qui removes the leftover folders of the deletes and moves it makes or proxies itself (see [Deleting and moving torrents](./torrent-management.md#deleting-and-moving-torrents)). Deletes made in the qBittorrent WebUI, by qBittorrent's share limits, or by a client that bypasses the proxy still leave them. Orphan scan reports files, so an empty directory is never flagged, and the tree fills up with them over time. Turn on **Delete Abandoned Directories** to include them. qui reports a directory when this run empties it: either it holds no files at any depth, or every file below it is an orphan the run is about to delete. Each one is listed in the preview alongside the orphan files, marked with a directory icon and no size. A single file that survives the run keeps its whole chain of parent directories. That covers a file a torrent owns, a file still inside the grace period, a file under your ignore paths, and a file the max-items cap pushed out of this run. These are never reported, even when empty: - A scan root itself. - A category destination, or any directory above one. qBittorrent will save into it again. qui works out a category's directory the same way qBittorrent does, including one that inherits from a parent category. - The download path while it is turned on, a category's download folder, or any directory above one. qBittorrent will download into it again. qui works out a category's download folder the same way qBittorrent does: its own download path, the one it takes from its parent category, or its folder in its parent category's download folder or in the download path, even when the download path is turned off. - A folder that qBittorrent monitors for `.torrent` files, the save path set for it, or any directory above one. If qui removes a monitored folder, qBittorrent stops watching it until qBittorrent restarts. - Anything under your ignore paths. - A directory changed more recently than the grace period. - A directory holding anything qui did not itself list for removal, such as an ignored subdirectory, a symbolic link or a Windows junction. - A directory that a torrent's save path, or a folder inside the torrent, reaches through a symbolic link, a bind mount or a Windows junction, and any directory that holds one. This holds even before the torrent writes anything. If qui cannot read one of those folders for a reason other than a missing folder, it lists no directory in that run, and the run is a [partial scan](#partial-scans). This includes a folder that qui is not allowed to look up, because a torrent could reach a listed directory through it. On every platform, orphan file scans skip symbolic links and other non-regular entries, including sockets, FIFOs (named pipes) and devices. On Windows, this also excludes junctions. When a torrent's save path is itself a symbolic link to a folder, qui reads the folder through the link only to learn which files the torrent uses, and does not list those files where it finds them at the link's target. Nothing is listed or deleted through the link. Recognized cloud-placeholder files and Windows Overlay Filter (WOF) data files remain eligible for file scanning and deletion. WOF supports compressed files. Normal access permissions still apply. Windows uses reparse tags to identify files that need special filesystem handling. Unknown reparse tags remain excluded. On every platform, confirmed deletion also keeps a symbolic link or containing directory when a torrent references a file beneath that path. This preserves the path the torrent uses, even when removing the link would leave the target's bytes intact. qui lists a Blu-ray or DVD folder (`BDMV` or `VIDEO_TS`) as one item. If that folder holds a symbolic link to a file that a torrent uses, deletion keeps the whole folder, even when the torrent uses its own path to the file and not the link. The run reports "a torrent now uses a file in this folder through another path", and each new scan lists the folder again. Remove the link to let qui delete the folder. Directories are removed after the files, so a tree this run empties goes in one pass. qui removes only the directories the preview listed, so the directory count never exceeds what you saw. Anything that changed between the preview and your confirmation is skipped rather than removed: a directory that still holds a file the run kept, one that gained content, one a torrent now reaches through another path, or one that has since become a scan root, a category destination or a monitored folder is reported as skipped, not failed. ### Partial scans A directory can disappear while a scan runs, for example when an automation removes a torrent and its files. If a directory below a scan path disappears, qui skips that directory and scans the rest of the path. If at least one scan path completes but another is unavailable, qui reports **Partial scan** and keeps the results from completed paths. This also applies when qui skips paths because qBittorrent temporarily cannot provide torrent file lists. This result applies even when qui finds no orphan files. The run details and deletion preview show the warning with the affected paths and reasons. The selected scan paths list includes paths that failed during scanning. Paths skipped before scanning appear in the warning. Partial scans skip automatic cleanup. You can review the warning and delete the listed orphan files manually. Before deletion, qui refreshes torrent ownership data, re-checks the listed files as [How it works](#how-it-works) describes, and applies its normal deletion checks. After successful manual deletion, the run keeps its **Partial scan** label. If all deletion attempts fail, the run shows **Failed** and keeps both the scan warning and the deletion error. If you enable orphan-scan completion notifications, partial scans send a warning through that setting, including when results await manual review. The completion notification after manual deletion also includes the scan warning. Use **Scan Now** to try again, or wait for the next scheduled scan. qui does not retry immediately. If paths are unavailable or skipped and no scan path completes, the run fails. The run also fails if qui cannot establish torrent ownership. qui ignores a missing default or category path only if no torrent uses the same path as a scan root. Otherwise, qui reports the path as unavailable. ### Settings | Setting | Description | Default | |---------|-------------|---------| | Grace period | Skip files modified within this window | 10 minutes | | Ignore paths | Directories to exclude from scanning | - | | Scan interval | How often scheduled scans run | 24 hours | | Max items per run | Maximum orphan preview entries, files and directories together, saved for a run (also caps what qui can delete from that run) | 1,000 | | Scan default save path | Also walk qBittorrent's default save path, including directories no torrent uses | Disabled | | Including category paths | Also walk every category destination, explicit or inherited | Disabled | | Delete abandoned directories | Report directories this run empties | Disabled | | Auto-cleanup | Delete orphans from complete scheduled scans without manual confirmation | Disabled | | Max files threshold | If the orphan file count is at or below this threshold, auto-delete orphans. Directories do not count. | 100 | Orphan scan skips common OS and NAS metadata, recycle bin, snapshot, and Kubernetes volume-internal entries. Matching is case-insensitive. **Ignored files (exact names)** - `.DS_Store` - `.directory` - `desktop.ini` - `Thumbs.db` **Ignored files (name prefixes)** - `.fuse*` (for example `.fuse_hidden*`) - `.nfs*` - `._*` - `.goutputstream-*` - `.#*` - `~$*` **Ignored files (name suffixes)** - `*.parts` (qBittorrent partial download files) - `*.!qB` (qBittorrent incomplete download files) **Ignored directories (exact names)** - `.AppleDB` - `.AppleDouble` - `.TemporaryItems` - `.Trashes` - `.Recycle.Bin` - `.recycle` - `.snapshot` - `.snapshots` - `.zfs` - `@eaDir` - `$RECYCLE.BIN` - `#recycle` - `lost+found` - `System Volume Information` **Ignored directories (name prefixes)** - `.Trash-*` - `..*` (Kubernetes internals like `..data` and timestamp dirs) If an ignore path is a scan path, or a directory above a scan path, qui removes that scan path from the run. Use this when a save path is not available on the host that runs qui. qui still reads an ignore path that is a torrent's file or holds one, and an ignored save path that is a symbolic link to a folder, to learn which files the torrents use. A second path to one of those files elsewhere, such as a bind mount, is then not flagged. qui lists nothing there. If such a path is missing, qui skips it. If qui cannot read it for another reason, the run is a [partial scan](#partial-scans). If the ignore paths remove all scan paths, the run fails and tells you that the ignore paths cover every scan path. Filesystem-root ignore paths keep the scan paths in the run, but files under those roots are ignored. Paths on other drives or shares are still scanned normally. If the ignores cover every scan path, an otherwise successful run completes with no orphans. ### Max items per run behavior 1. qui attempts to scan all selected paths. A wider directory can cover nested scan paths. Unavailable paths follow the [partial scan rules](#partial-scans). 2. qui sorts the orphan candidates by your selected preview sort. 3. qui applies `Max items per run`. If more candidates exist than the cap, qui marks the run as truncated. 4. qui deletes only the items saved in that run's preview list: orphan files and the abandoned directories they empty. **Example:** If qui finds 2,000 orphan candidates among 5,000 total files and `Max items per run` is 1,000, qui scans all 5,000 files, saves the top 1,000 candidates for preview and deletion, and marks the run as truncated. #### FAQ **Do I need multiple runs to scan everything?** No. qui applies the preview cap after scanning. If orphan candidates exceed the cap, delete the items in the current preview first. The next scan returns the next set of candidates. If paths were unavailable, restore access and run another scan. ### Workflow 1. Trigger a manual or scheduled scan. 2. Review the preview list of orphan files and directories. 3. Confirm deletion. 4. qui deletes the files, then removes the directories you saw in the preview. ### Preview features - **Path column**: Shows the full file path with copy-to-clipboard support. - **Export CSV**: Downloads the full preview list across all pages as a CSV file. --- ## Reannounce stalled qBittorrent torrents ## Tracker Reannounce qui reannounces stalled torrents to trackers. If a tracker fails to register a new upload immediately, qui helps your torrents start seeding without manual work. qBittorrent does not retry failed announces quickly. If a tracker registers a new upload slowly or returns an error, the torrent stays stalled. qui retries the announce for you. qui never spams trackers. If a tracker update is in progress or a response is pending, qui waits. qui acts only after the tracker responds and a problem exists. ### Quick start 1. Open **Automations** in the main navigation, then select the **Reannounce** section. 2. Find your instance in the **Reannounce** card. 3. Turn on the switch next to the instance name. In the dialog that opens, click **Enable**. 4. If you want to change settings, expand the instance row and click **Configure**. Adjust the values and click **Save Changes**. qui now monitors stalled torrents in the background. ### Configuration #### Timing | Setting | Description | Default | |---------|-------------|---------| | Initial Wait | Time to wait after you add a torrent before qui checks it | 15s | | Retry Interval | Time between retries within a single reannounce attempt | 7s | | Max Torrent Age | Stop monitoring torrents older than this | 10 minutes | | Max Retries | Maximum consecutive retries within a single scan cycle | 50 | Some slow trackers need up to 50 retries at 7s intervals (about 6 minutes) to register uploads. #### Monitoring scope Choose which torrents qui monitors: - **Monitor All Stalled Torrents**: qui checks every stalled torrent. This is the default setting for new instances. If you want to ignore specific categories, tags, or trackers (such as public trackers), add **Exclude** rules. - **Custom filter (Monitor All disabled)**: qui checks only torrents that match your **Include** rules. **Exclude** rules still block specific items within those groups. If you disable **Monitor All** and add no **Include** rules, no torrent can match. qui then does no scan and sends no request to qBittorrent. #### Quick Retry By default, qui waits about **2 minutes** between reannounce attempts for the same torrent. This duration acts as a per-torrent cooldown between scans. If you enable **Quick Retry**, qui uses the **Retry Interval** (default 7s) as the cooldown instead. Stalled torrents then recover faster. The **Retry Interval** controls the spacing of retries inside each scan attempt. If you enable **Quick Retry**, it also controls the cooldown between scans. Quick Retry helps on trackers that register new uploads slowly. Some sites need time before they recognize a new torrent, which causes initial stalls. ### Activity log If you want to view activity: 1. Open **Automations**, select the **Reannounce** section, and find your instance in the **Reannounce** card. 2. Expand the instance row, click **Configure**, then select the **Activity Log** tab. The log displays a real-time feed of every checked torrent. It shows whether qui succeeded, failed, or skipped the reannounce, for example because the tracker already works. --- ## qBittorrent reverse proxy for Sonarr, Radarr, and autobrr ## Reverse proxy for external applications qui includes a built-in reverse proxy. External applications such as autobrr, Sonarr, and Radarr connect to your qBittorrent instances through it without qBittorrent credentials. ### How it works qui keeps a shared session with each qBittorrent instance and proxies requests from your external applications. The applications reuse the live session instead of logging in again. ### Setup instructions #### 1. Create a client API key 1. Open qui in your browser. 2. Go to **Settings → Client Proxy**. 3. Click **Create Client API Key**. 4. Enter a name for the client (for example, "Sonarr"). 5. Select the qBittorrent instance that you want to proxy. 6. Click **Create Client API Key**. 7. Copy the generated proxy URL now. qui shows it only once. The **Client Proxy** page lists every key with its client name, instance, creation date, and last-used date. #### 2. Configure your external application Use qui as the qBittorrent host with the proxy URL format: **Complete URL example:** ```text http://localhost:7476/proxy/abc123def456ghi789jkl012mno345pqr678stu901vwx234yz ``` ### Application-specific setup #### Sonarr / Radarr 1. Go to `Settings → Download Clients`. 2. Select `Show Advanced`. 3. Add a new **qBittorrent** client. 4. Set the host and port of qui. 5. Set URL Base to the `/proxy/...` path. If you use a custom base URL, include it (for example, `/qui/`). 6. Click **Test**. If the test succeeds, click **Save**. #### autobrr 1. Open `Settings → Download Clients`. 2. Add **qBittorrent** (or edit an existing client). 3. Enter the full URL, for example: `http://localhost:7476/proxy/abc123def456ghi789jkl012mno345pqr678stu901vwx234yz` 4. Leave username and password blank and click **Test**. 5. Leave basic auth blank. qui handles authentication. If you use cross-seed integration with autobrr, see the [Cross-Seed](./cross-seed/autobrr.md) section. #### cross-seed 1. Open the cross-seed configuration file. 2. Add or edit the `torrentClients` section. 3. Append the full URL as the documentation describes: ```js torrentClients: ["qbittorrent:http://localhost:7476/proxy/abc123def456ghi789jkl012mno345pqr678stu901vwx234yz"], ``` 4. Save the configuration file and restart cross-seed. #### Upload Assistant 1. Open the Upload Assistant configuration file. 2. Add or edit `qui_proxy_url` under the qBitTorrent client settings. 3. Append the full URL, for example: `"qui_proxy_url": "http://localhost:7476/proxy/abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",` 4. Leave all other authentication settings unchanged. 5. Save the configuration file. ### Supported applications The reverse proxy works with any application that supports qBittorrent's Web API. ### Behind nginx or another proxy with basic auth If a reverse proxy in front of qui asks for basic auth, turn off basic auth for the `/proxy/` path. The proxy otherwise rejects requests from external applications before they reach qui. If you use nginx, add this location block. The example uses the base URL `/qui/` and the upstream name that swizzin creates. On swizzin, put the block in `/etc/nginx/apps/qui-proxy.conf` and replace `USERNAME` with your swizzin user. ```nginx location /qui/proxy/ { proxy_pass http://USERNAME.qui; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; auth_basic off; } ``` On the server that runs nginx, run `nginx -t && systemctl reload nginx`. ### Security features - **API key authentication**: each client needs its own key. - **Instance isolation**: a key grants access to one qBittorrent instance. - **Usage tracking**: qui records when clients last access each key. - **Revocation**: delete a key to remove access. - **No credential exposure**: qBittorrent passwords never leave qui. ### Intercepted endpoints The proxy intercepts some qBittorrent API endpoints to improve performance and add qui-specific behavior. qui forwards most requests unchanged to qBittorrent. #### Read operations (served from qui) qui serves these endpoints from its sync manager for faster responses: | Endpoint | Description | |----------|-------------| | `/api/v2/torrents/info` | Torrent list with standard qBittorrent filtering | | `/api/v2/torrents/search` | Torrent list with fuzzy search (qui-specific) | | `/api/v2/torrents/categories` | Category list from synchronized data | | `/api/v2/torrents/tags` | Tag list from synchronized data | | `/api/v2/torrents/properties` | Torrent properties | | `/api/v2/torrents/trackers` | Torrent trackers, with icon discovery | | `/api/v2/torrents/files` | Torrent file list | | `/api/v2/torrents/mediainfo` | MediaInfo report for a file on disk (qui-specific, needs **Local Filesystem Access**) | These endpoints proxy to qBittorrent and update qui's local state: | Endpoint | Description | |----------|-------------| | `/api/v2/sync/maindata` | Full sync data (updates qui's cache) | | `/api/v2/sync/torrentPeers` | Peer data (updates qui's peer state) | #### Write operations | Endpoint | Behavior | |----------|----------| | `/api/v2/auth/login` | If the instance is healthy, returns success as a no-op | | `/api/v2/torrents/reannounce` | If tracker monitoring is enabled, routes to qui's reannounce service | | `/api/v2/torrents/setLocation` | Forwards to qBittorrent, invalidates the file cache, removes leftover folders | | `/api/v2/torrents/renameFile` | Forwards to qBittorrent, invalidates the file cache | | `/api/v2/torrents/renameFolder` | Forwards to qBittorrent, invalidates the file cache | | `/api/v2/torrents/delete` | Forwards to qBittorrent, invalidates the file cache, removes leftover folders when files are deleted | | `/api/v2/torrents/setCategory` | Forwards to qBittorrent unchanged, removes leftover folders | | `/api/v2/torrents/setAutoManagement` | Forwards to qBittorrent unchanged, removes leftover folders when it turns ATM on | | `/api/v2/torrents/editCategory` | Forwards to qBittorrent unchanged, removes leftover folders | | `/api/v2/torrents/setSavePath` | Forwards to qBittorrent unchanged, removes leftover folders | | `/api/v2/torrents/setDownloadPath` | Forwards to qBittorrent unchanged, removes leftover folders | qui removes leftover folders only after qBittorrent answers with success, only on an instance with **Local Filesystem Access**, and only for a request sent as a URL-encoded form. See [Deleting and moving torrents](./torrent-management.md#deleting-and-moving-torrents). qui forwards all other endpoints unchanged to qBittorrent. --- ## qBittorrent RSS feeds and auto-download rules ## RSS The RSS page manages the native RSS system inside qBittorrent. You can add feeds, organize them in folders, read articles, and create auto-download rules. qui writes all changes to qBittorrent, so they also apply in the qBittorrent WebUI. Select an instance at the top of the page. The page shows the feeds and rules for that instance only. :::note This page is not the cross-seed RSS automation. For automatic cross-seeding from indexer RSS feeds, see [Cross-Seed](./cross-seed/overview.md). ::: If you disable RSS fetching or auto-downloading in qBittorrent, qui shows a warning banner. Click **Enable RSS** or **Enable Auto-Download** in the banner to turn the function on. ### Feeds The **Feeds** tab shows your feeds in a tree on the left and the articles of the selected feed on the right. Folders show their unread count, or the number of feeds inside when nothing is unread. **Refresh All** triggers a refresh of every feed. While the tab is open, qui streams feed updates live and shows the connection state in a status badge. #### Add a feed 1. Click **Add Feed**. 2. Enter the feed URL. The URL must start with `http://` or `https://`. 3. If you want to place the feed in a folder, select one from the **Folder** list. 4. Click **Add Feed**. :::note qBittorrent adds each new feed to the root first. qui then moves the feed into the selected folder. If the move fails, the feed stays in the root and qui shows a warning. ::: #### Folders Click **Add Folder** to create a folder. If you want to nest folders, put a backslash in the folder path, for example `Shows\Anime`. #### Feed actions Each feed in the tree has a menu with these actions: | Action | What it does | |--------|--------------| | Refresh | Triggers a refresh of this feed | | Rename | Renames the feed or folder | | Edit URL | Changes the feed URL and keeps the feed | | Open URL | Opens the feed URL in a new browser tab | | Remove | Deletes the feed from qBittorrent | :::note **Edit URL** needs qBittorrent Web API 2.9.1 or later. qui hides the action on older versions. ::: #### Articles The articles panel lists the articles of the selected feed, newest first. The search box filters articles by title and description. Expand an article to read its description. Each article has these actions: - **Download torrent** opens the Add Torrent dialog and fills in the torrent URL. - **Open link** opens the article link in a new browser tab. - **Mark as read** clears the unread state of one article. **Mark all as read** clears the whole feed. ### Auto-download rules The **Rules** tab lists the auto-download rules of the instance. qBittorrent matches enabled rules against new articles and downloads matching torrents. Each rule row has a toggle to enable or disable the rule, and shows a filter summary, category, and target feed count. #### Rule configuration Click **Add Rule** to create a rule, or click the pencil icon to edit one. A rule has these fields: | Field | Description | |-------|-------------| | Rule Name | Required. The name qBittorrent stores the rule under. You cannot change it after you create the rule. | | Must Contain | Text the article title must include, for example `keyword1\|keyword2` | | Must Not Contain | Text that excludes an article | | Episode Filter | Season and episode ranges in the format `S01-S03;E01-E10` | | Use Regex | Treats the contain filters as regular expressions | | Smart Episode Filter | Tracks matched episodes and skips repeated downloads of the same episode | | Affected Feeds | The feeds the rule applies to | | Save Path | Save location for matched torrents | | Category | Category for matched torrents | | Tags | Tags for matched torrents | | Ignore subsequent matches for | Days to ignore new matches after a match, default 0 | | Torrent Content Layout | Original, create subfolder, no subfolder, or the global qBittorrent value | | Add Stopped | Adds matched torrents in the stopped state, or uses the global value | If a rule matched before, the edit dialog shows the **Last Match** date. #### Preview matching articles Click the magnifier icon on a rule to open **Matching Articles**. The panel groups matching article titles by feed. If you want to test a filter before you enable the rule, use this preview. #### Reprocess rules Click **Reprocess** to check all unread articles against all rules again. If you create or edit a rule, use this action so qBittorrent evaluates articles that arrived before the change. ### RSS settings The gear button next to the instance selector opens the settings dialog of the instance on the **RSS** tab. The tab has these settings: | Section | Setting | Description | |---------|---------|-------------| | RSS reader | Enable RSS | Turns RSS feed fetching on or off | | RSS reader | Refresh interval | Minutes between automatic feed refreshes | | RSS reader | Same host request delay | Seconds between two requests to the same host | | RSS reader | Max articles per feed | Number of articles that qBittorrent keeps for each feed | | RSS torrent auto downloader | Auto-Download | Turns the auto-download rules on or off | | RSS smart episode filter | Download REPACK/PROPER | Also downloads the REPACK and PROPER versions of matched episodes | | RSS smart episode filter | Episode filters | Regular expressions, one per line, that find the season and the episode number in an article title | You can change the refresh interval, the request delay, and the article limit only while RSS is on. These values are qBittorrent preferences. A change applies to the whole instance. [Instance settings](./instance-settings.md#rss) describes the other tabs of the dialog. --- ## Search Torznab indexers from qui ## Search The Search page queries your Torznab indexers and displays the combined results in one table. From there you can send any result to a qBittorrent instance, download the `.torrent` file, or open the release page on the indexer. qui supports indexers from Prowlarr, Jackett, and native tracker endpoints. ### Add indexers Manage indexers under **Settings > Indexers**. Click **Discover** to import indexers from Prowlarr or Jackett in one step. Enter the server URL and API key, click **Discover**, and select the indexers to import. qui saves the connection, so future imports from the same server do not ask for the API key again. Click **Add single** to add one indexer by hand. The indexer timeout sets how long qui waits for a reply from that indexer (30 seconds by default). A search can run for at least as long as the longest timeout of the indexers you selected. Time spent waiting in the queue for a free slot or a rate limit does not count. If you cancel the search, it stops sooner. Each indexer row has actions to test the connection and to sync its capabilities (the categories and search modes the indexer reports). ### Run a search 1. Open **Search** and pick a search type: **Movies** (the default), **TV**, **Music**, **Books & comics**, **Apps & games**, or **Adult**. The search type sets the Torznab categories that qui sends to the indexers. 2. Enter a query. qui recognizes IMDb IDs (`tt1234567`) and TVDb IDs (`tvdb 123456`) inside the query and sends them as ID parameters. 3. Click **Search**. By default, qui selects all enabled indexers. Click the **Indexers** button to open the selection sheet and narrow the search to specific indexers. When you focus the query field, qui suggests recent searches. Click a suggestion to restore the query, the search type, and the indexer selection, and run it again. #### Advanced parameters Click **Advanced** to send extra Torznab parameters. A search with advanced parameters does not need a query. | Parameter | Purpose | |-----------|---------| | IMDb ID | Search by IMDb ID, for example `tt1234567` | | TVDb ID | Search by TVDb ID | | Year | Release year | | Season | Season number | | Episode | Episode number | | Artist | Music artist | | Album | Music album | | Limit | Maximum results in the response. qui also sends it to each indexer | | Offset | Skip this many results | ### Results Results appear in a table with the columns Title, Indexer, Size, Seeders, Category, Source, Collection, Group, Freeleech, and Published. By default, the table sorts by seeders. Click a column header to change the sort. The filter box narrows the visible results by title, indexer, category, source, collection, or group. Column filters provide per-column matching and include a freeleech filter for free and partial-discount results. ### Send a result to an instance Pick a target instance from the instance selector at the top of the page. qui remembers the choice for the current browser tab. Select a result row, then click **Add to (instance name)**. The add-torrent dialog opens with the download URL prefilled. You can set the category, tags, and save path before you add the torrent. The dropdown next to the button adds the result to a different instance. Each row also has two direct actions: - **Download .torrent** opens the download URL in a new tab. - **View details** opens the release page on the indexer in a new tab. ### Search cache qui caches search results to reduce indexer load. A badge above the results shows where they came from: **Cache hit**, **Live fetch**, or **Cache + live** for a mix. The **Refresh from indexers** button repeats the search and bypasses the cache. A confirmation dialog warns you first, and the button locks for 30 seconds after each refresh. :::note A cache bypass sends the request directly to every selected indexer. Use it sparingly to avoid rate limits. ::: **Settings > Search Cache** shows cache statistics and holds the cache configuration. | Item | Description | |------|-------------| | Entries | Number of cached searches | | Hit Count | Total cache hits | | Approx. Size | Approximate size of the cached data | | TTL | Current cache lifetime | | Newest Entry | Time of the most recent cached search | | Last Used | Time of the most recent cache hit | Set **Cache TTL (minutes)** to control how long results stay cached. The minimum is 1440 minutes (24 hours). Higher values reduce indexer load. ### Search history and activity **Settings > Indexers** shows two live panels above the indexer list. **Search History** lists the last 50 searches across all sources, such as cross-seed and RSS searches. Each entry shows the indexer, the query, the result count, the duration, and a status: success, failed, skipped, or rate limited. Click an entry to view the full details, such as the exact Torznab parameters and any error message. **Scheduler Activity** shows the search scheduler in real time: active searches, queued searches, worker usage, and indexers in a rate-limit cooldown with the time until they are ready again. ### Sonarr and Radarr integrations **Settings > Integrations** holds your Sonarr and Radarr instances. qui queries them to resolve external IDs, which improves cross-seed searches on indexers that support ID lookups. Enter the base URL and the API key (found in **Settings > General** in Sonarr or Radarr). If you run several instances, set a priority. qui queries higher priority instances first. Cross-seed uses the same indexers as the Search page. Cross-seed and directory scan searches use the Sonarr and Radarr integrations. The Search page does not. See [Cross-Seed](./cross-seed/overview.md) for details. --- ## Manage torrents in qui ## Torrent Management qui provides tools to manage torrent lists: tags, categories, tracker URLs, saved filter views, keyboard control, table columns, a torrent creator, `.torrent` export, MediaInfo, and BDInfo Disc reports. For queue, speed, and share limits, see [qBittorrent Preferences](./instance-settings.md#qbittorrent-preferences). ### Deleting and moving torrents When a delete reaches 10 torrents or more, or when Ctrl/Cmd + A selected all torrents, the delete dialog names the first three torrents and gives the number of the others. The **Delete** button shows the count, for example **Delete 7500 torrents**. After Ctrl/Cmd + A, the dialog also tells you that select all is on, and how many of the selected torrents are not loaded in the table. qBittorrent removes a torrent's own folder when you delete it with its files, but not the folders above it, and a move leaves the old folder behind. On an instance with **Local Filesystem Access**, qui removes these leftover folders after it deletes a torrent with its files, changes its location, changes its category, turns on Automatic Torrent Management, or changes a category's save path. This covers the qui UI, automations, and requests from Sonarr, Radarr, autobrr, and other clients that go through the [reverse proxy](./reverse-proxy.md), when the request is sent as a URL-encoded form. There is no setting. qui removes a folder only when it is empty, or holds nothing but `Thumbs.db`, `desktop.ini`, `.directory`, `.DS_Store`, or files whose names end in `~`. It starts at the torrent's own folder and works up, one empty folder at a time. It stops at: - the default save path, the download path, a category folder, a category's download folder, and the hardlink base directory. A category's download folder is the folder that qBittorrent downloads the category into. On qBittorrent 5.0 and later, a category with no download path setting takes the setting of its parent category. If that path is empty, the folder is named after the category, in the parent's download folder or in the download path. qui never removes these; - a folder qBittorrent monitors for `.torrent` files, and the save path set for it. qui never removes these either; - a folder that holds any other file, such as subtitles or an `.nfo` you added. A symlink, a Windows junction, or another special file counts as a file even when its name is on the list above; - a folder under your [orphan scan ignore paths](./orphan-scan.md), even with orphan scan off; - the save path or content path of a torrent still in the instance, or a folder above one; - a symlink or a Windows junction. When the save path is not inside a folder from the first item in this list, qui never goes above the torrent's save path, and never removes the save path itself. For an incomplete torrent in its own download path, the same holds for that download path. A monitored folder and the save path set for it are never removed, but they do not limit how far up qui goes. When qBittorrent adds a torrent from a subfolder of a monitored folder, it saves the torrent to a subfolder of the same name wherever that monitored folder saves, and qui can remove that subfolder once it is empty if it sits inside one of the folders from the first item, which is always the case with **Default save location**. qui waits up to two minutes for qBittorrent to finish deleting or moving the files, and for the torrent to leave the instance after a delete or show its new content path after a move. When files are still there after two minutes, such as an `.nfo` you added in one of the torrent's subfolders, and the torrent has left the instance or moved, qui removes the torrent's folders that are empty and keeps the rest. This needs qBittorrent to answer a sync just before the two minutes are up. Otherwise the folders are left to orphan scan. A torrent that turns out not to be deleted or moved keeps its folder. Anything still there after a move to another disk that takes longer, or in a folder qui could not read, is left to [orphan scan](./orphan-scan.md#abandoned-directories). If the content was already missing before the delete or move, for example because a disk was not mounted, qui leaves the folder alone. Before it sends a delete or move, qui checks the content for at most 5 seconds for a request that comes through the reverse proxy, and for at most 30 seconds for one from the qui UI or an automation, even when a disk or network mount stops answering. Content it has not checked by then is left to orphan scan. qui does not clean up after a delete made in the qBittorrent WebUI, by qBittorrent's share limits, or by a client that talks to qBittorrent directly. Orphan scan's **Delete Abandoned Directories** covers those. ### Tags and categories Manage tags and categories from the **Tags** and **Categories** sections in the filter sidebar. Click **Create tag** or **Create category** at the top of a section. Open the context menu on a tag or category for the other actions. - **Create tag** adds one tag to the instance. - **Delete Tag** removes a tag from the instance. - **Delete unused tags** lists every tag with zero torrents and removes them in one step. - **Create category** adds a category with an optional save path. - **Create Subcategory** adds a child category. The dialog pre-fills the name with `parent/`. - **Edit Category** changes the save path of a category. The name stays fixed. - **Delete Category** removes one category. - **Remove Empty Categories** lists every category with zero torrents and removes them in one step. #### Subcategories qBittorrent stores a subcategory as a name with `/` separators, for example `media/movies`. qui shows the categories as a collapsible tree sorted by name when the instance supports subcategories (qBittorrent WebUI API 2.9.0 or newer). The qBittorrent preference **Enable Subcategories** (Instance Preferences > Files) must also be on. From WebUI API 2.15.0, subcategories are always on. In other cases, qui shows a flat list. ### Exclude a filter Click a status, category, tag, or tracker in the filter sidebar to show only the torrents that match it. Ctrl+click the same item (Cmd+click on macOS) to exclude it instead. The list then shows the torrents that do not match. On a touch screen, press and hold the item for the same result. Click it again to clear the exclusion. ### Clear filters Click **Clear filters** at the top of the filter sidebar to remove sidebar and column filters. The button appears when either group has active filters. Search text and sorting stay unchanged. Open the arrow menu beside the button for these actions: - **Clear sidebar filters** keeps column filters and search text. - **Clear column filters** keeps sidebar filters and search text. - **Clear filters and search** removes both filter groups and search text. Each action keeps the current sort order. The table toolbar's clear button removes column filters only. ### Change a tracker URL Use this when a tracker resets your passkey or changes its announce address. 1. In the **Trackers** section of the filter sidebar, open the context menu on the tracker. 2. Click **Edit tracker URL**. If the entry groups more than one domain, select the domain. 3. Check **Current Full Tracker URL**. On qBittorrent 5.1 or newer, qui fills it in from your torrents. If your torrents use more than one URL for this tracker, select the one to replace. On older versions, enter the complete current URL yourself. 4. Enter the complete new URL, with the new passkey, in **New Full Tracker URL**. 5. Click **Update Tracker**. qui replaces the URL on every torrent of the instance that has exactly the current URL. To change the URL of one torrent only, open the **Trackers** tab in its details panel and open the context menu on the tracker. On qBittorrent 5.1 or newer, if the tracker has `http://` URLs, the dialog also shows **Convert all HTTP to HTTPS**, which changes them to `https://`. The menu entry is gray when the instance is read-only or qBittorrent is older than 4.1.5. :::warning If an automation removes unregistered torrents, disable it before you change the URL. Until the tracker accepts the new passkey, qBittorrent can report every torrent of that tracker as unregistered, and the automation then removes all of them. Enable the automation again when the torrents show a working tracker status. ::: ### Saved filter views The **Views** section in the filter sidebar saves the current filter selection as a named view. 1. Select filters in the sidebar. 2. Click **Save current filters**. 3. Enter a name and click **Save**. Click a saved view to apply its filters. qui highlights the active view. Each view has a menu with three actions: - **Update filters** overwrites the view with the current sidebar selection. The confirmation toast has an **Undo** action that restores the previous filters. - **Rename** changes the name of the view. - **Delete** removes the view. A view stores the sidebar filter selection only. It does not include search text, sorting, or column filters. Names must be unique and have a limit of 100 characters. ### Selection and keyboard control | Input | Action | |-------|--------| | Click | Selects only the row and opens the details panel. Other selected rows become unselected, also after Ctrl/Cmd + A. If the row is the only selected row and its details panel is open, the click closes the panel and clears the selection. | | Right-click | Opens the context menu. If the row is selected, the menu acts on all selected rows. If the row is not selected, qui selects only that row, and the menu acts on that row. | | Ctrl/Cmd + click | Toggles selection of the row | | Shift + click | Selects the range from the last selected row | | Ctrl/Cmd + A | Selects all torrents in the current view | | Arrow Up / Arrow Down | Moves the selection one row | | Enter | Opens the details panel for the focused row | | Escape | Closes the details panel and clears the selection | The arrow keys replace the selection with the focused row, the same as a plain click. When the details panel is open, it follows the arrow keys. If you type in an input field or open a dialog, hotkeys are inactive. ### Table columns **Toggle columns** in the table toolbar shows or hides columns. Drag the handle next to a column in that menu to change its position, or drag a column header directly. Drag the edge of a column header to change the width of that column. The button next to **Toggle columns** decides how the Name column gets its width. Stretch mode is the default. In stretch mode, the Name column takes the width that the other columns leave, so the table fills the window. You cannot resize the Name column in stretch mode. In scroll mode, you set the width of the Name column, and the table scrolls sideways when the columns do not fit. If the visible columns leave no room for the Name column, qui scrolls anyway and the button turns gray until you hide a column. qui remembers the choice for each instance. ### Live updates paused While the torrent table is open, qui asks qBittorrent for changes every 2 seconds. qBittorrent answers these requests on the same thread that runs its torrents. If that thread is busy, the answer waits. If qBittorrent does not answer in time, the status bar under the table shows **Live updates paused**. qui keeps the last data on screen and tries again. To see the reason and the age of the data, put the pointer on the status. If the reason is that qBittorrent did not answer in time, look for these causes: - qBittorrent is not running, or its host does not answer. Make sure that the qBittorrent WebUI opens. - qBittorrent checks or moves torrents. The live updates return when the check or the move ends. - Other apps send many requests to the same qBittorrent, for example a second web UI or a tool that lists all torrents. - The torrent data is on network storage (NFS, SMB, or an rclone mount) and qBittorrent uses libtorrent 2.0. qBittorrent issue reports show that qBittorrent can stop answering in this setup. In qBittorrent, set **Advanced > Disk IO type** to **Simple pread/pwrite**, or use a qBittorrent build with libtorrent 1.2. - You run qBittorrent 5.2.x. An [open qBittorrent issue](https://github.com/qbittorrent/qBittorrent/issues/25068) reports that 5.2.x keeps one thread at 100% CPU and stops answering, and that 5.1.4 works with the same setup. A large library makes the first update after qui connects slower. If none of the causes above applies, split the torrents over two or more qBittorrent instances. The [Export to Instance](./automations.md#export-to-instance) action adds torrents to the new instance. The torrent data must already be on the new instance. The action does not remove the torrents from the old instance. After the torrents seed on the new instance, remove them from the old instance. If both instances use the same files, keep the files when you remove the torrents. The new instance needs them. ### Torrent creator The **Create torrent** button opens the creator dialog. On desktop it is in the header. On phones it is the **Create** button in the bottom bar. It creates a new `.torrent` file from a file or folder on the qBittorrent server. The button appears only when the instance supports torrent creation, which requires qBittorrent 5.0 or newer (WebUI API 2.11.2). | Field | Description | Default | |-------|-------------|---------| | Source Path | Full path to a file or folder on the qBittorrent server. Folders and files appear as suggestions while you type. | Required | | Private torrent | Disables DHT, PEX, and local peer discovery | On | | Trackers | Pick from active trackers or enter one URL per line | - | | Comment | Free-text comment stored in the torrent | - | | Source | Source field stored in the torrent | - | | Add to qBittorrent | Adds the created torrent and starts seeding. When off, qui only creates the file for download. | On | | Torrent Format | `v1 (Compatible)`, `v2 (Modern)`, or `Hybrid (v1 + v2)` | v1 | | Piece Size | Piece size for the torrent | Auto | | Save .torrent to (optional) | Full file path on the server for the created file. A directory alone is invalid. | - | | Web Seeds (HTTP/HTTPS) | URLs where clients download content, one per line | - | The last four fields are under **Advanced Options**. :::note Hybrid and v2 formats require a qBittorrent build with libtorrent 2. On a libtorrent 1.x build, qui creates v1 torrents only. ::: #### Creation tasks The **Torrent Creation Tasks** list in the header shows every creation job with its status: Queued, Running, Finished, or Failed. Running tasks show a progress bar. While tasks run, the list refreshes every 2 seconds. From a finished task, you can download the `.torrent` file or delete the task. If the download fails with the qBittorrent option **Delete .torrent files afterwards** enabled, see [Troubleshooting](../advanced/compatibility.md#download-of-a-created-torrent-fails-with-failed-to-download-torrent-file). ### Torrent export **Export Torrent** in the torrent context menu downloads the `.torrent` file for the selected torrent. With multiple torrents selected, the action reads **Export Torrents (N)**. Export requires qBittorrent WebUI API 2.8.11 or newer. Up to 10 torrents download as individual files. Larger selections download as one `qui-torrents.zip` archive. Inside the archive, qui groups files into folders by category. qui places torrents without a category into `Uncategorized`. When the selection spans multiple instances, each instance gets its own top-level folder. If some torrents fail to export, the archive still downloads. An `export-errors.txt` file inside the archive lists the failures. ### Content tab sorting The **Content** tab of the details panel shows the files of a torrent as a folder tree. Click a column header (**Name**, **Progress**, **Size**, or **Priority**) to sort the rows by that column. Click the same header again to reverse the direction. The narrow layout shows the same four choices as a row of buttons above the file list. Folders always stay above files. A folder sorts by the total of its files. The **Priority** column appears only when the instance supports per-file priority. The sort resets to **Name** when you reload the page. ### MediaInfo The **Content** tab of the details panel offers a **MediaInfo** action on each file. It analyzes the file on disk and opens a dialog with two tabs: **Summary** and **Raw JSON**. **Copy Summary** and **Copy JSON** copy the report to the clipboard. Because qui reads the file from disk, MediaInfo requires the instance option **Local Filesystem Access**. See [Instance Settings](./instance-settings.md#local-filesystem-access). ### BDInfo The **Content** tab offers a **BDInfo** action on each Disc in a torrent. A Disc is a folder that holds a `BDMV` folder, or an `.iso` file. A box set gets one action per Disc. DVD folders (`VIDEO_TS`) are not supported. The first click starts a scan with [go-bdinfo](https://github.com/autobrr/go-bdinfo) and opens a dialog. The scan runs in the background, so you can close the dialog or leave the page. qui shows a toast when the scan finishes. Scans run one at a time in the order you start them. The dialog shows the queue position of a waiting scan, the progress of a running scan, and a **Cancel scan** button for both. A finished scan opens a dialog with two tabs: **Quick Summary** and **Forum**. The Forum tab holds the BBCode block for tracker upload forms. Each tab has a copy button. The report covers the main playlist only. qui keeps the report, so a second visit to the same Disc opens it at once. Two torrents on one instance that point at the same Disc share one report. **Rescan** replaces the stored report with a new scan. A scan that was running when qui restarted shows as failed; use **Rescan** to run it again. Because qui reads the Disc from disk, BDInfo requires the instance option **Local Filesystem Access**. See [Instance Settings](./instance-settings.md#local-filesystem-access). --- ## Tracker display names ## Tracker customizations qui identifies trackers by their announce domain (`tracker.example.com`). A tracker customization maps one or more domains to a friendly display name (`MyTracker`). qui then shows the display name in place of the raw domain. Display names apply across all your instances. You configure them once. ### Where to find it Tracker customizations live on the **Dashboard**, in the **Tracker Breakdown** section. There is no Settings page for them. Expand **Tracker Breakdown** to see the table of trackers. The rename, merge, edit, and delete actions are the row actions in that table. ### Rename a tracker 1. Open the **Dashboard** and expand **Tracker Breakdown**. 2. Hover the tracker row. If you are on mobile, tap the row to open its drawer. 3. Click the pencil icon (**Rename**). 4. Enter a **Display Name** and save. ### Merge trackers If a tracker announces on several domains, you can combine the domains into a single entry: 1. Tick the checkbox on each tracker row that you want to combine. 2. Click the link icon on one of the selected rows (**Add to merge**). 3. Enter the **Display Name** for the merged entry and save. The merge dialog marks the first domain **Primary**. Its torrents always count toward the group's Dashboard statistics. The other domains start unticked and do not count until you tick them. That default avoids double-counting. Trackers often announce the same torrents on several domains. If every domain counts, the same torrents count twice and inflate your upload and ratio figures. If a domain holds torrents that the primary domain does not, tick that domain. If you want to add another domain to an existing group later, select the domain and click the link icon on the group's row. ### Edit or delete Rows that already have a customization show a pencil (**Edit**) and a trash icon (**Delete**) on hover. If you delete a customization, those trackers revert to their raw domains. ### Import and export The **Tracker Breakdown** header has import and export buttons. **Export** copies all customizations to the clipboard as JSON. **Import** accepts the same JSON and reports new entries, conflicts, and unchanged entries before it applies them. For each conflict, you choose **Skip** or **Overwrite**. ```json { "comment": "qui tracker customizations for Dashboard", "trackerCustomizations": [ { "displayName": "MyTracker", "domains": ["tracker.example.com", "tracker2.example.com"], "includedInStats": ["tracker2.example.com"] } ] } ``` The first entry in `domains` is the primary domain and always counts toward Dashboard statistics. `includedInStats` is optional and lists the other domains that you also want to count. If you leave it out, only the primary domain counts. ### Where display names are used - **Dashboard** statistics and tracker breakdown. - **[Automations](./automations.md)**: the **Tracker** condition matches your display name as well as the raw URL or domain, tag actions can tag torrents with it, and Move and Export to Instance save paths can use it with `{{.Tracker}}`. - **[Cross-seed link directories](./cross-seed/link-directories.md)**: the `by-tracker` preset uses the display name for folder names. --- ## Tracker icons for qBittorrent torrents in qui ## Tracker icons qui shows the icon next to the tracker domain, or next to its [display name](./tracker-customizations.md) if you configured one. qui stores cached icons in your data directory under `tracker-icons/`. If you use the default SQLite engine, this directory sits next to `qui.db`. If you use Postgres, qui uses the same data directory. qui stores icons as 16×16 PNGs and rejects source images larger than 1024×1024. qui downloads a favicon the first time it sees a tracker host and caches it for future sessions. If a download fails, qui waits 30 minutes before it tries that host again. Each failure after that doubles the wait, up to 24 hours. qui records these failures in `tracker-icons/fetch-failures.json`, so a restart does not probe every failed host again. If the host name does not resolve, qui does not try the parent domains or the `www.` alias for that host. qui downloads icons only from addresses on the public internet. It does not connect to private, loopback, link-local, or carrier-grade NAT addresses (`100.64.0.0/10`, which Tailscale also uses). It also does not connect to the other address ranges that IANA reserves for special use, for example `198.18.0.0/15`. This stops a torrent from making qui send requests into your network. If a tracker runs on your local network, qui cannot download its icon, so [add that icon manually](#add-icons-manually). If you set `HTTP_PROXY` or `HTTPS_PROXY`, qui connects to that proxy even when it is on your local network. The proxy connects to the icon address, so qui looks up that address first and refuses a private one. A DNS server that gives qui and the proxy different answers can get past this check. If you want to disable these network fetches, set `trackerIconsFetchEnabled = false` in `config.toml` (or `QUI__TRACKER_ICONS_FETCH_ENABLED=false`). The same setting stops the peer client logo downloads for the Peers tab. qui applies a change at once, with no restart. ### Peer client logos The Peers tab shows a logo next to the client of each peer. qui does not ship the logo files. The first time a peer of a client shows, the qui server downloads that logo from the upstream repository of the client. It keeps the file in the `peer-client-icons/` directory. Each address points to one fixed commit, and qui discards a file whose SHA-256 hash is not the expected hash. If a download fails, qui tries again after 30 minutes. It doubles the wait after each failure, up to 24 hours. If no logo is available, the row shows the first letter of the client name. A logo shows the client that the peer says it runs, and a peer can send any client name. ### Add icons manually Copy PNGs named after each tracker host (for example, `tracker.example.com.png`) into the `tracker-icons/` directory. qui serves the files as-is, so trim and resize them yourself. If icons match the built-in size (16×16), they stay crisp and avoid extra scaling. ### Preload a bundle of icons If you have a library of icons, preload them with a mapping file in `tracker-icons/`. qui accepts the first of these file names that it finds: `preload.json`, `preload.js`, `tracker-icons.json`, `tracker-icons.js`, `tracker-icons.txt`. #### Format Use a plain JSON object or export a snippet as `const trackerIcons = { ... };`. - Keys must be the real tracker hostnames (for example, `tracker.example.org`) - If you include a `www.*` host and the bare hostname lacks an icon, qui mirrors the icon to the bare hostname - On startup, qui decodes each data URL, normalizes the image to 16×16, and writes the PNG to `.png` - qui skips a host that already has a `.png`. To make the preload write it again, delete the old file #### JSON example ```json { "tracker.example.org": "data:image/png;base64,AAA...", "www.tracker.org": "data:image/png;base64,BBB..." } ``` #### JavaScript example ```js const trackerIcons = { "tracker.example.org": "data:image/png;base64,CCC...", "www.tracker.org": "data:image/png;base64,DDD..." }; ``` #### Community resources See [Audionut/add-trackers](https://github.com/Audionut/add-trackers/blob/8db05c0e822f9b3afa46ca784644c4e7e400c92b/ptp-add-filter-all-releases-anut.js#L768) for an example icon bundle. --- ## Run qui in Docker with docker compose ## Docker ### Docker Compose {DockerCompose} ```bash docker compose up -d ``` ### Docker Compose (Postgres) {DockerComposePostgres} ```bash docker compose -f docker-compose.postgres.yml up -d ``` ### Standalone ```bash docker run -d \ -p 7476:7476 \ -v $(pwd)/config:/config \ ghcr.io/autobrr/qui:latest ``` ### macOS container On macOS, [Apple Container](https://github.com/apple/container/releases) runs the same image. Create the host folders first, then use `container` in place of `docker`: ```bash container run -d \ -p 7476:7476 \ -v $(pwd)/config:/config \ ghcr.io/autobrr/qui:latest ``` ### Permissions By default, the container runs as root. You can run qui as a different user in two ways. Use one or the other, not both. With either method, qui needs write access to more than `/config`. Cross-seed hardlink and reflink mode create files in their base directory, and orphan scan deletes files from your scan paths. Those paths live on the data volumes (see [Local filesystem access](#local-filesystem-access)). Run qui as the user that owns that data, or as a member of its group. #### `user:` (standard Docker) Set `user:` in compose, or `--user` in docker run. Docker starts the container as that user. ```yaml title="docker-compose.yml" services: qui: image: ghcr.io/autobrr/qui:latest user: "1000:1000" volumes: - ./qui:/config ports: - "7476:7476" ``` If you use this method, make sure that the host folder mounted at `/config` is writable for that user: ```bash chown -R 1000:1000 ./qui ``` #### PUID/PGID (automatic ownership) Set both `PUID` and `PGID` environment variables. If you set only one variable, the container refuses to start. The entrypoint then: 1. Creates a user and a group with those IDs 2. Corrects the owner of every file under `/config` that does not match those IDs 3. Runs qui as that user The result matches `user:`, but the entrypoint corrects the ownership of `/config` for you. If `/config` still contains root-owned files from an earlier run, or if the host folder has the wrong owner, this fixes the ownership. ```yaml title="docker-compose.yml" services: qui: image: ghcr.io/autobrr/qui:latest environment: PUID: "1000" PGID: "1000" volumes: - ./qui:/config ports: - "7476:7476" ``` ```bash docker run -d \ -e PUID=1000 \ -e PGID=1000 \ -p 7476:7476 \ -v $(pwd)/config:/config \ ghcr.io/autobrr/qui:latest ``` :::note Do not combine `user:` with `PUID`/`PGID`. If the container does not start as root, the entrypoint cannot create users or change ownership. If you switch to `PUID`/`PGID`, remove any `user:` or `--user` setting first. ::: The entrypoint walks `/config` only, never your data volumes. As a result, a wrong `PUID` cannot chown your media library. A switch from root needs one manual step for the same reason. If qui already created hardlink or reflink trees as root, chown those directories once yourself: ```bash find /data/cross-seed -type d -exec chown 1000:1000 {} + ``` Chown the directories only. Hardlinked files share their inode with the source download. If you run a recursive `chown -R`, that command also changes the owner of your library files. qui needs write access to the directories only. #### UMASK Optional. The qui binary reads `UMASK` at startup and applies it to new files and directories, such as cross-seed hardlink and reflink trees. If the value is not valid octal in the range 000 to 777, qui logs a warning and keeps the inherited umask. The binary applies `UMASK`, not the entrypoint. As a result, `UMASK` works with both methods above. If you start a non-root container with `user:` or `--user`, `UMASK` also works. Common values: - `022`: owner read/write, group and others read-only (typical default) - `002`: owner and group read/write, others read-only (group-writable) - `077`: owner only, no access for group and others (private) Two exceptions: - Regardless of `UMASK`, qui always creates security-sensitive files (the database, `config.toml`, backup manifests) with owner-only mode (`0600`). - Hardlinked files share the inode with the source file. They keep the owner and permissions of the original download. See [Directory permissions and umask](../features/cross-seed/troubleshooting.md#directory-permissions-and-umask). ### Local filesystem access :::warning[Docker: Local Filesystem Access] Orphan scan, hardlinks, reflinks, and path-based automation rules require access to the same filesystem paths that qBittorrent uses. Mount the same paths that qBittorrent uses. The paths must match exactly: ```yaml volumes: - ./qui:/config - /data/torrents:/data/torrents # Must match qBittorrent's path ``` After you mount the paths, enable **Local Filesystem Access** on each instance in qui's Instance Settings. ::: ### Unraid The release workflow builds images for `linux/amd64`, `linux/arm64`, and ARM v6/v7, and publishes them to `ghcr.io/autobrr/qui`. The container runs on Unraid without extra steps. #### Deploy from the Docker tab 1. Open **Docker → Add Container** 2. Set **Name** to `qui` 3. Set **Repository** to `ghcr.io/autobrr/qui:latest` 4. Keep the default **Network Type** (`bridge` works for most setups) 5. Add a port mapping: **Host port** `7476` → **Container port** `7476` 6. Add a path mapping: **Container Path** `/config` → **Host Path** `/mnt/user/appdata/qui` 7. Enable **Advanced View** (top right) 8. Set **Icon URL** to `https://raw.githubusercontent.com/autobrr/qui/main/web/public/icon.png` 9. Set **WebUI** to `http://[IP]:[PORT:7476]` 10. Add environment variables `PUID` = `99` and `PGID` = `100`. The entrypoint then corrects the ownership of `/config` and runs qui as uid 99 (`nobody` on Unraid). If **Extra Parameters** contains `--user`, remove it first. If qui ran as root before, fix your data directories once (see [Permissions](#permissions)) 11. (Optional) add environment variables for advanced configuration (for example `QUI__BASE_URL`, `QUI__LOG_LEVEL`, `TZ`) 12. Click **Apply** to pull the image and start the container By default, the `/config` mount stores `config.toml`, logs, the tracker icon cache, and other runtime assets. If you use the default SQLite engine, qui stores `qui.db` there too. An absolute `logPath` or a custom `dataDir` moves those files. `config.toml` always stays in `/config` (see the [configuration reference](../configuration/reference.md)). Point the mount at your appdata share so your configuration survives upgrades. qui logs to stdout by default. Read the logs under **Docker → qui → Logs**. If you configure a relative log file path, qui writes it under `/config`. #### Updating - Pull a newer `latest` image with Unraid's **Check for Updates** action - If you pinned a version tag, edit the repository field to the new tag - Restart the container after the image update to load the new binary ### Updating ```bash docker compose pull && docker compose up -d ``` --- ## Install qui, the web UI for qBittorrent ## Installation ### Quick install (Linux x86_64) ```bash # Download and extract the latest release wget $(curl -s https://api.github.com/repos/autobrr/qui/releases/latest | grep browser_download_url | grep linux_x86_64 | cut -d\" -f4) ``` #### Unpack Extract the archive to `/usr/local/bin`: ```bash tar -C /usr/local/bin -xzf qui*.tar.gz qui ``` If the command fails with a permission error, run it again with `sudo`. If you do not have root, or you are on a shared system, extract qui to a directory in your home directory, for example `~/.bin`. ### Manual download Download the latest release for your platform from the [releases page](https://github.com/autobrr/qui/releases). Windows users should follow the [Windows guide](./windows.md). For containers, see the [Docker guide](./docker.md), and for shared seedboxes, the [seedbox installers](./seedbox-installers.md). On Linux or macOS, extract the archive: ```bash tar -xzf qui*.tar.gz qui ``` ### Run If you extracted the archive to `/usr/local/bin`, the binary is on your PATH: ```bash qui serve ``` If you extracted to `~/.bin` or downloaded the archive by hand, change to that directory first: ```bash chmod +x qui ./qui serve ``` The web interface is available at http://localhost:7476. To change the port or other settings, see [environment variables](../configuration/environment.md). ### Updating On Windows, follow [Updating](./windows.md#updating) in the Windows guide. #### Update from the web UI When a new release is available, click **Install update** in the update banner or in the **Update Status** row of **Settings → Application**. The dialog shows the current version, the new version, and a link to the release notes. After you confirm, qui downloads the release, checks its signature, replaces its binary, and restarts. The page reloads when qui is back. When a new release is available, qui shows **Install update** for every setup. If automatic installation is unavailable, the dialog explains why. It gives manual update steps and a link to the relevant guide. Automatic installation requires all of these conditions: - qui does not run in a container. To update a container, pull a new image. - The running version is a release build, not a local or develop build. - qui can write to the directory of its binary. If root owns that directory and qui runs as another user, use `sudo qui update`. - Update checks are on (`checkForUpdates`), and `disableSelfUpdate` is not `true`. See the [configuration reference](../configuration/reference.md). While qui checks update support, **Install update** is disabled. If the support check fails, open the dialog and click **Retry**. No update starts until the check succeeds and you confirm installation. If the update fails before qui replaces its binary, the dialog shows the error and qui keeps running on the old version. #### Update from the shell The `qui update` command downloads and installs the latest release: ```bash qui update ``` If you installed qui to `/usr/local/bin` with `sudo`, run `sudo qui update`. If the binary is not on your PATH, run `./qui update` from its directory. #### Roll back an update Both update methods keep the previous binary as `qui-v.bak` in the directory of the binary. Each update deletes older backups. The web UI shows the exact rollback command when qui does not answer 60 seconds after an update. The shell update prints it. To roll back, stop qui, move the backup back, and start qui again. Replace `1.30.0` with the version in the backup file name, and `/usr/local/bin` with the directory of your binary: ```bash mv "/usr/local/bin/qui-v1.30.0.bak" "/usr/local/bin/qui" ``` On Windows, follow [Roll back an update](./windows.md#roll-back-an-update) in the Windows guide. :::warning If you want a full rollback, back up the qui config directory before you update. A new version can migrate the database, which changes its structure. The old version cannot always read a migrated database, and a move of the backup binary does not undo a migration. ::: ### First setup 1. Open your browser at http://localhost:7476 2. Create your account 3. Add your qBittorrent instances 4. Manage your torrents Create the account before you expose qui to the Internet, and read [Sessions](../configuration/reference.md#sessions) before you put qui behind HTTPS. --- ## Move or migrate qui to a new server ## Move qui to a new server qui keeps its state in `qui.db` and `config.toml`. If you copy these files to the new host, qui starts there with the same instances, users, automations, and cross-seed configuration. You do not need a qBittorrent backup for this. `qui.db` is the SQLite database that holds this data. qui keeps it in the data directory. `config.toml` is the configuration file. It contains `sessionSecret`. qui makes the encryption key for stored passwords and API keys from that value. If you start with a new `config.toml`, qui cannot read those passwords and API keys. ### Find the files The config directory is the directory that contains the configuration file that qui uses. By default, it is: | Install | Config directory | | --- | --- | | Linux or macOS | `~/.config/qui/` | | Windows | `%APPDATA%\qui\` | | Docker | The host folder that you mount at `/config` | Three cases change this: - If you set `XDG_CONFIG_HOME`, the default is `$XDG_CONFIG_HOME/qui`. - If a `config.toml` is in the directory where you start qui, qui uses that file. - If you start qui with `--config-dir`, qui uses the path that you give. The path can be a directory that contains `config.toml`, or a `.toml` file with a different name. In the second case, copy that file. The data directory is the config directory, unless you set one of these: - The `dataDir` value in `config.toml` - The `QUI__DATA_DIR` environment variable - The `--data-dir` flag ### Environment variables Environment variables override the values in `config.toml`. If you set `QUI__SESSION_SECRET` or `QUI__SESSION_SECRET_FILE` on the old host, set the same value on the new host. If the secret changes, qui cannot read the stored passwords and API keys. Copy the other `QUI__` environment variables that you set, for example `QUI__DATA_DIR`. A variable that ends in `_FILE` names a file, for example `QUI__SESSION_SECRET_FILE` or `QUI__DATABASE_PASSWORD_FILE`. Copy each of these files to the new host. If a file has a new location, change the path in the variable. ### Postgres If you use Postgres, qui has no `qui.db`. The data stays in the Postgres database. Copy only `config.toml`, and skip the steps for `qui.db` below. Make sure that the new host can connect to the same Postgres database. This guide does not move the Postgres database itself. ### Copy the files 1. Stop qui on the old host. If qui runs, the copy of `qui.db` can be incomplete. 2. On the old host, copy `qui.db` from the data directory. If `qui.db-wal` and `qui.db-shm` exist, copy them too. They can hold recent changes that are not in `qui.db` yet. 3. On the old host, copy `config.toml` from the config directory. 4. Install qui on the new host. Use the [installation](./installation.md), [Docker](./docker.md), or [Windows](./windows.md) guide. 5. Stop qui on the new host. 6. In the data directory on the new host, delete `qui.db`, `qui.db-wal`, and `qui.db-shm` if they exist. 7. Put the copied `qui.db`, `qui.db-wal`, and `qui.db-shm` in the data directory on the new host. 8. Put `config.toml` in the config directory on the new host. 9. Start qui on the new host. Log in with the user and password from the old host. ### After the move - If the address of qBittorrent changed, edit each instance and set the new URL. - If the paths to your data changed, update the paths in cross-seed, automations, and orphan scan. - If the new host needs a different host, port, or base URL, edit `config.toml` before you start qui. - If you want to keep your [backups](../features/backups.md), copy the `backups` directory in the data directory. If you set `backupDir`, copy that directory. - If you want to keep custom themes, copy the `themes` directory in the config directory. If you set `customThemesDir`, copy that directory. - If you want to keep the tracker icons, copy the `tracker-icons` directory in the data directory. Do not run qui on both hosts with the same database. If you do, both change your qBittorrent instances at the same time. --- ## Install qui on a seedbox ## Seedbox installers One-line installers for popular seedbox providers. Each script configures qui for the provider's environment. If your provider is not listed, follow the [manual install](./installation.md) and set a [base URL](../configuration/base-url.md) if you run qui under a subpath. **Feral** ```bash wget -O installer.sh https://get.autobrr.com/qui/feral && chmod +x installer.sh && ./installer.sh ``` **Seedhost** ```bash wget -O installer.sh https://get.autobrr.com/qui/seedhost && chmod +x installer.sh && ./installer.sh ``` **Ultra.cc** ```bash wget -O installer.sh https://get.autobrr.com/qui/ultra && chmod +x installer.sh && ./installer.sh ``` **Whatbox** ```bash wget -O installer.sh https://get.autobrr.com/qui/whatbox && chmod +x installer.sh && ./installer.sh ``` **HostingByDesign** ```bash wget -O installer.sh https://get.autobrr.com/qui/hostingbydesign && chmod +x installer.sh && ./installer.sh ``` **Bytesized** ```bash wget -O installer.sh https://get.autobrr.com/qui/bytesized && chmod +x installer.sh && ./installer.sh ``` :::note This installer is untested. ::: --- ## Run qui on Windows with the Tray or as a scheduled task ## Windows installation This guide explains how to install qui on Windows and run it in the background. There are two ways to do this. Use one of them, never both, or two copies of qui start and the second one fails because the port is in use. - **The Tray** runs qui in your logon session, with an icon in the notification area. Use it when you log on to the computer where qui runs. See [Run qui with the Tray](#run-qui-with-the-tray). - **A scheduled task** runs qui without a logon session and shows no icon. Use it for a headless computer, or when qui must run before anyone logs on. See [Create a Windows task](#create-a-windows-task). ### Install There are two ways to install qui. The MSI is the easier one. Use the zip when you want qui in a folder of your choice. #### MSI 1. Download `qui_x.x.x_windows_x86_64.msi` from [GitHub Releases](https://github.com/autobrr/qui/releases/latest). 2. Double-click the file. Windows can show a SmartScreen warning, because the file has no signature. Click **More info**, then **Run anyway**. The MSI installs qui for your Windows account only. It needs no administrator rights and shows no setup wizard. It does these things: - It puts `qui.exe` and `qui-tray.exe` in `%LOCALAPPDATA%\Programs\qui`. - It adds a **qui** entry to the Start Menu. The entry starts the Tray. - It adds the install folder to your `PATH`, so `qui.exe` works in a new terminal. - It adds qui to **Settings → Apps → Installed apps**, where you can uninstall it. - It starts the Tray, except on a silent install with `msiexec /qn`. Open your browser at [http://localhost:7476](http://localhost:7476) and create your account. Then see [Run qui with the Tray](#run-qui-with-the-tray). #### Portable (zip) 1. Download `qui_x.x.x_windows_x86_64.zip` from [GitHub Releases](https://github.com/autobrr/qui/releases/latest). 2. Extract the archive and put `qui.exe` and `qui-tray.exe` in a folder, for example `C:\qui`. Keep the two files in the same folder, because an update replaces both. :::tip Do not put qui in `C:\Program Files`. The updater writes the new executable next to the old one, and that folder needs administrator rights. ::: ### Initial setup Do these steps after a zip install. After an MSI install, qui already runs. Create your account as the MSI section says. 1. Open **Command Prompt** or **PowerShell** and change to the folder: ```powershell cd C:\qui ``` 2. Start qui for the first time to generate the default configuration: ```powershell .\qui.exe serve ``` 3. Open your browser at [http://localhost:7476](http://localhost:7476) and create your account. 4. If qui works, stop the process with `Ctrl+C`. Then run qui with the Tray, or configure it as a background task. #### Configuration qui stores its configuration and runtime data in `%APPDATA%\qui\` by default. With the default SQLite engine, qui stores `qui.db` there too. For more details, see the [Configuration](../configuration/environment.md) section. ### Run qui with the Tray `qui-tray.exe` runs qui without a console window. While qui runs, the qui icon shows in the notification area of the taskbar. 1. Click **qui** in the Start Menu (MSI), or double-click `qui-tray.exe` (zip). The qui icon shows in the notification area. If Windows hides the icon, click the arrow next to the notification area to see it. 2. Click the icon to open qui in your browser. `qui-tray.exe` accepts the same flags as `qui.exe serve`, for example `--config-dir` and `--data-dir`. It does not accept other commands. Use `qui.exe` for commands such as `update` or `create-user`. #### The Tray menu Right-click the qui icon to open the menu: - **Open qui** opens qui in your default browser. A click on the icon does the same. - **Restart** restarts qui. The icon goes away for a moment and then comes back. qui refuses a Restart while an update installs. - **Open config folder** opens the folder that holds the configuration, the database, and the log file. - **Start with Windows** starts `qui-tray.exe` when you log on, with the flags that it runs with now. A check mark shows that it is on. It needs no administrator rights. It applies only to your Windows account. - **Quit** stops qui. Hover over the icon to see the qui version and the address. #### Logs `qui-tray.exe` has no console. It writes the log to `log\qui.log` in the config folder when you did not set `logPath`. If you set `logPath`, qui uses it. You can also read the live log in the web UI. When qui cannot start, for example because another program uses the port, an error dialog shows the reason. ### Create a Windows task Run qui in the background with **Task Scheduler**. 1. Press the **Windows key** and search for **Task Scheduler**. 2. Click **Create Basic Task** in the right sidebar. 3. **Name:** `qui`. Optionally add a description, for example: *qui torrent management service*. 4. **Trigger:** Select **When the computer starts**. 5. **Action:** Select **Start a Program**. - **Program/script:** Browse to `qui.exe`. After an MSI install, it is `%LOCALAPPDATA%\Programs\qui\qui.exe`. After a zip install, it is in your folder, for example `C:\qui\qui.exe`. - **Add arguments:** `serve` - **Start in:** The folder of `qui.exe`, for example `%LOCALAPPDATA%\Programs\qui` or `C:\qui`. 6. Check **Open the Properties dialog**, then click **Finish**. #### Configure the task properties In the Properties dialog: - Under **General**, select **Run whether user is logged on or not**. - Enter your Windows password when Windows prompts for it. - If you encounter permission issues, check **Run with highest privileges**. - Under **Settings**, clear **Stop the task if it runs longer than**. Windows sets this to 3 days by default and stops qui when the limit is reached. Click **OK** to save. #### Start the service In the Task Scheduler list, right-click **qui** and click **Run**. :::tip To restart the service, click **End** and then **Run** in the right sidebar of Task Scheduler. ::: ### Restart from qui qui can restart itself through the API (`POST /api/system/restart`). On Windows, `qui serve` starts two `qui.exe` processes. The first process only supervises. The second process serves qui. When qui restarts, only the second process stops and starts again. - The task shows **Running** during and after the restart. - **End** stops both processes. - **Run** does not start a second copy while qui runs. The task setting **If the task is already running, then the following rule applies: Do not start a new instance** controls this. It is the default. A task that you created with the steps above needs no change. ### Updating :::note An update replaces `qui-tray.exe` only when the file is already in the folder with `qui.exe`. An update from 1.30.0 or older does not add the file, because those versions have no Tray. After that update, copy `qui-tray.exe` from the Windows zip on [GitHub Releases](https://github.com/autobrr/qui/releases/latest) into the folder with `qui.exe`. Later updates replace both files. ::: #### Update from the web UI Click **Install update** in the update banner or in **Settings → Application**. You do not have to stop the task or quit the Tray. qui replaces `qui.exe` and `qui-tray.exe` (see the note above) and restarts on the new version, and the task stays **Running**. For the conditions and the rollback, see [Update from the web UI](./installation.md#update-from-the-web-ui). #### Update an MSI install Use **Install update**, the same as for a zip install. After an update, **Installed apps** still shows the version of the MSI that you installed. That is normal. The files are the new version. You can also install a newer MSI. Quit the Tray, or end the scheduled task, before you do this. If qui runs, Windows offers to close it, but it cannot stop qui fully. The old version keeps running, and the new version shows a port error. If this occurs, click **OK** on the error, click **Quit** in the Tray menu, and start qui from the Start Menu. #### Update from the shell qui has a built-in update command. It replaces `qui.exe` and `qui-tray.exe` (see the note above). Stop the scheduled task or quit the Tray first. A running qui keeps the old version until you restart it. 1. Open **Task Scheduler**, right-click the **qui** task, and click **End**. 2. Run the updater: ```powershell .\qui.exe update ``` 3. Right-click the **qui** task again and click **Run** to restart it. If you use the Tray, click **Quit** in the Tray menu instead of step 1, and start `qui-tray.exe` again instead of step 3. #### Roll back an update The update keeps the previous version as `qui-v.bak.exe` next to `qui.exe`, and as `qui-tray-v.bak.exe` next to `qui-tray.exe`. Each update deletes older backups. The first `qui.exe` process still runs from the file that it started from, so that backup stays until the task stops. 1. Open **Task Scheduler**, right-click the **qui** task, and click **End**. 2. In **Command Prompt** or **PowerShell**, move the backup back. Replace `1.30.0` with the version in the backup file name. Replace `C:\qui` with the folder of `qui.exe`. After an MSI install, that folder is `%LOCALAPPDATA%\Programs\qui`: ```bat cmd /c move /Y "C:\qui\qui-v1.30.0.bak.exe" "C:\qui\qui.exe" cmd /c move /Y "C:\qui\qui-tray-v1.30.0.bak.exe" "C:\qui\qui-tray.exe" ``` 3. Right-click the **qui** task and click **Run**. If you use the Tray, click **Quit** in the Tray menu before step 2, and start `qui-tray.exe` again after it. If the backup is from 1.30.0 or older, skip the second `move` command and do not start `qui-tray.exe`, because it is still the new version. Start `qui.exe` as you did before the update. :::warning If you want a full rollback, back up `%APPDATA%\qui\` before you update. A new version can migrate the database, which changes its structure. The old version cannot always read a migrated database, and a move of the backup binary does not undo a migration. ::: ### Switch from the zip To move a zip install to the MSI: 1. Right-click the qui icon and clear **Start with Windows**. That setting points to `qui-tray.exe` in the old folder. 2. Click **Quit** in the Tray menu. If you use a scheduled task, end it and delete it, or change it to the new path. 3. If `config.toml` is in the old folder, move all files and folders in it, except the `.exe` files, into `%APPDATA%\qui`. This includes `qui.db` and, if they exist, the `backups`, `themes`, and `log` folders. 4. Delete the old folder, for example `C:\qui`. 5. Install the MSI. qui finds its data in `%APPDATA%\qui` again, so most users need to do nothing more. If you used `--config-dir` with the old folder, stop using the flag after the move. If the flag points to a different folder, keep it. Always move `config.toml` and `qui.db` together. `config.toml` holds the secret that decrypts data in `qui.db`, which includes your theme license. If you move `qui.db` without its `config.toml`, qui cannot read that data. ### Uninstall 1. Right-click the qui icon and clear **Start with Windows**. The MSI cannot remove that setting. 2. Click **Quit** in the Tray menu. 3. Open **Settings → Apps → Installed apps**, find **qui**, and click **Uninstall**. The uninstall removes the program, the update backups, the Start Menu entry, and the `PATH` entry. Your configuration and database stay in `%APPDATA%\qui`. To remove all your data, delete that folder too. ### Reverse proxy (optional) If you need remote access, run qui behind a reverse proxy like [Caddy](https://caddyserver.com/) or nginx for TLS. See the [Base URL](../configuration/base-url.md) section for reverse proxy configuration examples. ### Finishing up When the task runs, access qui at [http://localhost:7476](http://localhost:7476). Add your qBittorrent instances to manage your torrents. --- ## Web UI for qBittorrent ## qui qui is a web interface for qBittorrent. It runs as one binary and connects to one or more qBittorrent instances over the Web API. Most people run qui with one qBittorrent instance. Multi-instance support is optional. If you have a seedbox and a home server, qui manages both from one page. ### Where to run qui qui can run on any machine that can reach the qBittorrent Web API. A few features read files on disk and need [local filesystem access](./features/instance-settings.md#local-filesystem-access). For those, qui must run on the same host as qBittorrent, or see the same files through a shared mount. If you have one server, run qui on that server. Some seedbox providers install qui for you, see [Seedbox installers](./getting-started/seedbox-installers.md). If your provider gives you no shell, run qui at home and add the seedbox as a remote instance. A remote instance gets the interface, the automations that do not read the disk, and cross-seed in default mode or hardlink mode. ### Features - **Single Binary**: No dependencies. Download and run. - **Multi-Instance Support**: Manage all your qBittorrent instances from one place - **Large Collections**: Handles thousands of torrents - **Themeable**: Multiple built-in color themes, plus sideloadable [custom themes](./features/custom-themes.md) (premium), with a shared collection in [qui-community-themes](https://github.com/autobrr/qui-community-themes) - **Base URL Support**: Serve from a subdirectory (for example `/qui/`) behind a reverse proxy - **OIDC Single Sign-On**: Authenticate through your [OpenID Connect provider](./configuration/oidc.md) - **External Programs**: Launch [custom scripts](./features/external-programs.md) from the torrent context menu - **Tracker Reannounce**: If qBittorrent does not retry fast enough, qui [reannounces stalled torrents](./features/reannounce.md) - **Automations**: [Rule-based torrent management](./features/automations.md) with conditions, actions (delete, pause, tag, limit speeds), and cross-seed awareness - **Orphan Scan**: [Find and remove files](./features/orphan-scan.md) that no torrent uses - **Backups & Restore**: [Scheduled snapshots](./features/backups.md) with incremental, overwrite, and complete restore modes - **Cross-Seed**: [Find and add matching torrents](./features/cross-seed/overview.md) across trackers, with autobrr webhook integration - **Torrent Management**: [Tags, categories, saved filter views, torrent creation, and export](./features/torrent-management.md) - **Dashboard**: [Per-instance statistics](./features/dashboard.md) with live updates over SSE - **Search**: [Search your Torznab indexers](./features/search.md) and send results to an instance - **RSS**: [qBittorrent RSS feeds and auto-download rules](./features/rss.md) - **Magnet Links**: Register qui as your browser's handler for magnet links from **Settings → Security** - **Reverse Proxy**: [Transparent qBittorrent proxy](./features/reverse-proxy.md) for external apps like autobrr, Sonarr, and Radarr, without credential sharing - **Incognito Mode**: [Disguise torrents as Linux ISOs](./features/incognito.md) for screen sharing and screenshots - **Multi-Language**: Interface available in English, German, French, Italian, Czech, Ukrainian, Korean, Brazilian Portuguese, Simplified Chinese, Traditional Chinese, and Catalan with automatic browser-language detection ### Browser extensions Right-click a magnet or torrent link to add it to your qBittorrent instances: - [Chrome Extension](https://chromewebstore.google.com/detail/kbjnjgihepmcoilegnghgpmijbecoili) - [Firefox Add-on](https://addons.mozilla.org/en-US/firefox/addon/qui/) To register qui as your browser handler for magnet links, open **Settings → Security** and click **Register as Handler**. The button shows only when you open qui over HTTPS or on localhost, in a browser that supports protocol handlers. ### Languages qui is available in English, German, French, Italian, Czech, Ukrainian, Korean, Brazilian Portuguese, Simplified Chinese, Traditional Chinese, and Catalan. The interface detects your browser language on first load and remembers your choice after that. Sizes and speeds follow the language: French shows `1,5 Gio` where English shows `1.5 GiB`. If a unit reads wrong in yours, say so in a Discussion. To change the language, click the globe icon at the bottom of the sidebar. If the sidebar is collapsed, use the globe submenu in the top-right menu. On a phone, use the globe submenu under **Settings** in the footer bar. The team does not take new translations at this time. To report a wrong translation, start a [Discussion](https://github.com/autobrr/qui/discussions/new/choose) or contact the team on [Discord](https://discord.autobrr.com/qui). The file [`web/AGENTS.md`](https://github.com/autobrr/qui/blob/develop/web/AGENTS.md) documents the translation workflow. ### Quick start 1. [Install qui](./getting-started/installation.md). 2. Open http://localhost:7476 in your browser. 3. Create your admin account. 4. Add your qBittorrent instances. ### Community Join the community on [Discord](https://discord.autobrr.com/qui) to get help, share feedback, and meet other autobrr users. ### License GPL-2.0-or-later ### Supported torrent clients qui supports qBittorrent only. It communicates directly with the qBittorrent Web API. If you use Deluge, rTorrent, Transmission, or uTorrent, use the qui CLI to [migrate your torrents](./features/client-migration.md) to qBittorrent. The migration keeps their history. For compatible qBittorrent versions, see the [qBittorrent Version Compatibility](./advanced/compatibility.md) page. --- ## Premium theme licenses ## License Management Premium themes require a license key. Each key has a limited number of activation slots, one for each server that runs qui. The same license also unlocks [custom themes](./features/custom-themes.md), which you sideload as CSS. The [supporter subscription](./support.md) is separate: a recurring donation that issues no key. ### Activate a license 1. Open **Settings → Premium Themes** in your qui instance. 2. Click **Add License** and enter your license key. 3. Premium themes unlock after activation. ### Move a license to a new server If you replace a server or reinstall, first free the activation slot that the old instance uses. The key will not work on the new server until you do. #### If the old server is still accessible 1. Open qui on the **old** server. 2. Go to **Settings → Premium Themes** and click **Remove** next to the license. 3. qui deactivates the license on that machine and frees the slot. 4. Activate the same key on the new server. #### If the old server is gone If the old server no longer exists, for example after a hardware failure or a destroyed VPS, you cannot remove the license from within qui. Use the license portal instead: 1. Go to [licenses.getqui.com](https://licenses.getqui.com/). 2. Register or log in with **the same email address you used to purchase the license**. 3. Find your license and deactivate the old activation. 4. Activate the key on your new server from **Settings → Premium Themes**. ### Recover a lost license key Sign up or sign in at [licenses.getqui.com](https://licenses.getqui.com/) with the email address that you used to buy the license. The portal lists your license keys. **Settings → Premium Themes** also links to the portal. ### Offline use qui checks the license with the license server when it starts and one time each day after that. If the license server does not answer, the license stays active for 7 days after the last successful check. qui shows no warning during these 7 days. After 7 days without a successful check, the next check marks the license `offline`. Premium themes and custom themes then lock, and qui applies the default theme. When the license server answers again, the next check makes the license active again. You do not have to enter the key again. To run the check at once, restart qui. If your network blocks all outgoing traffic from qui, qui cannot reach the license server. The premium features then stop 7 days after the last successful check. ### Troubleshooting #### "License activation limit has been reached" All activation slots for your key are in use. Go to [licenses.getqui.com](https://licenses.getqui.com/). Sign up or sign in with the email address that you used to buy the license. Open **Machine Instances** and deactivate a machine that you no longer use. Then activate the key again. If you can still open qui on the old machine, you can also remove the license there (**Settings → Premium Themes → Remove**). #### "This license was activated on a different machine" This error appears when you copy the qui database from another server. The stored activation does not match this machine's identity. Click **Re-activate License**, or remove the license (**Settings → Premium Themes → Remove**) and enter the key again. #### "Unable to reach the license service" The license service did not respond. Wait a moment, then try again. If the error persists, make sure that your server has outbound network access. --- ## Support qui development ## Support Development Volunteers develop and maintain qui. Your support funds continued work on the project. ### Supporter subscription Subscribe for $5 per month or $50 per year through Dodo Payments. Click the heart icon in the qui header to open the subscription dialog. The subscription unlocks no features. It funds qui development. Supporters get the `qui-patron` role on [Discord](https://discord.autobrr.com/qui). The subscription never issues a license key. Premium themes are a separate one-time purchase. ### Premium themes Buy premium themes from **Settings → Premium Themes** in your qui instance. The purchase is pay what you want, with a $9.99 minimum, and the license is lifetime. The checkout page shows your license key. If you donate with crypto, verify your transaction at [crypto.getqui.com](https://crypto.getqui.com/) to receive a 100% discount code for premium themes. To manage activations or move a license to a new server, see [License Management](./licenses.md). A license also unlocks [custom themes](./features/custom-themes.md). Write your own or take one from [qui-community-themes](https://github.com/autobrr/qui-community-themes). ### Donations To give beyond subscriptions and theme purchases, use one of these donation options. - **soup** - [Patreon](https://www.patreon.com/c/s0up4200) - [GitHub Sponsors](https://github.com/sponsors/s0up4200) - [Buy Me a Coffee](https://buymeacoffee.com/s0up4200) - [Ko-fi](https://ko-fi.com/s0up4200) - **zze0s** - [GitHub Sponsors](https://github.com/sponsors/zze0s) - [Buy Me a Coffee](https://buymeacoffee.com/ze0s) #### Cryptocurrency Verify your crypto donation at [crypto.getqui.com](https://crypto.getqui.com/) to receive a 100% discount code for premium themes. ##### Bitcoin (BTC) ##### Ethereum (ETH) ##### Litecoin (LTC) ##### Monero (XMR) We handle XMR discount codes manually. Contact us on [Discord](https://discord.autobrr.com/qui) or [email s0up4200@pm.me](mailto:s0up4200@pm.me). --- For other currencies or donation methods, [contact us on Discord](https://discord.autobrr.com/qui).