Guide: How to install qbittorrent (or any app) with vpn on Truenas Electric Eel

Ah, I figured out the issue. I’m an idiot.

Default download location in qbitorrent was /downloads and I’d mounted it as /media. Changing it to the correct default location did the trick.

If anyone wants to steal my config, here’s my protonvpn-based compose files.

I also added a Web UI button on qbittorrent (weirdly, you’ll get unauthorized unless you click the URL bar and hit enter, refresh doesn’t work).

qbittorrent:

services:
  qbittorrent:
    container_name: qbittorrent
    restart: unless-stopped
    environment:
      - PUID=568
      - PGID=568
      - TZ=<TZ HERE>
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    image: lscr.io/linuxserver/qbittorrent:latest
    network_mode: container:gluetun
    volumes:
      - /mnt/.ix-apps/app_config/qbittorrent:/config
      - <DATASET PATH HERE>:/downloads
x-portals:
  - host: <TRUENAS SCALE IP>
    name: Web UI
    path: /
    port: 8080
    scheme: http

and the gluetun compose file for protonvpn:

version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    ports:
      - 8888:8888/tcp # HTTP proxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
      - 8080:8080 #qbittorrent
      - 6881:6881 #qbittorrent
      - 6881:6881/udp #qbittorrent
    volumes:
      - <YOUR MOUNT HERE>:/gluetun
    environment:
      - VPN_TYPE=wireguard
      - VPN_SERVICE_PROVIDER=protonvpn
      - WIREGUARD_PRIVATE_KEY=<PRIVATE KEY>
      - WIREGUARD_ADDRESSES=<WIREGUARD ADDRESS>
      - WIREGUARD_PUBLIC_KEY=<PUBLIC KEY>
      - WIREGUARD_ENDPOINT_IP=<ENDPOINT IP HERE>