binhex / arch-qbittorrentvpn

Docker build script for Arch Linux base with qBittorrent, Privoxy and OpenVPN
GNU General Public License v3.0
397 stars 46 forks source link

Partial downloads restart on container restart #117

Open taschmidt opened 2 years ago

taschmidt commented 2 years ago

First off, I've only been using this for a few days but I love it and want to thank you for your great work! The only issue I'm having is if a torrent is not complete when I shut down the container, it'll restart from 0% when starting back up. Any ideas why that would be?

Here is the docker compose file I'm using:

version: '3.6'

services:
  qbittorrent:
    image: binhex/arch-qbittorrentvpn
    container_name: qbittorrent
    restart: unless-stopped
    privileged: true
    ports:
      - 6881:6881
      - 6881:6881/udp
      - 8080:8080
      - 8118:8118
    volumes:
      - /d/torrents/downloads:/downloads
      - /d/torrents/config:/config
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_ENABLED=yes
      - VPN_USER=<redacted>
      - VPN_PASS=<redacted>
      - VPN_PROV=pia
      - VPN_CLIENT=openvpn
      - STRICT_PORT_FORWARDING=yes
      - ENABLE_PRIVOXY=no
      - LAN_NETWORK=192.168.1.0/24
      - NAME_SERVERS=1.1.1.1,8.8.8.8
      - DEBUG=false
      - WEBUI_PORT=8080
      - UMASK=000
      - PUID=1000
      - PGID=1000

I'm running on Windows 11 with Docker Desktop 4.2.0 (70708).

taschmidt commented 2 years ago

Quick update here. I was playing around with this and it seems like pausing a torrent before stopping the docker container will at least let qBT not start all the way from 0%. The obvious downside there is that torrent will be paused when qBT starts back up.

An interesting observation with this scenario, if I pause a torrent at, say, 5%, shut down the container, start it back up, resume the torrent, let it go to, say, 10%, stop the container WITHOUT pausing, start it back up.... the torrent will be back at 5% (i.e. the last place it was paused at. Does this make sense to anyone??