TrueNAS: Qbittorrent Manual Install

Installing qBittorrent manually to a TrueNAS jail with an already operating VPN connection is the best way to get a secure instance of a bittorrent client up and running. Following the steps to do this through this TrueNAS: Qbittorrent Manual Install article will allow you to download all your media privately and without worrying your ISP or somebody else is tracking your activity. Installing it in a jail allows you to pair it easily with a VPN connection while ensuring that the rest of your system does not suffer from reduced speeds of always being connected to a VPN. Before following the instructions in this article you can setup a VPN connection by following the instructions in this article:TrueNAS: Add VPN Connection to a Jail. This TrueNAS: Qbittorrent Manual Install article will show you how to install qBittorrent into an existing jail, such as one with an established VPN connection and thankfully the process is pretty straight forward. If you do want qBittorrent in a stand alone jail, you may want to consider just installing it via the TrueNAS web interface by selecting Plugins -> Available -> qBittorrent and following the install instructions there. Alright! Let’s jump in!

This is part of my ongoing series of TrueNAS and FreeNAS setup, configuration and install articles.

Installing qBittorrent

Well, this part is pretty straight forward. Once you have created a new jail with your VPN connection as shown in the TrueNAS: Add VPN Connection to a Jail article, go to shell prompt for that jail and enter the following:

pkg install qbittorrent-nox

If you get an error that the package cannot be found, it is probably because you created the jail via the TrueNAS plugins interface. To fix this follow the instructions in this article: FreeNAS: No Packages Available to Install Have Been Found in the Repositories.

Setting qBittorrent to Start on Jail Boot

We will be working from the /usr/local/etc/rc.d folder. In this folder there should be a file for each of the services which run on start up. If you have followed my guide (TrueNAS: Add VPN Connection to a Jail) which creates on OpenVPN connection for your jail, you will see openvpn. In this directory and there should also be the qbittorrent file which was created by the qBittorrent install. We are going to change the user that runs qbittorrent by editing this file with the following command:
nano /usr/local/etc/rc.d/qbittorrent

In the editor we are going to change the following two lines:

: ${qbittorrent_user=qbittorrent} : ${qbittorrent_group=qbittorrent}


to the following:

: ${qbittorrent_user=root} : ${qbittorrent_group=wheel}


We now need to set the service to start automatically and the easiest way to do that is by using the following command:
sysrc qbittorrent_enable="YES"

Now we are ready to start the qBittorrent using the following:
service qbittorrent start

Testing qBittorrent

So, now you can exit the jail and restart it. Once it is back up, lets open up a webbrowser and point to [YourLocalIP]:8080. That’s the local IP that your jail is operating on and port 8080. This should bring up the qBittorrent web interface. Login with the default credentials: user:admin and password:adminadmin. If that works, you now have qBittorrent up and running. You will of course want to configure and change the default webui username and password.

That’s it! You should now have qbittorrent up and running for all your torrenting needs!

Happy torrentin’!

~digiMoot

Liked it? Take a second to support digiMoot on Patreon!

19 thoughts on “TrueNAS: Qbittorrent Manual Install

  1. How do I setup remote access for Qbittorent (and maybe others like Sonarr, Radarr and Jacket). Would be nice to access these local ‘sites’ when I am away from home. Something with DuckDNS and LetsEncrypt (free services)? I don’t see anything mentioned on your site about remote access 😉

    1. In the que is a post on open vpn to allow you to connect to your local lan. From there you would be able to access these sites. I probably won’t get to the post until the Xmas break.

      1. Looking forward to it. In the meantime I will investigate this topic on my own and do some tests.

    1. You definitely don’t have to, but if you don’t you need pay close attention to user securities. Not just qbittorrent securities but also sonarr, radarr, etc. Given everything is running in a jail, security is perhaps less of an issue.

  2. Hi there, thanks for the plain language tutorial, all shell commands behaved as expected and as far as I can tell I should be up and running but torrents are starting stalled and stay that way. The only thing I’m unclear about and this might be unrelated is the mount points. I added a mount point to a separate drive. It points to the media folder in the openvpn/bittorrent jail. In the options in bittorrent do I change the downloads path to the separate hdd or to the mount point in the jail? Other than the mount point issue I’m not sure why torrents are stalled. Any suggestions would be appreciated.

    1. I should add that I setup a DHCP jail and I followed your other instructions for setting up openvpn and the wtfismyip test worked.

  3. Followed this guide and the TrueNAS OpenVPN guide and both were excellent. However I’m encountering an issue with OpenVPN blocking my torrent traffic. If I service stop openvpn, all my torrents start downloading immediately, but if openVPN is running then all my torrents are stalled. Seems if I restart the jail, the downloads start but if I add any new torrents they stall out until I restart the jail.

    Is there a connection configuration for OpenVPN or qbittorrent that I’m missing?

    1. In my case the UPnP port forwarding setting didn’t work correctly for qbittorrent v4.3.3. Other services do use UPnP so it wasn’t faulty router firmware. What I did was go into the port-forwarding tab of my router. I didn’t see the port and ip address for qbittorrent. So I added it manually there. Make sure its the same port as mentioned in QBitorrent>Options>Connection>Listening Port under “Port used for incoming connections”.
      Second thing I did: untick “Use UPnP / NAT-PMP port forwarding from my router” in qbitorrent. The checkbox “Use different port on each startup” should be unchecked as well (Default=unchecked).
      Hope this will fix you issue Kentclark.

  4. Same problem here. Currently investigating this issue. Maybe we have to download a newer version of openvpn or newer configuration files from the vpn provider. I will report back my findings.

    1. try setting your network interface in qbittorrent settings -> advanced to whatever device starts with tun.

  5. I cant get qbittorrent to save to a different dataset. My dataset is /mnt/data/torrents/qbittorrent I put this as a mount point. Inside qbittorrent webui I put /mnt/data/torrents/qbittorrent but it just creates those folders inside the jail instead of saving to the outside dataset. Not sure what the issues here is.

  6. Using this in conjunction with your OpenVPN guide sort of worked for me. In qBittorrent, http trackers worked great. udp trackers (DHT) did not work out of the box. I had to manually set the Network Interface in qBittorrent Settings -> Advanced from Any Interface to the tun device created by OpenVPN.

  7. Is there any way of relocating the configuration folder for qBittorrent anymore? I’ve configured rc.d/qbittorrent for the desired location (i.e. ${qbittorrent_conf_dir=”/usr/local/etc/rc.d/qBittorrent/testingconfiguration”}) but the installation keeps disregarding this and defaulting to /.config/

  8. Can you help explain how to update to the latest version? pkg install is an older version and I just can’t seem to figure out how to update it. I’ve followed many guides, but it never works.

Leave a Reply

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