New to docker. How do i troubleshoot a manually configured app that's crashing?

If there are anyone here that have the time the docker image I’m trying to run is: dyonr/qbittorrentvpn

The image is basically running qBittorrent through a VPN client, but the readme is written on the assumption that the image is configured and started via terminal so I’m guessing I just missed something that needs to be configured.

Before it crashes I can tell that the VPN connection is established. I can even ping local machines as well so the routing between the VPN and the local network is working too but I can’t see that the instance ever gets an IP address neither via shell commands or in the TrueNAS app management UI.

I assume there are logs somewhere, but where do I find them?

This is how i run it :

networks: {}
services:
  qbittorrentvpn:
    cap_add:
      - NET_ADMIN
    container_name: qbittorrentvpn
    environment:
      - VPN_ENABLED=yes
      - VPN_USER=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      - VPN_PASS=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      - VPN_PROV=custom
      - VPN_CLIENT=openvpn
      - ENABLE_STARTUP_SCRIPTS=no
      - ENABLE_PRIVOXY=yes
      - STRICT_PORT_FORWARD=yes
      - USERSPACE_WIREGUARD=no
      - ENABLE_SOCKS=yes
      - SOCKS_USER=admin
      - SOCKS_PASS=socks
      - LAN_NETWORK=192.168.1.0/24
      - >-
        NAME_SERVERS=84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1
      - VPN_INPUT_PORTS=1234
      - VPN_OUTPUT_PORTS=5678
      - DEBUG=true
      - WEBUI_PORT=8080
      - UMASK=000
      - PUID=0
      - PGID=0
    image: binhex/arch-qbittorrentvpn
    ports:
      - '8080:8080'
      - '8118:8118'
      - '9118:9118'
      - '58946:58946'
      - 58946:58946/udp
    restart: unless-stopped
    volumes:
      - /mnt/container/qbittorrentvpn/data:/data
      - /mnt/container/qbittorrentvpn/config:/config
      - /mnt/media/media:/media
      - /etc/localtime:/etc/localtime:ro

And it takes like 5minutes for it to come reachable, for some reason.

Slightly different image you are running @tontze, but I just want something that works so I might give this a go. Given the file you are showing me I assume you are using the yaml file option when setting it up and not the GUI configurator or is this some kind of summary view Truenas provides of GUI your configurator settings?

Yeah through yaml. I quess you can add this through GUI too, but u need to manually add every variable one by one.

So after fiddling about a bit I managed to get the binhex/arch-qbittorrentvpn container running with an openvpn configuration. Would like to use wireguard, but to be honest it matters very little.

Now I’m getting stopped at some point due to permissions:

..
2024-12-12 16:05:40.802503 [info] ENABLE_STARTUP_SCRIPTS defined as 'no'
2024-12-12 16:05:40.822775 [info] ENABLE_SOCKS defined as 'yes'
2024-12-12 16:05:40.844320 [info] ENABLE_PRIVOXY defined as 'yes'
2024-12-12 16:05:40.863456 [info] SOCKS_USER defined as 'admin'
2024-12-12 16:05:40.882061 [info] SOCKS_PASS defined as 'socks'
2024-12-12 16:05:40.901117 [info] WEBUI_PORT defined as '8080'
2024-12-12 16:05:46.010489 [info] SHARED_NETWORK not defined (via -e SHARED_NETWORK), defaulting to 'no'
chmod: changing permissions of '/config/supervisord.log': Operation not permitted

For the sake of convenience the folders mounted here are share via SMB, but i have given the apps user full control via the Set ACL feature in TrueNAS (recurisvely for the dataset). Should that not be enough?

I’d look at the ownership/perms of that folder/files from the shell.

1 Like

What is your container folder configuration and what puid:pgid you run container ?

In my example im using

      - /mnt/container/qbittorrentvpn/config:/config

Since you mentioned you gave permissions for apps user, i presume you have changed PUID and PGID lines to user 536 which is apps user

      - PUID=536
      - PGID=536

need to go in shell and in to folder (below line matches my config, i dont know yours, but you get the point :slight_smile: )

/mnt/container/

and do

sudo chown -R 536:536 qbittorrentvpn/

to give right permissions

And remember, for some reason it takes like 5mins for webui to come up :slight_smile:

It was indeed a permission issue. I had set up the folders with access in accordance with the plex app preset, but I had not set the correct PUID and PGID in the YAML file. When i fixed that it started working as expected.

1 Like