# qbit_manage Run Commands

|            **Shell Command**            | **Docker Environment Variable** |   **Config Command**  | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                            | **Default Value** |
|:----------------------------------------------------------------------------------:|:-------------------------------:|:---------------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------:|
|           `-ws` or `--web-server`       |         QBT_WEB_SERVER          |           N/A         | Start the webUI server to handle command requests via HTTP API. Pass `--web-server` to enable, `--web-server=False` to disable. Default: enabled on desktop (non-Docker) runs; disabled in Docker.                                                                                                                                                                                                 |        Auto       |
|              `-H` or `--host`           |            QBT_HOST             |           N/A         | Hostname for the web server (default: 0.0.0.0).                                                                                                                                                                                                                                                                                                                                                                                                           |        0.0.0.0       |
|              `-p` or `--port`           |            QBT_PORT             |           N/A         | Port number for the web server (default: 8080).                                                                                                                                                                                                                                                                                                                                                                                                           |        8080       |
|            `-b` or `--base-url`         |          QBT_BASE_URL           |           N/A         | Base URL path for the web UI (e.g., '/qbit-manage'). Default is empty (root).                                                                                                                                                                                                                                                                                                                                                                             |        ""         |
|              `-r` or`--run`             |             QBT_RUN             |           N/A         | Run without the scheduler. Script will exit after completion.                                                                                                                                                                                                                                                                                                                                                                                              |       False       |
|          `-sch` or `--schedule`         |           QBT_SCHEDULE          |           N/A         | Schedule to run every x minutes or choose customize schedule via [cron](https://crontab.guru/examples.html). (Default set to 1440 (1 day))                                                                                                                                                                                                                                                                                                                 |        1440       |
|        `-sd` or `--startup-delay`       |        QBT_STARTUP_DELAY        |           N/A         | Set delay in seconds on the first run of a schedule (Default set to 0)                                                                                                                                                                                                                                                                                                                                                                                     |         0         |
| `-cd CONFIG_DIR` or `--config-dir CONFIG_DIR` |         QBT_CONFIG_DIR          |           N/A         | Override the default config directory location. By default, qbit_manage looks for `config.yml` in platform-specific directories (see [Config-Setup](Config-Setup) for details). Use this to specify a custom directory path. `Example: /path/to/config/dir`.                                                                                                   | Platform-specific |
| `-lf LOGFILE,` or `--log-file LOGFILE,` |           QBT_LOGFILE           |           N/A         | This is used if you want to use a different name for your log file. `Example: tv.log`                                                                                                                                                                                                                                                                                                                                                                      |    activity.log   |
|           `-re` or `--recheck`          |           QBT_RECHECK           |         recheck       | Recheck paused torrents sorted by lowest size. Resume if Completed.                                                                                                                                                                                                                                                                                                                                                                                        |       False       |
|         `-cu` or `--cat-update`         |          QBT_CAT_UPDATE         |       cat_update      | Use this option to update your categories or switch between them. The category function takes the save path of the torrent and assigns the corresponding category to it based on that path.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |       False       |
|         `-tu` or `--tag-update`         |          QBT_TAG_UPDATE         |       tag_update      | Use this if you would like to update your tags and/or set seed goals/limit upload speed by tag.                                                                                                                                                                                                                                                                                                                                                            |       False       |
|      `-ru` or `--rem-unregistered`      |       QBT_REM_UNREGISTERED      |    rem_unregistered   | Use this if you would like to remove unregistered torrents. (It will the delete data & torrent if it is not being cross-seeded, otherwise it will just remove the torrent without deleting data). Trackers that have an error and not covered by the remove unregistered logic will also be tagged as `issue` for manual review.                                                                                                                           |       False       |
|     `-tte` or `--tag-tracker-error`     |      QBT_TAG_TRACKER_ERROR      |    tag_tracker_error  | Use this if you would like to tag torrents that do not have a working tracker.                                                                                                                                                                                                                                                                                                                                                                             |       False       |
|        `-ro` or `--rem-orphaned`        |         QBT_REM_ORPHANED        |      rem_orphaned     | Use this if you would like to remove orphaned files from your `root_dir` directory that are not referenced by any torrents. It will scan your `root_dir` directory and compare it with what is in qBittorrent. Any data not referenced in qBittorrent will be moved into `/data/torrents/orphaned_data` folder for you to review/delete.                                                                                                                   |       False       |
|      `-tnhl` or `--tag-nohardlinks`     |       QBT_TAG_NOHARDLINKS       |     tag_nohardlinks   | Use this to tag any torrents where the torrent's largest file does not have any hardlinks associated with any of the files outside of your Qbit_Manage root directory. This is useful for those that use Sonarr/Radarr that hard links your media files with the torrents for seeding. When files get upgraded they no longer become linked with your media therefore will be tagged with a new tag noHL. You can then safely delete/remove these torrents to free up any extra space that is not being used by your media folder. Refer to the qbm hardlinks functionality documentation for details. |       False       |
|        `-sl` or `--share-limits`        |         QBT_SHARE_LIMITS        |      share_limits     | Control how torrent share limits are set depending on the priority of your grouping. Each torrent will be matched with the share limit group with the highest priority that meets the group filter criteria. Each torrent can only be matched with one share limit group.                                                                                                                                                                                  |       False       |
|        `-sc` or `--skip-cleanup`        |         QBT_SKIP_CLEANUP        |      skip_cleanup     | Use this to skip emptying the Recycle Bin folder (`/root_dir/.RecycleBin`) and Orphaned directory. (`/root_dir/orphaned_data`)                                                                                                                                                                                                                                                                                                                             |       False       |
|           `-dr` or `--dry-run`          |           QBT_DRY_RUN           |         dry_run       | If you would like to see what is gonna happen but not actually move/delete or tag/categorize anything.                                                                                                                                                                                                                                                                                                                                                     |       False       |
|     `-ll` or `--log-level`     |          QBT_LOG_LEVEL          |           N/A         | Change the output log level.                                                                                                                                                                                                                                                                                                                                                                                                                               |        INFO       |
|     `-ls` or `--log-size`     |          QBT_LOG_SIZE          |           N/A         | Maximum log size per file (in MB)                                                                                                                                                                                                                                                                                                                                                                                                                               |        10       |
|     `-lc` or `--log-count`     |          QBT_LOG_COUNT          |           N/A         | Maximum number of logs to keep                                                                                                                                                                                                                                                                                                                                                                                                                               |        5       |
|                `--debug`                |            QBT_DEBUG            |           N/A         | Adds debug logs                                                                                                                                                                                                                                                                                                                                                                                                                                            |       False       |
|                `--trace`                |            QBT_TRACE            |           N/A         | Adds trace logs                                                                                                                                                                                                                                                                                                                                                                                                                                            |       False       |
|           `-d` or `--divider`           |           QBT_DIVIDER           |           N/A         | Character that divides the sections (Default: '=')                                                                                                                                                                                                                                                                                                                                                                                                         |         =         |
|            `-w` or `--width`            |            QBT_WIDTH            |           N/A         | Screen Width (Default: 100)                                                                                                                                                                                                                                                                                                                                                                                                                                |        100        |
|   `-svc` or `--skip-qb-version-check`   |    QBT_SKIP_QB_VERSION_CHECK    | skip_qb_version_check | Bypass qBittorrent/libtorrent version compatibility check. You run the risk of undesirable behavior and WILL RECIEVE NO SUPPORT.                                                                                                                                                                                                                                                                                                                           |       False       |
