FreeNAS: Qbittorrent Manual Install
Installing Qbittorrent manually to a FreeNAS jail with an already operating VPN connection is the best way to get a secure instance of a bittorrent client up and running 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 instrucitons in this article: FreeNAS: Add VPN Connection to a Jail. This 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 FreeNAS web interface by selecting
Plugins -> Available -> Qbittorrent and following the install instructions there. Alright! Let’s jump in!
This article is part of my series of FreeNas setup, configuration and install articles.
UPDATE: I have updated this article for TrueNAS and you can read the TrueNAS: Qbittorrent Manual Install article.
Well, this part is pretty straight forward. Once you have created a new jail with your VPN connection as shown in the FreeNAS: 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 FreeNAS 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
There are other instructions out there on the web (such as this one, which frustratingly is one of the top google results) which would have you create and edit a
/etc/rc.d/qbittorrent however this is probably not the best way to set things up as this directory is reserved for applications that are part of the â€œbaseâ€ system. So instead, we will work from the
/usr/local/etc/rc.d/qbittorrent 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 (FreeNAS: Add VPN Connection to a Jail) which creates on OpenVPN connection for your jail, you will see
openvpn. In this directory there should also be a
qbittorrent which was created by the Qbittorrent install. This file should look like this.
# PROVIDE: qbittorrent
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable this service:
# qbittorrent_enable: Set to NO by default. Set it to YES to enable it.
# qbittorrent_conf_dir: Directory where qbittorrent configuration
# data is stored.
# Default: /var/db/qbittorrent/conf
# qbittorrent_download_dir: Directory to store downloaded data.
# Default: /var/db/qbittorrent/Downloads
# qbittorrent_user: The user account transmission daemon runs as.
# Default is ‘qbittorrent’
# qbittorrent_group: The group associated with username qbittorrent
# daemon runs as. Default is ‘qbittorrent’
If it does, you are set and there is no need to change anything here. However as you will see referenced in the text of this file, we do need to edit the file
/etc/rc.conf and add at least one line in there. Open the nano editor with the following command:
You will need to add the following at the end of the file:
Save the file and exit nano by pressing Ctrl-X.
Start qbittorrent using the following:
service qbittorrent start
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. This should bring up the Qbittorrent web interface. Login with the default credentials: user:admin password:adminadmin. If that work, you now have Qbittorrent up and running.
Changing Default Qbittorrent Uses
Installing Qbittorrent this way will also set it to run as the default user ‘qbittorrent’, which is also automatically created by the qbittorrent install. I have not been able to get it to run as a different user, however running as this user has worked fine, so I haven’t experimented further. As always, you will need to be very careful with user file permissions both with the jail and how they related to the larger FreeNAS server users. Changing the user should be a simple matter of editting the the
/etc/rc.conf file and adding something like the following:
20 thoughts on “FreeNAS: Qbittorrent Manual Install”
I deleted my qbittorrent thread on the FreeNAS forum. As you mentioned, it had some bad information in it. I look forward to using your guide!
Great guide, used it this and the “FreeNAS: Add VPN Connection to a Jail” to get this far. One thing though on useing the
service qbittorrent start
command I get
/usr/local/etc/rc.d/qbittorrent: WARNING: $qbittorrent_enable is not set properly – see rc.conf(5).
Cannot ‘start’ qbittorrent. Set qbittorrent_enable to YES in /etc/rc.conf or use ‘onestart’ instead of ‘start’.
I have added
to the end of the file and changed
with no joy. It only works if I use
service qbittorrent onestart
I have the same error, trying to figure it out at the moment also. Anyone else know what the above issue is?
This is because you copy the text from the website, the characters â€ will be incorrect. Delete â€YESâ€ and retype it for the correct formatting. â€ is not â€œ.
Likely a noobie question, but why add Qbittorrent in a existing or new OpenVPN jail as Qbittorrent supports SOCKS5? If I understand correctly, I wouldnâ€™t need a separate OpenVPN install.
It works for me as I have qbittorrent, sonarr, radarr, lidarr, etc all in the same jail and all are tunneled through the vpn.
All as an alternative to editing the file you can us this command from the cli:
I will update the post shortly.
Awesome guide, thank you!
Everything works fine for me except the very last step, when i go to a web browser and try to access port 8080 (in my case http://192.168.1.5:8080) i get a popup asking for the user details but entering username: admin and pw: adminadmin fails.
Interestingly, the message in the popup is:
http://192.168.1.5:8080 is requesting your username and password. The site says: â€œwebdavâ€
Not sure what webdav has to do with thisâ€¦any ideas?
Ignore my post aboveâ€¦like a total noob i was using my freenas ip instead of the jail ip.
Now that my qbittorrent webui is up and running, i ‘m having an issue with loading search plugins – the dialog for adding a new plugin doesn’t seem to accept any url I type in it…no errors, but nothing happens. Is the dialog expecting a web url, a folder in the jail, or a folder on the machine that is running the browser? I’ve tried them all and none seem to work, but perhaps i’m not entering them correctly.
I have followed the steps and it seems that I have done everything exactly as you have it. For instance, if I do â€œservice qbittorrent startâ€ it says that it is already running.
However, when I go to the http://jailip:8080, it basically just times out with no explanation. It doesnâ€™t ask me to put in a user name or password.
The problem is related to the vpn kill switch I set up. I disabled that and I was able to access the site. I just need to figure out how to configure the vpn kill switch to allow access to that port.
Glad you identified the issue. What instructions did you follow to install the vpn switch.
I followed the link in your openvpn explainer (https://github.com/danjacques/freenasdocs/blob/master/guides/vpn-client-jail.md).
That being said, even when I disable the vpn and the kill switch, I am still having problems with qbittorrent. I am able to get to the portal and add torrents, but the download doesn’t actually start and it stalls out.
Meh, can access qbittorrent, but downloading doesnâ€™t work, even with the vpn and kill switch off.
Installed on Truenas 12.1 (maybe asking for trouble..). qBittorrent works fine and openvpn work file but I canâ€™t get torrents to start with qBittorrent when openvpn is enabled. Looks like same issue others have had above. Any ideas?
I also tried disabling openvpn and using the qBittorrent proxy connection settings for my vpn (NordVPN) but that also doesnâ€™t work â€“ doesnâ€™t even add/accept a torrent. No errors in the qBittorrent log.
Oops, above was meant to say Truenas 12.0 (which uses FreeBSD 12.1, ofcourse). Not sure if this is a FreeBSD issue or qBittorrent.
I haven’t yet tried setting this up on TrueNAS. I do have a test box, and if I find some time, I will check it out.
Found the solution to qBittorrent not working properly with openvpn. You need to bind qBittorrent to the correct vpn interface.
When openvpn is running, type ifconfig to find the name of the “tun” device (e.g. “tun0”, “tun1”). Then edit yourqBittorrent.conf file (usually in /var/db/qbittorrent/conf/qBittorrent/config/) and add the following line under the [Preferences] section:
Replace “tun1” with your tun device name. Best to stop qBittorrent while editing and then restarting it. This also works with an ipfw killswitch if you have one.
Hope that helps someone.
I am using FreeNAS-11.3-U2.1 and have attempted to install qbittorrent via plugin or manually here w/your guide. I get 0 joy either route. I’m stymied at every turn it would appear.
The plugin route presents a relatively unhelpful error of it being unable to install the qbittorrent-nox around something like 75%. Again, not helpful.
Falling back to your guide here, I get immediate denial due to packages that either don’t exist or aren’t sufficiently new enough. My clonejail release is 11.4 and after pkg update, it doesn’t not find several packages.
root@qbittorrent:~ # pkg install nano wget openssl pkgconf qt5-core qt5-network qt5-svg qt5-linguisttools qt5-buildtools qt5-make boost-all libtorrent-rasterbar
Updating FreeBSD repository catalogue…
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching ‘qt5-network’ have been found in the repositories
pkg: No packages available to install matching ‘qt5-svg’ have been found in the repositories
pkg: No packages available to install matching ‘qt5-linguisttools’ have been found in the repositories
pkg: No packages available to install matching ‘qt5-make’ have been found in the repositories
Again, boned at the ’round 0′ outing.
If I install everything else and s/qt5-make/qt5-cmake/g and yolo it, I end up getting hosed in the ./configure step w/a:
Package dependency requirement ‘libtorrent-rasterbar >= 1.2.11’ could not be satisfied.
Package ‘libtorrent-rasterbar’ has version ‘1.2.10’, required version is ‘>= 1.2.11’