Home Assistant addon : qbittorrent (supports openvpn & smb mounts)

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture
Supports smb mounts Supports openvpn Supports ingress Supports ssl

About


Qbittorrent is a cross-platform free and open-source BitTorrent client.
This addon is based on the docker image from linuxserver.io.

This addons has several configurable options :

  • allowing to mount local external drive, or smb share from the addon
  • alternative webUI - only works when accessing with ip:port! Ingress webui is not affected
  • usage of ssl
  • ingress
  • optional openvpn support
  • allow setting specific DNS servers

Installation


The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on.

  1. Add my add-ons repository to your home assistant instance (in supervisor addons store at top right, or click button below if you have configured my HA)
    Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.
  2. Install this add-on.
  3. Click the Save button to store your configuration.
  4. Set the add-on options to your preferences
  5. Start the add-on.
  6. Check the logs of the add-on to see if everything went well.
  7. Open the webUI and adapt the software options

Configuration


Webui can be found at http://your-ip:8080, or in your sidebar using Ingress.
The default username/password : described in the startup log.
Configurations can be done through the app webUI, except for the following options

Network disk is mounted to /mnt/share name

GUID: user
GPID: user
ssl: true/false
certfile: fullchain.pem #ssl certificate
keyfile: privkey.pem #sslkeyfile
whitelist: "localhost,192.168.0.0/16" # list ip subnets that won't need a password (optional)
Username: "admin" #username to access webui. Please change it as the default is admin for all installations. 
customUI: selection from list # alternative webUI can be set here. Latest version set at each addon start.
DNS_servers : 8.8.8.8,1.1.1.1 # Keep blank to use router’s DNS, or set custom DNS to avoid spamming in case of local DNS ad-remover
SavePath: "/share/qbittorrent" # Define the download directory
networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas
cifsusername: "username" # optional, smb username, same for all smb shares
cifspassword: "password" # optional, smb password
cifsdomain: "domain" # optional, allow setting the domain for the smb share
password, same for all smb shares
openvpn_enabled: true/false # is openvpn required to start qbittorrent
openvpn_alternative_mode: true/false # if enabled, will tunnel only qbittorrent and not webui through vpn. Allows webui connection from external networks, but risk of decreased stability. 
openvpn_config": For example "config.ovpn" # name of the file located in /config/openvpn. 
openvpn_username": USERNAME
openvpn_password: YOURPASSWORD
run_duration: 12h #for how long should the addon run. Must be formatted as number + time unit (ex : 5s, or 2m, or 12h, or 5d...)

Integration with HA

Use the qBittorrent integration

Illustration (vuetorrent webui)


5 Likes

Very excited to see you’ve created this addon, thank you @alexbelgium :pray:

I am running HA on my Rpi4. When torrents complete I am unable to find them anywhere. Where is the default download location?
I also tried to configure torrents to download to a networked drive attached to my router, but even after adding the path in Qbittorrent’s web-ui and the networkdisks parameter in the addon’s configuration in HA, I’ve been unsuccessful.

1 Like

Hi, thanks for trying the addon! By default, downloads are saved in a /downloads folder that is not accessible,I’ll change that in the next version.

However, in the webui you can easily change the default folders and all options by going in Tools / Options in the Default Save path option… Would you prefer to set this setting in the addon configuration?

I think that changing the location after download also change the location of already downloaded files but not certain…

If you want to have the downloaded files accessible from outside the addon you could download to /media, /share, or mount a drive through the addons options!

I also tried to configure torrents to download to a networked drive attached to my router, but even after adding the path in Qbittorrent’s web-ui and the networkdisks parameter in the addon’s configuration in HA, I’ve been unsuccessful.

Did you receive an error message in the log? You need to disable the protection mode from the addon main page to allow mounting external shares. The path is mounted to /share/storagecifs

1 Like

Thank you! Changing the path to /media from within the web-UI gave me access :+1:

As for storing the files remotely on my networked drive, I don’t feel comfortable disabling the protection mode as you suggested, as it gives the addon full access to my entire setup. I can get around this by sharing the folder on my RPi on my LAN instead.

I understand… It’s a limitation of Home Assistant. Otherwise if you have access to the root machine (not possible on Home Assistant OS) you can mount it in /share/xxx for example and it will be accessible in the addon… Glad it’s working! I’m adding an option through the addon configuration, so from next version it will be configurable without needing to go in the WEBUI settings.

Something else I noticed is that when I make a snapshot of just the Qbittorrent addon, the size is >135 MB (with no torrents downloaded).
I couldn’t make much sense of what was in the archive when I looked inside.

I haven’t put much thought to size as what I do is wrap an addon around a pre-existing qbittorrent container from the linuxserver team. Only thing I’ve added that takes space are the custom WEBUI which are around 10mo each, but downloaded only if the option is enabled. Thanks for the feedback, I’ll look into it ! EDIT: actually it is an image based on Ubuntu and not Alpine so it is a normal size.

One possibility is that if you’ve a temporary folder left to /donwload/temporary (the default) your snapshot will include the partial torrent download. It only leaves this folder once it is fully downloaded

BTW, you don’t need to snapshot the addon, as the config files are stored in home assistant /config directory. It will be snapshoted at the same time as the hassio config. This also allows to edit manually the qBittorrent.conf file in the /config/qBittorrent directory

1 Like

@Nimrod_Dolev For the next version, the ability to mount smb shares in protected mode was added.
I also disabled the mount of local drives, which allows a score of 5 to the addon. To access local drives, you need to mount them first as smb share with this addon : [New Addon] Samba NAS. (Mount external disk and share it )

1 Like

@alexbelgium that sounds great, I’ll be happy to test the new version once it’s available.

I’ll try it as soon as possible. I was waiting for something like this! Thank you!

1 Like

How can I configure 2 smb networkdisks ? I’ve tried, but add-on mounted with same name… /storage/storagecifs" … It is normal? Thks.

I’ll add it to the next addon version. I hadn’t implemented that as I thought people would mount at most 1 smb.

There is two impact starting from the next version :

  • For each smb mount, the username and password will have to be specified
  • the current storagecifs folder will be disabled, and each smb mount will be mounted on a folder with probably the name of the share (I still need to see how to do that) - > current download paths will need t o be updated!

Hopefully it’ll be up in a couple days

1 Like

Thank you for your help.
My request is only because i cant mount my nas without a folder, i received an error that can mount protected shares. :neutral_face: If i could mount this, i will not require 2 smb shares.

New version up!
Warning : mount location of smb changed. See below.

  • New configuration option : set download path
  • New configuration option : set username for webUI
  • New feature : mount smb share in protected mode
  • New feature : mount multiple smb shares separated by a comma (all need to have same username and password).
  • New config/feature : mount smbv1
  • Changed path : changed smb mount path from /storage/externalcifs to /mnt/$NAS name
  • Removed feature : ability to remove protection and mount local hdd, to increase the addon score
1 Like

I have some problems updating the addon: I’m stil in ls113 and I don’t see the newer ones…

That’s strange. Current version is ls115. Could you please go in “Addon store”, click on the three little dots at top right, click Reload. This will refresh all addons. Then if the new version doesn’t appear, can you go in the System Tab, and check the log for errors.

Second option, remove the custom repo, reload using the above procedure, and reinstall the repo… I’ve just tested it is working so no readon it wouldn’t appear on yours.

Last option, uninstall the addon, then reinstall… Whole checking the logs for error messages

I know it seems pretty strange but I’ve done everything you said and…

21-02-19 11:46:25 INFO (SyncWorker_1) [supervisor.docker.interface] Removing image db21ed7f/armv7-addon-qbittorrent with latest and 14.3.3.99202101191832-7248-da0b276d5ubuntu18.04.1-ls113
21-02-19 11:46:25 INFO (MainThread) [supervisor.addons.addon] Removing add-on data folder /data/addons/data/db21ed7f_qbittorrent
21-02-19 11:46:26 INFO (MainThread) [supervisor.addons] Add-on 'db21ed7f_qbittorrent' successfully removed
21-02-19 11:46:47 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons/data/db21ed7f_qbittorrent
21-02-19 11:46:47 INFO (SyncWorker_1) [supervisor.docker.addon] Starting build for db21ed7f/armv7-addon-qbittorrent:14.3.3.99202101191832-7248-da0b276d5ubuntu18.04.1-ls113
21-02-19 11:49:04 INFO (SyncWorker_1) [supervisor.docker.addon] Build db21ed7f/armv7-addon-qbittorrent:14.3.3.99202101191832-7248-da0b276d5ubuntu18.04.1-ls113 done
21-02-19 11:49:04 INFO (MainThread) [supervisor.addons] Add-on 'db21ed7f_qbittorrent' successfully installed

Successfully installed… but version ls113. If I’m the only one with the problem, must be a problem by my side

Hi, I see the issue : your Home Assistant builds the addon based on its current cache, not on the current version. Have you reloaded manually the repos ?
You need to go in the “addon store” tab, click on the 3 dots at top right, and click Reload. After clicking the addon list will go dark for a couple seconds before coming back. In your supervisor log, you should have lines that appear like :

21-02-19 12:31:46 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
21-02-19 12:31:46 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
21-02-19 12:31:47 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/dianlight/hassio-addons repository
21-02-19 12:31:53 INFO (MainThread) [supervisor.store] Loading add-ons from store: 123 all - 0 new - 0 remove

If not you should check your “Core” log, or reboot the host as this would mean that the Home Assistant is stuck on cache. I guess other addons also don’t update ?

Well, I followed all the steps you said before, so yes, I’ve manually reloaded the repos, even multiple times. But now I’m sure it’s a problem with my hass.io installation and I don’t want to “steal the focus” about Qbittorrent addon, so I probably investigate more and maybe I’ll open a thread somewhere in the forum! Thank you for help and for the addon :smiley:

Two persons have notified the same issue of addons not updating… They are stuck on ls113. Did you find a solution to the fact that the repo reload code doesn’t appear in the supervisor log?