{ "module": "qbittorrent", "version": "1", "slug": "qbt", "capabilities": [ "container-runtime" ], "emits": [ "download.added", "download.completed" ], "consumes": [], "own-secrets": { "broker": "/var/lib/mesh/qbittorrent/broker", "password": "/var/lib/mesh/qbittorrent/password" }, "listens": [ { "name": "web", "port": 8112, "protocol": "tcp", "from": "mesh", "why": "the download client's pages, and the WebUI API its consumers and its own tools call; qBittorrent refuses a request whose Host names a port other than the one it listens on, so a caller dialling the machine port gets in only when the machine publishes the same number" }, { "name": "peers", "port": 6881, "protocol": "tcp", "from": "mesh", "why": "incoming BitTorrent peer connections; the client announces this number to trackers and peers, so the machine must publish it on the same one" }, { "name": "peers-udp", "port": 6881, "protocol": "udp", "from": "mesh", "why": "DHT and uTP on the same number as the peer port; announced like it, so published on the same one" } ], "accesses": [ { "path": "/services/media/downloads", "mode": "read-write" } ], "resources": [ { "id": "mesh-state", "type": "directory", "path": "/var/lib/mesh/qbittorrent", "mode": "0700" }, { "id": "state", "type": "directory", "mode": "0700", "place": "." }, { "id": "config", "type": "directory", "mode": "0700", "owner": "1000:1000" }, { "id": "server", "type": "container", "name": "qbittorrent", "image": "lscr.io/linuxserver/qbittorrent@sha256:457e4eec2ee3f5e4ef59f237ad51f6143deba9f7445ab48bb5204a98888ef9aa", "env": { "PUID": "1000", "PGID": "1000", "TZ": "Etc/UTC", "WEBUI_PORT": "8112" }, "ports": [ "8112:8112", "6881:6881", "6881:6881/udp" ], "volumes": [ "${dir:config}:/config", "/services/media/downloads:/downloads" ] }, { "id": "runtime-config", "type": "file", "path": "${dir:state}/config.json", "mode": "0600", "content": "{}\n", "merge": "json" }, { "id": "runtime", "type": "container", "name": "mesh-qbittorrent", "network": "host", "volumes": [ "/var/lib/mesh/qbittorrent/broker:/run/secrets/broker:ro", "/var/lib/mesh/qbittorrent/password:/run/secrets/password:ro", "${dir:state}/config.json:/run/config/config.json:ro", "${dir:config}:/var/lib/qbittorrent/config:ro" ], "env": { "MESH_BROKER_FILE": "/run/secrets/broker", "MESH_QBITTORRENT_URL": "http://127.0.0.1:${port:8112}", "MESH_QBITTORRENT_PASSWORD_FILE": "/run/secrets/password", "MESH_QBITTORRENT_CONFIG_FILE": "/run/config/config.json", "MESH_QBITTORRENT_CONFIG_DIR": "/var/lib/qbittorrent/config" }, "restart-on": [ "runtime-config", "needs-password" ], "artifact": "runtime" } ], "provides": [ "qbittorrent-api" ], "serves": { "qbittorrent-api": { "scheme": "http", "port": 8112, "url-base": "", "username": "admin" } }, "requires": [ "route" ], "contributes": { "route": { "label": "qbittorrent", "endpoint": "web" } }, "binds": { "route": "${dir:state}/route.json" }, "build": { "on": [ { "arg": "BUILD_BASE", "module": "mesh-tools", "artifact": "build" }, { "arg": "RUNTIME_BASE", "module": "mesh-tools", "artifact": "runtime" } ], "artifacts": [ { "name": "runtime", "kind": "image", "from": "Dockerfile" } ] } }