Home assistant add-on: qbittorrent
Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!
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
- usage of ssl
- ingress
- optional openvpn support
- allow setting specific DNS servers
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, must be located in /ssl
keyfile: privkey.pem #sslkeyfile, must be located in /ssl
whitelist: "localhost,192.168.0.0/16" # list ip subnets that won't need a password (optional)
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
localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS...
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
openvpn_enabled: true/false # is openvpn required to start qbittorrent
openvpn_config": For example "config.ovpn" # name of the file located in /config/openvpn.
openvpn_username": USERNAME
openvpn_password: YOURPASSWORD
openvpn_alt_mode: bind at container level and not app level
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...)
silent: true #suppresses debug messages
Installation
The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on.
- 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)
- Install this add-on.
- Click the
Savebutton to store your configuration. - Set the add-on options to your preferences
- Start the add-on.
- Check the logs of the add-on to see if everything went well.
- Open the webUI and adapt the software options
Integration with HA
Use the qBittorrent integration
Common issues
ipv6 issues with openvpn (@happycoo)
Add this code to your .ovpn config
# don't route lan through vpn
route 192.168.1.0 255.255.255.0 net_gateway
# deactivate ipv6
pull-filter ignore "dhcp-option DNS6"
pull-filter ignore "tun-ipv6"
pull-filter ignore "ifconfig-ipv6"
nginx error code (@Nanianmichaels)
[cont-init.d] 30-nginx.sh: executing... [cont-init.d] 30-nginx.sh: exited 1.
Wait a couple minutes and restart addon, it could be a temporary unavailability of github
Local mount with invalid argument (@antonio1475)
[cont-init.d] 92-local_mounts.sh: executing... Local Disks mounting... mount: mounting /dev/sda1 on /mnt/sda1 failed: Invalid argument [19:19:44] FATAL: Unable to mount local drives! Please check the name. [cont-init.d] 92-local_mounts.sh: exited 0.
Try to mount by putting the partition label in the "localdisks" options instead of the hardware name
Loss of metadata fetching with openvpn after several days (@almico)
Add ping-restart 60 to your config.ovpn
Support
Create an issue on github, or ask on the home assistant thread
