Plex + Traefik 2.0/2.1: "Not available outside your network"

Cross posted from https://forums.plex.tv/t/plex-traefik-2-0-2-1-not-available-outside-your-network/521424


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.

  • docker-compose.yml
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"
  • traefik.yaml
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.

It seems to work fine now: https://forums.plex.tv/t/plex-traefik-2-0-2-1-not-available-outside-your-network/521424/6