...

INSTALL QBITTORRENT ON A RASPBERRY PI USING DOCKER & PORTAINER V1 -EPISODE 13

14, Mar 2021 | Raspberry Pi 4 Series | 11 comments

Today we are going to show you how to install Qbittorrent on a Raspberry Pi 4 using Docker and Portainer.

This is episode 13 of our Raspberry Pi Series. If you have not followed our previous episodes we recommend you do so before attempting to follow any of our episodes. Each tutorial follows on from a custom setup and you may miss some prerequisites.

Having said that we will list out the perquisites below. so you can attempt to complete today’s tutorial without watching our previous episodes.

Difficulty=Easy

Updated: 7th October 2022

Prerequisites:

Recommended USB Hard Drives:

WD 1TB My Passport Portable External Hard DriveWD 4 TB My Passport Portable External Hard Drive
USA Amazon Link:USA Amazon Link:
UK Amazon Link:UK Amazon Link:
We use Amazon Affiliate Links. At no extra cost to you. Thank you for using our links

Step 1 – Create Qbittorrent Appdata & Download folders.

The first thing to do is to create the Appdata folder to store the Qbittorrent config files.

Open up a terminal window and SSH into your Raspberry Pi.

ssh -p PORT USER@YOURPIIPADDRESS

Once you have established an SSH connection navigate to your “Appdata” folder (if you have not created an Appdata folder previously then you will need to create this first).

cd /srv/DRIVENAME/Appdata/

Now create the Qbittorrent data folder.

mkdir qbittorrent

Now navigate into the “qbittorrent” folder.

cd qbittorent

Now we need to get the “absolute path” of the Qbittorent data folder so we can add this to our stack in step two. Take note of this path in a text file.

pwd

Once you run the “pwd” command you can now copy into memory the output should look similar to this.

/srv/dev-disk-by-uuid-66a2bf8a-bed9-420a-b77d-ba48bcf3f836/Appdata/qbittorrent

Now it is time to create a “downloads” folder. This folder needs to be seperate from the qbittorent/config folder. You can have the download folder on an additional USB hard drive if you please. Just make sure you specifiy the drive/folders location correctly.

In our example we will set up the downloads folder on the root of our USB drive.

cd /srv/DRIVENAME/

Now create the “downloads” folder

mkdir downloads

Note: You could now at this point log in to Portainer and set up the “downloads” folder to be shared on the network. Doing this will allow you to have easy access to your downloaded torrent data. However, we won’t be showing you how to do this today as it is out of scope for this tutorial.

Navigate into the downloads folder.

cd downloads

Now we need to get the “absolute path” of the “download” folder so we can add this to our stack in the next step. Take note of this path in a text file.

pwd

STEP 2 – CREATE AND DEPLOY THE QBITTORRENT STACK.

Log in to your Portainer GUI dashboard.

Click on “Stacks” and “Add Stack“.

Add a name for your stack “qbittorrent“.

Copy and paste the following docker-compose data into the “Web editor“. Paste your own Qbittorent “config” and “downloads” folders absolute paths into the “volumes” section replacing the paths before the colon for each volume. Also, change the port if needed to suit your setup.

version: "2.1"
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent
    container_name: qbittorrent
    environment:
      - PUID=1001
      - PGID=100
      - TZ=Europe/London
      - UMASK=022
      - WEBUI_PORT=8383
    volumes:
      - /PATH/TO/FOLDER:/config
      - /PATH/TO/FOLDER:/downloads
    ports:
      - 6881:6881
      - 6881:6881/udp
      - 8383:8383
    restart: unless-stopped

Your stack should look similar to ours. Click “Deploy the stack“.

Note: The hotio/qbittorent image used in the above screenshot has been discontinued please use lscr.io/linuxserver/qbittorrent:latest instead.

Once the stack has finished deploying click on “Containers” in the left-hand menu.

Confirm that the “qbittorent” container has been created and is running. Click on the “Logs” icon to check the logs.

If your logs look similar to ours then everything should be functioning correctly. You can now connect to the Qbittorrent interface by navigating to a browser and entering the URL.

PIIPADDRESS:8282

You should now see the Qbittorrent log in page. Enter the default “Username” and “Password” which is:

Username: admin
Password: adminadmin

Then click on “Login“.

You now have Qbittorent installed. The interface will look like this.

Step 3 – Setting the Qbittorent default download folder.

You now need to change the default downloads folder in the Qbittorent settings. This is because by default Qbittorent sets the “downloads” folder path as /config/downloads.

As we have our own custom “downloads” folder set we need to change this field.

Go to “Tools” in the top menu. Then click on “Options“.

Under the “Downloads” tab scroll down a bit until you see “Default Save Path“.

Change this from “/config/downloads/” to “/downloads/“.

Then scroll to the bottom and click “Save

Step 4 – Securing the Qbittorent Interface.

The final step is to secure the Qbittorent interface by changing the default Username and Password.

Go to “Tools” in the top menu. Then click on “Options“.

Click on “Web UI” tab and scroll down the page. Under “Authentication“. Enter a new “Username” and “Password“.

Scroll to the bottom and click “Save“.

This concludes today’s tutorial.

We need your support.

We hope you enjoyed this episode and that it was helpful and you got benefit out of it.

If you did, please consider supporting our channel by Subscribing to our YouTube channel, and liking and sharing our content.

You can also make a donation via Paypal or become a Patreon if you wish to do so.

You can also follow us on Facebook or Twitter.

If you have any questions or any requests please ask in the comments below or on YouTube.

11 Comments

  1. Fred

    Thank you for your great tutorials! On this one I get only the message “Unauthorized” when accessing the GUI on (in my case) the 8080 port. Any suggestions? Thanks.

    Reply
  2. Petar

    Awesome stuff! Everything is so perfectly explained! Keep up the great work!

    I have stumbled into an issue installing qBittorrent 🙁 After I deployed the Stack all goes smooth but when I try to login to the webUI nothing happens? I checked the log and I have to failures which I cant interprete. I would appreciate your help!

    Reply
    • Addicted2Tech

      Can you post here the errors you are getting from the logs?.

      Reply
  3. Petar

    I did some reading and managed to fix it following the link below. Unfortunately log is clear now, and showing all as supposed to.

    https://docs.linuxserver.io/faq#libseccomp

    Anyway thanks for the great guide! Fantastic job! Keep them coming!

    Reply
  4. velles

    hello! i have the same problem: login to qbittorrent web UI just reloads the page, using default password/ user. using a random one generates an error. i’ve tried it on 2 pc’s, phone, differrent browsers. same result: reloading the login page.

    please can you help?
    logs from portainer:

    UMASK=002

    TZ=Europe/London

    VPN_ENABLED=false

    VPN_LAN_NETWORK=

    VPN_CONF=wg0

    VPN_ADDITIONAL_PORTS=

    PRIVOXY_ENABLED=false

    ———————————————————————-

    Executing usermod…

    Applying permissions to /config

    [cont-init.d] 00-start-container: exited 0.

    [cont-init.d] 01-configure-app: executing…

    Installing default “qBittorrent.conf”…

    [cont-init.d] 01-configure-app: exited 0.

    [cont-init.d] 02-setup-wg: executing…

    [cont-init.d] 02-setup-wg: exited 0.

    [cont-init.d] 03-setup-privoxy: executing…

    [cont-init.d] 03-setup-privoxy: exited 0.

    [cont-init.d] done.

    [services.d] starting services

    [services.d] done.

    QWaitCondition::wait(): cv wait failure: Invalid argument

    QWaitCondition::wait(): cv wait failure: Invalid argument

    Catching signal: SIGTERM

    Exiting cleanly

    [s6-init] making user provided files available at /var/run/s6/etc…exited 0.

    [s6-init] ensuring user provided files have correct perms…exited 0.

    [fix-attrs.d] applying ownership & permissions fixes…

    [fix-attrs.d] done.

    [cont-init.d] executing container initialization scripts…

    [cont-init.d] 00-start-container: executing…

    ———————————————————————-

    ENVIRONMENT

    ———————————————————————-

    1

    PGID=100

    2

    TZ=Europe/London

    VPN_ENABLED=false

    VPN_LAN_NETWORK=

    VPN_CONF=wg0

    VPN_ADDITIONAL_PORTS=

    PRIVOXY_ENABLED=false

    ———————————————————————-

    Executing usermod…

    usermod: no changes

    Applying permissions to /config

    [cont-init.d] 00-start-container: exited 0.

    [cont-init.d] 01-configure-app: executing…

    [cont-init.d] 01-configure-app: exited 0.

    [cont-init.d] 02-setup-wg: executing…

    [cont-init.d] 02-setup-wg: exited 0.

    [cont-init.d] 03-setup-privoxy: executing…

    [cont-init.d] 03-setup-privoxy: exited 0.

    [cont-init.d] done.

    [services.d] starting services

    [services.d] done.

    QWaitCondition::wait(): cv wait failure: Invalid argument

    QWaitCondition::wait(): cv wait failure: Invalid argument

    Catching signal: SIGTERM

    Exiting cleanly

    [s6-init] making user provided files available at /var/run/s6/etc…exited 0.

    [s6-init] ensuring user provided files have correct perms…exited 0.

    [fix-attrs.d] applying ownership & permissions fixes…

    [fix-attrs.d] done.

    [cont-init.d] executing container initialization scripts…

    [cont-init.d] 00-start-container: executing…

    ———————————————————————-

    ENVIRONMENT

    ———————————————————————-

    1

    PGID=100

    2

    TZ=Europe/London

    VPN_ENABLED=false

    VPN_LAN_NETWORK=

    VPN_CONF=wg0

    VPN_ADDITIONAL_PORTS=

    PRIVOXY_ENABLED=false

    ———————————————————————-

    Executing usermod…

    usermod: no changes

    Applying permissions to /config

    [cont-init.d] 00-start-container: exited 0.

    [cont-init.d] 01-configure-app: executing…

    [cont-init.d] 01-configure-app: exited 0.

    [cont-init.d] 02-setup-wg: executing…

    [cont-init.d] 02-setup-wg: exited 0.

    [cont-init.d] 03-setup-privoxy: executing…

    [cont-init.d] 03-setup-privoxy: exited 0.

    [cont-init.d] done.

    [services.d] starting services

    [services.d] done.

    QWaitCondition::wait(): cv wait failure: Invalid argument

    QWaitCondition::wait(): cv wait failure: Invalid argument

    Reply
  5. Matt

    How do I expose the qbittorrent port to the internet? I tried forwarding it from my firewall to the ip address where the container is running but that doesn’t work. I have the container ports exposed as below but my qBittorrent shows yellow under my connection status. canyouseeme.org says connection is refused on the port.

    0.0.0.0:54564 54564/tcp
    0.0.0.0:54564 54564/udp

    Reply
  6. Martyn

    Awesome guide to OMV, I’m amazed how far I have come! I’ve tried a few times before but your guide is the only comprehensive that works. I like the combination of YouTube and article which makes it much easier to follow. But I’ve hit a problem with qbittorrent:

    “UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found”

    So I turned off “Use UPnP / NAT-PMP port forwarding from my router”, but now I get a permission denied error – from the logs:

    UPnP / NAT-PMP support [OFF]
    Web UI: Now listening on IP: *, port: 8080
    File error alert. Torrent: “ubuntu-mate-20.04.1-desktop-arm64+raspi.img.xz”. File: “/downloads/ubuntu-mate-20.04.1-desktop-arm64+raspi.img.xz”.
    Reason: ubuntu-mate-20.04.1-desktop-arm64+raspi.img.xz file_open (/downloads/ubuntu-mate-20.04.1-desktop-arm64+raspi.img.xz) error: Permission denied

    I get the same error with any file that I try. Presumably permission is denied because the file is open, but how is that possible?

    Any suggestions?

    Reply
  7. TJphonix

    I got this error:

    Deployment error
    failed to deploy a stack: qbittorrent Pulling no matching manifest for linux/arm/v7 in the manifest list entrie

    I’m using a Raspberry PI 3 B+

    Reply
    • Addicted2Tech

      I am going to update this tutorial as it has problems. Sorry for any inconvenience.

      Reply
  8. Bob

    Here is a stack that is working. I figured it out myself!

    version: “2.1”
    services:
    qbittorrent:
    image: lscr.io/linuxserver/qbittorrent
    container_name: qbittorrent
    environment:
    – PUID=1002
    – PGID=100
    – TZ=America/Chicago
    – WEBUI_PORT=8282
    volumes:
    – /srv/dev-disk-by-uuid-0B7B03040B7B0304/Appdata/qbittorrent:/config
    – /srv/dev-disk-by-uuid-0B7B03040B7B0304/BOBTRAVEL/MEDIA/downloads:/downloads
    ports:
    – 8282:8282
    restart: unless-stopped

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

<a href="https://www.addictedtotech.net/author/attadmin/" target="_self">Addicted2Tech</a>

Addicted2Tech

We love technology and enjoy sharing helpful FREE content for others to enjoy. We believe in community. If you like what we do please support us by sharing and liking our tutorials & Subscribing to our YouTube channel. You can also follow us on social media.

Support Our Work!

Donate Via Patreon




Raspberry Pi 4 Model B 8GB

Last update on 2024-03-27 / Affiliate links / Images from Amazon Product Advertising API

CanaKit Raspberry Pi 4 Extreme Kit – 128GB Edition (4GB RAM)

Last update on 2024-03-27 / Affiliate links / Images from Amazon Product Advertising API




We Are An Affiliate!

Just so you know, we may collect a share of sales or other compensation from the links on this page. As an Amazon Associate, I earn from qualifying purchases.

The affiliate link recommendations come at no extra cost to you.

We hope you love the products we recommend!

Thank you if you use our links; we really appreciate it!




Related Posts