Ansible role for qBittorrent
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simon Cornet d403886a14
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
docs: improve readme
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 17:28:37 +02:00
.woodpecker chore(package): update cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2 docker tag to v0.23.3 2026-09-20 05:50:18 +00:00
defaults fix: route image through zot lscr mirror, fix pgid var name 2026-07-13 16:23:31 +02:00
meta feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
roles feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
tasks chore(package): update cr.simoncor.net/lscr/linuxserver/qbittorrent docker tag to v5.2.4 2026-09-29 08:32:51 +00:00
templates feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
.ansible-lint fix: exclude only sops yml files from lint 2026-07-14 16:23:54 +02:00
.editorconfig feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
.gitattributes feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
.gitignore feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
.markdownlint-cli2.jsonc feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
.sops.yaml fix: correct sops regex to ya?ml 2026-07-14 16:02:01 +02:00
.yamllint chore: exclude .yml files from lint configs 2026-07-14 16:17:38 +02:00
AGENTS.md feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00
ansible.cfg chore: sync linting and config files from common 2026-07-14 11:33:15 +02:00
playbook.yaml chore(playbook): run galaxy install only on first host 2026-08-13 08:49:04 +02:00
readme.md docs: improve readme 2026-10-05 17:28:37 +02:00
renovate.json feat: initial qBittorrent Ansible role 2026-07-13 14:00:37 +02:00

Ansible Role: qBittorrent

Install and configure qBittorrent - a free and open-source BitTorrent client. The role runs the LinuxServer.io qBittorrent image as a Docker container with host networking and an NFS-backed media volume.

Dependencies

  • docker role (installs Docker).
  • traefik role (reverse proxy).

Both are executed before this role by playbook.yaml and fetched via roles/requirements.yml.

Variables

Variable Required Default Description
qbittorrent_puid No "1000" User ID owning the data directories (PUID)
qbittorrent_pgid No "1000" Group ID owning the data directories (PGID)
qbittorrent_webui_port No "8080" Web UI port (WEBUI_PORT)
qbittorrent_torrenting_port No "57575" Torrent listening port (TORRENTING_PORT)

The role also uses the global variable timezone (passed as TZ), which is not defined in defaults/main.yaml and must be set in the inventory.

Example

timezone: "Europe/Amsterdam"
qbittorrent_puid: "1000"
qbittorrent_pgid: "1000"
qbittorrent_webui_port: "8080"
qbittorrent_torrenting_port: "57575"

Usage

Run the role through Semaphore using playbook.yaml. The playbook first runs ansible-galaxy install -f -r roles/requirements.yml on localhost, then executes the docker, traefik and qbittorrent roles.

Operational notes

  • Config is stored in /mnt/qbittorrent/data (mounted at /config in the container).
  • The role creates a Docker volume media backed by NFSv4.2 export /srv/nfs/media, mounted at /mnt/media. The NFS server address (192.168.10.41) and mount options are hardcoded in tasks/qbittorrent.yaml.
  • Container qbittorrent uses network_mode: host, so the web UI and torrent ports are bound directly on the host. The image tag is pinned in the task.
  • After the container is started the role prunes unused Docker containers, images, networks and volumes.