basic setup with other dockers + wan acess currently been worked on
This is run on a Ubuntu 20.04 LTS on the same network as the computer from which im doing the settings ( headless install ) keep in mind english isn’t my main language and i consider myself medium at best in the linux/bsd environnement. Also brand new at docker.
- Setup before adding docker/vpn
- Plex Media Server
- Fixing Pihole port ( non-docker )
- Docker + Docker compose + Portainer
- VPN-transmission + other apps via vpn
- Proxy Manager Nginx
- Dyndns using cpanel + edgerouterx ( will add later )
- Vpn transmission proxy ( if no domain name will add later )
Setup before adding docker/vpn
Installing plex server ( non-docker ) on ubuntu
Linuxize made a complete guide online which will help you. It can be found here. In my case the firewall section could be ignored because i didn’t install one since its already behind a router. ( wayback mirror if site down )
Fixing pihole port
if you are interested in running a non-docker pihole install you can find more information on this site.
My server also had a pihole with unbound non-docker but to avoid any issue the dockers won’t be calling pihole and this pihole won’t be exposed to wan so i had to change the default port by editing lighttpd default port this is for proxymanager docker to work on default port ( if pihole get updated i have to do it again if i don’t use external.conf )
sudo pico /etc/lighttpd/external.conf
add the following line then restart lighttpd
server.port := 9800
sudo /etc/init.d/lighttpd restart
Please note if you have a pihole non-docker you can choose any port you want.
//192.168.x.x:9800/admin
//machinedomain:9800/admin
Docker + Portainer
this information can be found here. I can copy the information but i don’t think it’s necessary.
VPN-transmission + other apps using VPN
Now based on previous settings ( Docker + Portainer ). Login to your portainer install on http://lanip:9000 first setup ask password login and local/remote server in my case it’s local so lets go !
The code below is my example docker-compose file to make a stack in portainer.
- Read the volume part and change them to your needs this will allow docker update to retain your settings for transmission and all *arr dockers.
- Notice how the path to transmission get repeated Sonarr/Radarr and such cant import your downloaded files if its not linked.
/path/to/your/transmissionConfigAndDownloadspace:/data
- All ports are under the main container transmission-openvpn
- You can add additionnal dockers to run behind the VPN be sure to put they port in the first part
- Dont forget to add this part to all additionnal dockers you may want to add
network_mode: "service:transmission-openvpn"
the Local_Network value must follow your own lan network settings so after building the stack you should be able to connect to every admin interface based on they ports and set things up.
- LOCAL_NETWORK=192.168.0.0/16
For the config file editing i used Notepad++ and at language selected YAML
Compose file:
version: '2.1'
services:
transmission-openvpn:
volumes:
- /path/to/your/transmissionConfigAndDownloadspace:/data
- /etc/localtime:/etc/localtime:ro
environment:
- PUID=1000
- PGID=1000
- CREATE_TUN_DEVICE=true
- OPENVPN_PROVIDER=NORDVPN
# - OPENVPN_CONFIG=default
- NORDVPN_COUNTRY=US
- NORDVPN_CATEGORY=legacy_p2p
- NORDVPN_PROTOCOL=udp
- OPENVPN_USERNAME=urWXloginFromNordVPN
- OPENVPN_PASSWORD=urWXPasswordFromNordVPN
- OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
- WEBPROXY_ENABLED=false
- LOCAL_NETWORK=192.168.0.0/16
- TRANSMISSION_SCRAPE_PAUSED_TORRENTS_ENABLED=false
- TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
- TRANSMISSION_RPC_USERNAME=urwebguiusername
- TRANSMISSION_RPC_PASSWORD=urwebguipassword
- DNS=8.8.8.8,8.8.4.4
cap_add:
- NET_ADMIN
logging:
driver: json-file
options:
max-size: 10m
ports:
- 9091:9091
- 9696:9696
- 7878:7878
- 8989:8989
- 8686:8686
- 8787:8787
- 5055:5055
restart: always
image: haugene/transmission-openvpn
prowlarr:
image: lscr.io/linuxserver/prowlarr:develop
network_mode: "service:transmission-openvpn"
container_name: prowlarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
volumes:
- /home/urusernamelogin/configsavesoutsidedocker/prowlarr:/config
- /path/to/your/transmissionConfigAndDownloadspace:/data
restart: unless-stopped
radarr:
image: linuxserver/radarr
network_mode: "service:transmission-openvpn"
container_name: radarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- UMASK_SET=022 #optional
volumes:
- /home/urusernamelogin/configsavesoutsidedocker/radarr:/config
- /pathtoyouralreadyexistingfiles/1/Films:/movies
- /path/to/your/transmissionConfigAndDownloadspace:/data
restart: unless-stopped
sonarr:
image: linuxserver/sonarr
network_mode: "service:transmission-openvpn"
container_name: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- UMASK_SET=022 #optional
volumes:
- /home/urusernamelogin/configsavesoutsidedocker/sonarr:/config
- /pathtoyouralreadyexistingfiles/4TB01/Animes-Series:/Animes01
- /pathtoyouralreadyexistingfiles/4TB02/:/Animes02
- /pathtoyouralreadyexistingfiles/4TB03/series:/series02
- /pathtoyouralreadyexistingfiles/3:/series01
- /path/to/your/transmissionConfigAndDownloadspace:/data
restart: unless-stopped
lidarr:
image: linuxserver/lidarr
network_mode: "service:transmission-openvpn"
container_name: lidarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- UMASK_SET=022 #optional
volumes:
- /home/urusernamelogin/configsavesoutsidedocker/lidarr:/config
- /pathtoyouralreadyexistingfiles/1/MP3:/media
- /path/to/your/transmissionConfigAndDownloadspace:/data
restart: unless-stopped
readarr:
image: lscr.io/linuxserver/readarr:develop
network_mode: "service:transmission-openvpn"
container_name: readarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
volumes:
- /home/urusernamelogin/configsavesoutsidedocker/readarr:/config
- /pathtoyouralreadyexistingfiles/1/books:/books
- /path/to/your/transmissionConfigAndDownloadspace:/data #optional
restart: unless-stopped
overseerr:
image: sctx/overseerr:latest
network_mode: "service:transmission-openvpn"
container_name: overseerr
environment:
- LOG_LEVEL=debug
- TZ=America/New_York
- PUID=1000
- PGID=1000
volumes:
- /home/urusernamelogin/configsavesoutsidedocker/overseer:/app/config
restart: unless-stopped
- Select Stacks inside the left menu
- Click + Add stack
- UrMediaServer or whatever you want as a name
- Paste the docker-compose code with edited informations over fitting ur needs.
- Go down and deploy stack
- You should be able to see Dockers running in containers or in stack.
Proxy Manager Nginx
In portainer i copied the docker compose from official site and changed version to 2.1 at top i deployed using stack to use the compose web editor.
They is a nice video guide here about using Cname / domain and Nginx by a youtuber. Ibracorp on youtube
If you have a domain name and want WAN access outside of lan this is probably the best and most awesome way to do it.
If you have pihole you can build custom dns domain but be sure your whole network use pihole to do so and of course it will only work inside the lan ( kinda find this pointless in my case )