Docker Apps with Electric Eel

Hi All,

I’m fairly new to TrueNAS and trying to set up qBittorrent with a VPN (including a killswitch). I understand that TrueNAS is moving towards Docker apps, so instead of setting everything up in a jail, I thought I might as well update now so I only have to do it once. However, I’m really struggling to find a guide on how to get qBittorrent working with a VPN on Electric Eel, as all the guides suggest using the GUI to add a Docker image, which is no longer possible. Alternatively, they suggest using TrueCharts, which also doesn’t seem to be an option now that they are no longer supporting TrueNAS.

Can anyone point me in the right direction on how to install this Docker app on my Electric Eel box?
https://hub.docker.com/r/dyonr/qbittorrentvpn/

Thanks!

The stumbling point is “this” Docker app, whose installation instructions provide only a docker run command.
Option 1: Run the command in CLI.
Option 2: Convert the docker run command into a compose.yaml file. Follow @Stux’ tutorial to install Dockge and paste the .yaml file.
Option 3: Install Portainer instead of Dockge. Flip through the multiple tabs in Portainer’s GUI to reproduce the options from command line.
Option 4: Find another torrent app which comes with a pre-built compose file and fall back to option 2.

Although, I spend a bit of time showing the a sandbox migration, I also show how to install and use dockge

Thanks, I have actually watched your video a few times before you posted this. I understand it was more for migration rather than trying to install fresh docker apps as I couldn’t really see where that came into play. I’ll take another watch, appreciate all the replies.

Yeah. Use dockge with docker compose to build custom apps.

(I’ve been testing the static ip thing in eel)

Dockge is mostly an interface to paste or edit compose files. Running a compose file installs an app.

If you don’t like YAML, install Portainer instead and let it automatically generate the compose file.

1 Like

Never touched a yaml or docker until today. Stux’ video helped me get started, and chatgpt/google/trial-and-error has helped me get to setting up my own. Will check out Portainer next just to see what else it can do.

Adding Apps through the TrueNAS GUI led to an issue where I couldn’t create any more apps once I have ~30 running. Seems each app is allocated a /16 or /20 and it runs out of available subnets. Thought about finding where I could modify them, but was concerned any updates/reboots/etc would overwrite my changes.

The setting is in the daemon.json.

But I don’t think that’d be persistent

IX is going to have to add a preference somewhere. Probably in the apps screen menu widget.

2 Likes

I logged a bug for this

https://ixsystems.atlassian.net/browse/NAS-130970

Also, links to the solution… which may only be temporary until its fixed properly.

2 Likes

Good news is it seems that the pool size has been increased in the current nightly.

1 Like

Thanks for your great video @Stux. When using Dockge and/or docker-compose through command on Electric Eel, can I create docker networks and use env. vars / secrets as usual?

Thanks in advance.

Yes.

(Although I didn’t specifically test secrets)

Great, thanks.

This isn’t the greatest solution, but if you set up a pfSense or OPNsense router/firewall, you can choose to route specific ports associated with your TrueNas IP through a VPN Gateway.

By doing this I was able to route certain apps through my PIA VPN, while leaving the rest unobscured by the VPN. Not the greatest solution, but it ends up working to the same end… and I don’t have to worry about things changing in TrueNas ever again.

Run this in Dockge. you can either add this to a stack or create a new one. This should be all that you need to get qbit to run with the gluetun vpn set up. I’ve been running it perfectly since they released the dockge app for 24.10. I personally use Mullvad but you can look up on google how to set up gluetun/qbittorrent.

version: “3.8”
services:
gluetun:
image: qmcgaw/gluetun:latest
cap_add:
- NET_ADMIN
environment:
- PUID=568 #CHANGE_TO_YOUR_UID
- PGID=568 #CHANGE_TO_YOUR_GID
- VPN_SERVICE_PROVIDER=mullvad
- VPN_TYPE=wireguard
- WIREGUARD_PRIVATE_KEY=xxxxxxxxxxxxxxxxxxx
- WIREGUARD_ADDRESSES=xxx.xxx.xxx.xxx/32
- SERVER_COUNTRIES=xxxxxxxxx
volumes:
- /mnt/xxx/xxxx/xxx/xxx/xxx:/config
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp
restart: always
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
network_mode: service:gluetun
restart: always
environment:
- PUID=568
- PGID=568
- TZ=America/New_York
- WEBUI_PORT=8080
volumes:
- /mnt/xxx/xxx/xxx/xxx/xxx/xxx:/config
- /mnt/xxx/xxx:/downloads
depends_on:
gluetun:
condition: service_healthy
networks: {}

Not as is. Please wrap it in triple backticks ``` to preserve indentation, which the stupid markup langage considers as expressive.

1 Like

Here it is with the triple backticks with hopefully the correct indentation.

services:
  gluetun:
    image: qmcgaw/gluetun:latest
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=568 #CHANGE_TO_YOUR_UID
      - PGID=568 #CHANGE_TO_YOUR_GID
      - VPN_SERVICE_PROVIDER=mullvad
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=xxxxxxxxxxxxxxxxxx
      - WIREGUARD_ADDRESSES=xxx.xxx.xxx.xxx/32
      - SERVER_COUNTRIES=xxxxxx
    volumes:
      - /mnt/xxx/xxx/xxx/xxx/xxx:/config
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: always
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    network_mode: service:gluetun
    restart: always
    environment:
      - PUID=568
      - PGID=568
      - TZ=America/New_York
      - WEBUI_PORT=8080
    volumes:
      - /mnt/xxx/xxx/xxx/xxx/xxx/xxx:/config
      - /mnt/xxx/xxx:/downloads
    depends_on:
      gluetun:
        condition: service_healthy
networks: {}
1 Like

just a question: at the current moment is there a way to use the custom app AND use environment variables from a .env file in the truenas scale GUI? Will it be added sooner or later? Dockge is a good tool but it is not really maintained and it has it’s own good amount of bugs to be honest

Its last commit was two days ago. How is that “not really maintained”?

2 Likes

Yes, but last release was on january which isn’t exactly yesterday