thrnz / docker-wireguard-pia

A Docker container for using Wireguard with PIA.
271 stars 53 forks source link

webgui from other containers on network #13

Open sbaydush opened 3 years ago

sbaydush commented 3 years ago

I can't figure out how to get access to other containers webui when connected to the vpn docker's network. I have published the ports needed on the VPN container itself but it doesn't pass it through to the nzbget docker properly so the webgui never loads.

ScottESanDiego commented 3 years ago

Here's what I have, which gives me Wireguard for Transmission, and lets me get to the WebUI of Sonarr/Jackett/Radarr.

version: '3.8'
services:

  vpn:
    networks:
      wg-vpn:
    image: thrnz/docker-wireguard-pia
    container_name: wireguard-pia
    volumes:
      # Auth token
      - /data/software/wireguard-pia/:/pia
      # Forwarded port
      - /data/software/wireguard-pia/:/pia-shared
      # Edited wg-quick script - not sure if this is still needed
      - /data/software/wireguard-pia/wg-quick:/usr/bin/wg-quick
    cap_add:
      - NET_ADMIN
    environment:
      - LOC=ca_vancouver
      - USER=MyPIAUsername
      - PASS=MyPIAPass
      - USEMODERN=1
      - PORT_FORWARDING=1
      - LOCAL_NETWORK=192.168.10.0/24
    healthcheck:
      test: ping -c 1 www.google.com || exit 1
      interval: 30s
      timeout: 10s
      retries: 3
    ports:
      - 9091:9091
      - 51413:51413
      - 51413:51413/udp

  transmission:
    image: linuxserver/transmission
    container_name: transmission
    environment:
      - PUID=00002
      - PGID=00002
      - TZ="US/Pacific"
      - USER=MyTransmissionUsername
      - PASS=MyTransmissionPass
    volumes:
      - /data/software/transmission:/config
      - /var/torrents:/downloads/complete
    network_mode: "service:vpn"
    depends_on:
      - vpn

  transmission-porthelper:
    image: scotte/transmission-porthelper:latest
    container_name: transmission-porthelper
    environment:
      - USER=MyTransmissionUsername
      - PASS=MyTransmissionPass
    volumes:
      - /data/software/wireguard-pia/:/pia-shared
    network_mode: "service:vpn"
    depends_on:
      - transmission

  jackett:
    image: linuxserver/jackett:development
    container_name: jackett
    environment:
      - TZ="US/Pacific"
      - PUID=00002
      - PGID=01000
    volumes:
      - /data/software/jackett:/config
      - /data/software/transmission-openvpn/watch:/downloads
    ports:
      - "9117:9117"

  sonarr:
    image: linuxserver/sonarr:preview
    container_name: sonarr
    environment:
      - TZ="US/Pacific"
      - UMASK_SET=002
      - PUID=00002
      - PGID=01000
    volumes:
      - /data/software/sonarr/config:/config
      - "/data/media/Videos/TV Shows:/tv"
      - /data/media/Videos/TV_Ephemeral:/tv_ephemeral
      - /var/torrents:/downloads
    ports:
      - "8989:8989/tcp"
    depends_on:
      - transmission
      - jackett

  radarr:
    image: hotio/radarr:nightly
    container_name: radarr
    environment:
      - TZ="US/Pacific"
      - UMASK=002
      - PUID=0002
      - PGID=1000
    volumes:
      - /data/software/radarr/config:/config
      - /data/media/Videos/Movies:/movies
      - /var/torrents:/downloads
    ports:
      - "7878:7878"
    depends_on:
      - transmission
      - jackett

networks:
  wg-vpn:
kifujin commented 3 years ago

@ScottESanDiego USEMODERN=1 has been unnecessary since September, and port 51413 isn't necessary what with the wireguard VPN port forwarding being used instead. (the setting exposes the port on the local network, isn't used for anything, and both containers are on the same overlay network anyway)

samcro1967 commented 3 years ago

@sbaydush I am not able to get WebUI for containers attached to thrnz/docker-wireguard-pia to work either. Exposing a port on the thrnz/docker-wireguard-pia container so it can pass through to another container attached to its network does not appear to work.

P8ntBal1551 commented 3 years ago

it should work fine if you have the LOCAL_NETWORK environment variable set properly, and you are forwarding the correct ports on the wireguard container