hadim
January 5, 2020, 2:32am
1
I use Docker + Traefik to manage all the services I use including Plex.
Plex works fine except for one thing: the “Not available outside your network” error. It does not prevent me to use Plex but it’s suboptimal.
Here are my configurations.
version: '3'
services:
# Reverse proxy
traefik:
container_name: traefik
image: traefik:2.1.1
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ../Configurations/Traefik/traefik.yaml:/traefik.yaml:ro
- ../Configurations/Traefik/etc:/etc/traefik/
- ../Configurations/Traefik/log:/var/log/traefik/
#network_mode: host # not sure this is needed ?
restart: unless-stopped
plex:
container_name: plex
image: linuxserver/plex
volumes:
- ../Configurations/Plex:/config
- ../Multimedia/Series:/data/tvshows
- ../Multimedia/Movies:/data/movies
environment:
- PGID=1000
- PUID=1000
- TZ=EST
- VERSION=latest
- ADVERTISE_IP="https://plex.MY_DOMAIN.org/"
ports:
- "32400:32400"
- "32400:32400/udp"
- "32469:32469"
- "32469:32469/udp"
- "1900:1900/udp"
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.plex.rule=Host(`plex.MY_DOMAIN.org`)"
- "traefik.http.routers.plex.entrypoints=websecure"
- "traefik.http.routers.plex.tls.certresolver=mydnschallenge"
- "traefik.http.services.plex.loadbalancer.server.port=32400"
# Plex wants to communicate using HTTPS (not sure this is correct)
- "traefik.http.middlewares.https_redirect.redirectscheme.scheme=https"
- "traefik.http.routers.plex.middlewares=https_redirect"
devices:
- "/dev/dri:/dev/dri"
global:
checkNewVersion: false
file:
watch: true
api:
dashboard: true
log:
filePath: "/var/log/traefik/traefik.log"
level: "INFO"
accessLog:
filePath: "/var/log/traefik/access.log"
entryPoints:
web:
address: ':80'
websecure:
address: ':443'
certificatesResolvers:
mydnschallenge:
acme:
email: ACME@EMAIL.COM
storage: /etc/traefik/acme.json
tlsChallenge: {}
httpChallenge:
entryPoint: web
providers:
docker:
endpoint: 'unix:///var/run/docker.sock'
exposedbydefault: false
file:
filename: "/etc/traefik/routes.yaml"
watch: true
Then in Plex I set:
Settings > Remote Access > Manually Specify public port
to 443
Settings > Network > Custom server access URLs
to "https://plex.MY_DOMAIN.org/"
Sometimes the error goes away and becomes green for a few seconds but then immediately goes back to red: “Not available outside your network”.
I am not sure if it’s a configuration on the Plex side or on the Traefik side.
1 Like
hadim
January 5, 2020, 2:35am
2
I’ve never used Traefik but I’ve also never had luck using a proxy in front of Plex either.
hadim
January 6, 2020, 5:39pm
4
So I have been able to play on remote mode from a web browser outside of my local network.
The indirect mode now only happens when playing from the android application.
Here is my updated compose file:
version: '3'
services:
# Reverse proxy
traefik:
container_name: traefik
image: traefik:2.1.1
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ../Configurations/Traefik/traefik.yaml:/traefik.yaml:ro
- ../Configurations/Traefik/etc/traefik:/etc/traefik/
restart: unless-stopped
# Movies Management
plex:
container_name: plex
image: linuxserver/plex
volumes:
- ../Configurations/Plex:/config
- ../Multimedia/Series:/data/tvshows
- ../Multimedia/Movies:/data/movies
environment:
- PGID=1000
- PUID=1000
- TZ=EST
- VERSION=docker
- ADVERTISE_IP="https://plex.MY_DOMAIN.org:443"
ports:
- 32400:32400/tcp
- 32400:32400/udp
- 3005:3005/tcp
- 8324:8324/tcp
- 32469:32469/tcp
- 1900:1900/udp
- 32410:32410/udp
- 32412:32412/udp
- 32413:32413/udp
- 32414:32414/udp
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.plex.rule=Host(`plex.MY_DOMAIN.org`)"
- "traefik.http.routers.plex.entrypoints=websecure"
- "traefik.http.routers.plex.tls.certresolver=mydnschallenge"
- "traefik.http.services.plex.loadbalancer.server.port=32400"
devices:
- "/dev/dri:/dev/dri"
Hope it can be useful to someone else.
1 Like
hadim
January 6, 2020, 5:45pm
5
I don’t understand how I can play in remote mode while I still see the " Not available outside your network" error. Anyone has an explanation about it?
hadim
January 6, 2020, 6:09pm
6
I finally found a way to get rid o the indirect mode for both the android application and the https://app.plex.tv/ access.
I had to add the port number in the “Custom server access URLs” setting. Before it was https://plex.MY_DOMAIN.org and now it’s https://plex.MY_DOMAIN.org:443.
After adding this and reinstalling the android application, the remote mode works (no more indirect mode). As well as using https://app.plex.tv .
4 Likes
hadim
January 6, 2020, 6:11pm
7
So everything works fine for me now.
The only remaining issue is this “Not available outside your network” error but I don’t really care since in fact it works.
marcxe
February 5, 2020, 9:25pm
8
Did you ever solve this for good? I have the same setup & issue, also the indirect thing works now, but I would love to have it not nagging me about it.
Can’t believe this is the solution…
Thanks!
janova
April 3, 2020, 8:31am
10
Thank you for posting your config file and the subsequent solution, it helped me get my plex working with Traefik (esp when all the other links that I wasted so much time on didn’t work for me).
Unfortunately this only solves the first part of my setup. I run my plex server on a machine that is using NordVPN and (perhaps obviously) once NordVPN is active, I can’t access my plex anymore.
Do you also run your Plex behind a VPN? If so then how do you resolve this?
I know this is unrelated to OP so I’m happy to have this on a separate thread if need be.
Thanks.
This is linked to that: Remote access: incorrect status check it seems Plex is aware of it, not sure when it is will be fixed
system
Closed
April 4, 2020, 2:32am
12
This topic was automatically closed after 90 days. New replies are no longer allowed.