This is a fork from the LinuxServer.io's docker-qbittorrent project, to add support for gcsfuse.
1.6K
This branch is intended to add support for mounting Google Cloud Storage buckets via gcsfuse.
This is NOT for Google Drive.
Docker image: amitie10g/qbittorrent:gcsfuse.
Images used:
This is just a proof-of-concept for automatizing sharing process and storing completed torrents at Google Cloud Storage (mainly from services running at the Google Cloud Compute infraestructure). Using the Google Cloud services without setting up properly would be expensive.
/downloads volume is not longer exposed. Instead,
/downloads/complete is mounted via FUSE inside the container./downloads/incomplete is exposed to the host side, to keep the incomplete files across reboots and avoid unneccesary writes to the bucket.<config path> and <watch path> refers to the local direcctories you want to expose.
Get your Service Account Key for your bucket, and upload to /gcsfuse-key.json. (if you're running the VM at Google Cloud, the key can be reteived as custom metadata).
If you're running the VM at Google Cloud,
You must configure your Service account accordingly.
You should enable OS Login and choose the proper Service account.
The User ID, Group ID and the $HOME directory belongs to the OS Login account. You may get those data from another instance with OS login enabled and using the same Service account, by running id and pwd.
In Container-optimized OS, /mnt/disks is writable, so, the config path will be stored at /mnt/disks/qbittorrent
Use Preemptive VM. If you don't want to watch for power downs, you may use Instance templates and Instance groups.
At Boot disk section When deleting instance, select "Keep disk", in order to don't get rid after power downs under preemptive VMs.
Don't forget to set the right permissions for your bucket.
If you ran out of space caused by the container rather than the downloads, just reboot the VM in order to re-crate the container (destroying it in the process).
Google Cloud offers a feature to deploy containers in much style as docker-compose. Follow those steps:
amitie10g/qbittorrent:gcsfuse as the container name.PUID: Your OS login user IDPGID: Your OS login group IDBUCKET: the GCS bucket nameTZ: UTC/config: $HOME/config/downloads/incomplete: $HOME/downloads/watchscripts/startup-gcloud.enable-oslogin as true (you may also enable OS Login globally). (mandatory).GCS_KEY with the Service account key. (mandatory).SSL_CERT with your SSL certificate.SSL_KEY with your SSL key.PUID=<PUID>
PGID=<PGID>
CONF_PATH=$HOME/config
INCOMPLETE_PATH=$HOME/downloads/incomplete
CONTAINER_NAME=qbittorrent
CONTAINER_IMAGE=amitie10g/qbittorrent:gcsfuse
docker run -t -i -d \
--name=$CONTAINER_NAME \
-e PUID=$PUID \
-e PGID=$PGID \
-e TZ=UTC \
-e BUCKET=torrent-test \
-v $CONF_PATH:/config \
-v $INCOMPLETE_PATH:/downloads/incomplete \
-p 6881:6881 \
-p 6881:6881/udp \
-p 8080:8080 \
--device=/dev/fuse \
--restart no \
--privileged \
$CONTAINER_IMAGE
version: "3.3"
services:
qbittorrent:
image: amitie10g/qbittorrent:gcsfuse
container_name: qbittorrent
environment:
- PUID=<PUID>
- PGID=<PGID>
- BUCKET=<BUCKET>
- TZ=UTC
volumes:
- <path to data>:/config
- <path to incomplete folder>:/downloads/incomplete
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp
restart: no
git clone --branch=gcsfuse https://github.com/Amitie10g/docker-qbittorrent.git
cd docker-qbittorrent
docker build \
--no-cache \
--pull \
--compress \
-t amitie10g/qbittorrent .
Follow the original README.md file for instructions for running.
Content type
Image
Digest
Size
71.8 MB
Last updated
over 7 years ago
docker pull amitie10g/qbittorrent