MarkusMcNugen / docker-qBittorrentvpn

Docker container which runs a headless qBittorrent client with WebUI and optional OpenVPN
https://hub.docker.com/r/markusmcnugen/qbittorrentvpn/
GNU General Public License v3.0
166 stars 92 forks source link

Cant let VPN work #126

Closed poudenes closed 2 years ago

poudenes commented 2 years ago

Hi,

I tried many things but can't let it work. This is my compose:

version: "3.9"
services:
  qbittorrent-openvpn:
    image: markusmcnugen/qbittorrentvpn
    container_name: qbittorrent_vpn
    hostname: qbittorrent_vpn
    restart: always
    ports:
      - 8080:8080
      - 8999:8999
      - 8999:8999/udp
    cap_add:
      - NET_ADMIN
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /volume1/docker/qbittorrent_test/:/config
      - /volume1/data/torrents:/downloads:rw

    environment:
      - TZ=Europe/Amsterdam
      - VPN_ENABLED=true
      - LAN_NETWORK=192.168.100.0/24
      - NAME_SERVERS=1.1.1.1,1.0.0.1
      - WEBUI_PORT_ENV=8080
      - INCOMING_PORT_ENV=8999

This is the log when I start it

2022-04-12 15:27:10.317887 [info] VPN_ENABLED defined as 'true'
2022-04-12 15:27:10.377736 [info] Adding 1.1.1.1 to resolv.conf
2022-04-12 15:27:10.416253 [info] Adding 1.0.0.1 to resolv.conf
2022-04-12 15:27:10.452250 [info] PUID not defined. Defaulting to root user
2022-04-12 15:27:10.488844 [info] PGID not defined. Defaulting to root group
root:x:0:0:root:/root:/bin/bash
Group root exists
root:x:0:0:root:/root:/bin/bash
User root exists in /etc/passwd
2022-04-12 15:27:10.640962 [warn] UMASK not defined (via -e UMASK), defaulting to '002'
2022-04-12 15:27:10.676047 [info] Starting qBittorrent daemon...
Logging to /config/qBittorrent/data/logs/qbittorrent-daemon.log.
2022-04-12 15:27:11.865960 [info] qBittorrent PID: 51
2022-04-12 15:27:11.890283 [info] Started qBittorrent daemon successfully...

inside "/volume1/docker/qbittorrent_test/" there is the folder "openvpn" with 1 .OVPN file. Inside this file I added: `auth-user-pass credentials.conf'

at the bottom of the .OVPN file

In same folder I have the 'credentials.conf' file with first the user and second line the password

poudenes commented 2 years ago

When I go into the container and use this command:

root@qbittorrent_vpn:/config/openvpn# openvpn --config fr.ovpn The vpn is working

Tue Apr 12 15:41:06 2022 Initialization Sequence Completed

So the config .OVPN file with credentials.conf file are working

poudenes commented 2 years ago

SOLVED:

VPN_ENABLED=true

changed to

VPN_ENABLED=yes

Normal everything is with true/false :)

it works now!