Install guide for Arr apps and qBittorrent with VPN

So you’ve heard about Synology and how it can be used as a great media server, but have no idea how to go about it? No worries, because neither did I! Unfortunately the guides I used were broken in one way or another, and I would have to start all over.

I figured I would create a guide on how I used the available guides for a successful install process…note, I’m not going to go through on how to setup the Arr apps after they are installed, just because that’s a straightforward process.

I did not actually create any of the following, just putting it all in one place so it’s easy for others to use! I’m also inviting any critiques for the changes I made!


Before we start doing any installations, install the following:

On your NAS, install Docker and TextEditor

On your computer/laptop, install a SSH provider. I use a Mac, so I already have terminal installed.


Apps I am currently using:

u/xadnem does a great job of explaining what each app does here

Jellyfin – media server. You can also use Plex or Emby.

Ombi – I use this as a discover and request app for new media content ie new movies/shows. Think Netflix. It is synced to Radarr and Sonarr, so that if there is any movie or show I am interested in, I can request it through Ombi. OK for now, but would ditch it in a heartbeat if Jellyfin ever manages to allow discovery and request option. *note, if you are using Plex, you may want to use Overseer instead.

Radarr – your primary movie arr app.

Sonarr – your primary tv show arr app.

Prowlarr – Both Radarr and Sonarr connect to this app as it provides the indexers for both. I also like to use it to manually search for and DL certain torrents.

Qbitorrent – your actual torrent download app. Some may also prefer to use Deluge.

Gluetun – the app that will allow you to use your VPN client of choice, and essentially “syncs” it with Qbittorrent.


Ok, so now that we have that out of the way, let dive in!

ARR apps installation:

I used this guide from trash-guid­­­es. Because I wanted to make life for me easy, I went with the automated script option, especially as it will setup the folder structures and app installation for you. Once you setup the home folders and SSH on your computer, you can go ahead with the 2 scripts that trash-guides provides.

When the time comes to install the apps, DO NOT SELECT OR INSTALL qBITTORRENT. We will be doing this separately, as the trash-guides install doesn’t work all that great. Only install the ARR apps you want ie Radarr, Sonarr, Prowlarr, etc.

Just a heads up, if you are undecided about a certain app, go ahead and install it. Its easier to delete the app later on. Unfortunately, re-running the trash-info arr install script deletes all of the former apps, which I unfortunately found out after setting everything up initially.


Qbitorrent with VPN (via GlueTun)

I used this guide from Dr.Frankenstein.

You can skip step 1 and step 3 of the preceding guides (directory setup guide and docker bridge network guide), as the previous trash-guides will already have set that up for you. You do need to perform step 2, however (setup restricted Docker user). Write down the UID, and GID numbers down from the end of this step (for example mine was “uid=1028(dockerlimited) gid=100(users) groups=100(users)”.

Next, go to the Gluetun github and search for your provider. In the Docker compose step, you are going to input the data that you collected for your VPN provider. I’ve attached my own as an example; I recently signed up with Mullvad and chose the wireguard interface, you can use OpenVPN if you want. Note, if you go with Mullvad and request the wireguard private keys, use the ones in the .conf file you download, not the one private key that is on the website itself!

version: "3.8"
services:
  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    volumes:
      - /volume1/docker/gluetun:/gluetun
    environment:
      # See https://github.com/qdm12/gluetun/wiki
      - PUID=1028
      - PGID=100
      - TZ=US/Eastern
      - LOG_LEVEL=debug
      - VPN_SERVICE_PROVIDER=mullvad
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=******
      - FIREWALL_DEBUG=off  #optional-set to 'on' only for debugging
      - VPN_INTERFACE=tun0
      #- WIREGUARD_PORT=51820
      - WIREGUARD_ADDRESSES= ****
      #- SERVER_CITIES=Virginia
      - SERVER_HOSTNAMES=us158-wireguard
    ports:
      - 8888:8888/tcp # HTTP proxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
      - 8073:8073 # port for qbittorrent
    network_mode: trash-guides_default
    restart: unless-stopped
  qbittorrent:
    image: linuxserver/qbittorrent
    container_name: qbittorrent
    environment:
      - PUID=1028
      - PGID=100
      - TZ=US/Eastern
      - WEBUI_PORT=8073
    volumes:
      - /volume1/docker/qbittorrent:/config
      - /volume1/data/torrents:/data/torrents #optional
    network_mode: "service:gluetun"
    restart: unless-stopped

As the guide recommends, save the compose file in “/docker/gluetun and call it qbittorrentvpn.yml”.

Continue on to the SSH and Docker-Compose section of the guide and follow it to completion.


Hopefully there were no errors in the last step!

You’re going to go back to Trash-guides, and follow these instructions to setup qBittorrent.


Almost there!

Before you start connecting your apps together, make sure qBittorrent actually works with VPN. First, change the Listening Port under the Tools->Connection to whatever you had listed in your Gluetun compose file (mine was 8888).

Now, go to IPleak.net, and click on Activate Torrent Address detection. Copy the magnet link into qBitorrent. If you see a different torrent address IP being listed vs your actual IP, you’ll know that qBittorrent has been successfully linked to your VPN!


I hope this guide helps! Remember, you still need to setup your arr apps so they communicate with one another, but that is easy! Just use the Trash-infos userguides, they are quite helpful.

Those are backends btw. Front end is the client you watch on. And windows has the SSH command just like macOS

I have two questions:
I have started the setup with qbittorrent plus VPN, so I followed steps 1 and 3 to create the directories. I’m scared to start on the arrs and then will mess up all the folders I have already created

Second question, how to add the " activate torrent address detection " to qbittorrent? I can’t open ipleak.net in my synology

Got all this running. However I read this.
Additionally, each movie must be in its own folder within the root/library folder.
all my movies are just under a Genre folder. they do not have there own folder per movie. Any idea how to go about fixing that?

I got all the containers set up via these guides. How ever I cant get Sonarr or Radarr to connect to QbitTorrent. I get this in Radarr logs. Im using the IP of my NAS with the port 8090. Which works when I use a browser to see it.

[v5.9.1.9070] NzbDrone.Core.Download.Clients.DownloadClientException: Failed to connect to qBittorrent, check your settings.

—> System.Net.WebException: Http request timed out

at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponseAsync(HttpRequest request, CookieContainer cookies) in ./Radarr.Common/Http/Dispatchers/ManagedHttpDispatcher.cs:line 144

at NzbDrone.Common.Http.HttpClient.ExecuteRequestAsync(HttpRequest request, CookieContainer cookieContainer) in ./Radarr.Common/Http/HttpClient.cs:line 157

at NzbDrone.Common.Http.HttpClient.ExecuteAsync(HttpRequest request) in ./Radarr.Common/Http/HttpClient.cs:line 70

at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in ./Radarr.Common/Http/HttpClient.cs:line 128

at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxyV2.IsApiSupported(QBittorrentSettings settings) in ./Radarr.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs:line 35

— End of inner exception stack trace —

at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxyV2.IsApiSupported(QBittorrentSettings settings) in ./Radarr.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs:line 67

at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.FetchProxy(QBittorrentSettings settings) in ./Radarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 83

at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.<>c__DisplayClass7_0.b__0() in ./Radarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 78

at NzbDrone.Common.Cache.Cached`1.Get(String key, Func`1 function, Nullable`1 lifeTime) in ./Radarr.Common/Cache/Cached.cs:line 99

at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.GetProxyCache(QBittorrentSettings settings, Boolean force) in ./Radarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 78

at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.GetProxy(QBittorrentSettings settings, Boolean force) in ./Radarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 61

at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrent.TestConnection() in ./Radarr.Core/Download/Clients/QBittorrent/QBittorrent.cs:line 435

Great guide, structured nicely. Although I would recommend offloading the qbittorrent-vpn/gluetun onto a raspberry pi, otherwise it uses too much CPU

I followed trash guides before I found your post. Once I saw this, I removed the qbittorrent from trash, and started following your steps. I am confused about drfrankenstiens step #2, because didn’t I already create a user just for docker from trash guide? Am I making new group with a second new user?

I get completely lost on the gluetun github. I find my provider and have what I think is the right docker compose file, but I am not seeing any further steps. Feel like I am in way over my head

I followed tech byte tips qbitorrents VPN. I can get the gui but unable to download anything no matter what I try. It just says waiting for download. No errors. The logs just show waiting for download. Using express VPN. There’s no errors it just refuses to download anything from a torrent url. I can upload tho. I don’t get it lol

Thank you, commenting to come back to this soon

Found my way here from a search, and this guide was still great. Thank you. Note that Dr. Frankenstein has an updated guide given some changes since this was originally published that tweak how you set up Gluetun. With that, this is pretty comprehensive. Folks still finding their way here should follow this with confidence.

Has anyone received this error during the script run and know how to resolve?

docker-compose: error while loading shared libraries: libz.so.1: failed to map segment from shared object

How did you connect your qBittorrent to Radarr/Sonarr? I’ve tried the same IP used to connect to the WebUI as the Host name, but Radarr wouldn’t recognize it for me.

You’re right! As a non-IT person, def need to educate myself more!

I opened ipleak in just a browser. then saw the detect torrent thing and clicked on that. Showed a different IP then the rest. so I assumed it was working :slight_smile:

As well I cant get Prowlarr to connect to Radarr and Sonarr. keeps timing out. Tried my NAS IP with port, tried localhost and port. My NAS does have Firewall enabled. I turned that off and still cant connect.

Any ideas?

So what worked for me:

  1. Host - the IP address
  2. Port - typically it’s 8073, but doublecheck this on your end.

Also, in the qbitorrent client web UI, select the option to “Bypass authentication for clients on localhost”. (tools->option->Web UI)

Let me know if that works!

You’re good. Great guide. Just terminology that affects no one really. For your benefit.

And also so windows users wouldn’t try to go get an app. You (we) open terminal and type ssh; they open command prompt (maybe powershell also) and type ssh.

Why bother with convoluted steps when everything can be done with Portainer and just one Docker-Compose?

Thank you! I actually ended up putting both qBitt and Radarr in the same docker-compose and entered in the hostname field “http://containername:port”. This way even if the IP changes upon restart, they would still be linked.

Gotcha! For some reason, I thought windows users had to install a program like Putty to SSH into the NAS. Good to know, however!