I have Plex running in a docker container behind a Traefik proxy. Everything works fine, however, when I try to access it from my web browser (inside my network) using the FQDN, it always asks me to login. When I checked the logs, I saw the following error:
Request came in with unrecognized domain / IP '<FQDN>' in header Host; treating as non-local
If I access it using the :32400, everything works find without a login. I’ve added the following to the list of IP addresses in the server configuration:
192.168.50.0/24,172.18.0.0/16 (the docker network)
This is my docker-compose file:
plex:
image: plexinc/pms-docker
container_name: plex
hostname: plex
ports:
- "32400:32400"
- "3005:3005"
- "8324:8324"
- "32469:32469"
- "1900:1900/udp"
- "32410:32410/udp"
- "32412:32412/udp"
- "32413:32413/udp"
- "32414:32414/udp"
volumes:
- ${CONFIGS}/plex/config:/config
- ${CONFIGS}/plex/transcode:/transcode
- ${MEDIA}:/data
environment:
- PLEX_UID=${PUID}
- PLEX_GID=${GUID}
- ALLOWED_NETWORKS=${PLEX_ALLOWED_NETWORKS}
- PLEX_CLAIM=${PLEX_CLAIM_TOKEN}
- HOSTNAME=plex.${DOMAIN}
- TZ=${TZ}
- ADVERTISE_IP=${PLEX_ADVERTISE_IP}
devices:
- "/dev/dri:/dev/dri"
labels:
traefik.enable: "true"
traefik.port: "32400"
traefik.frontend.rule: "Host:plex.${DOMAIN}"
traefik.backend: plex
com.centurylinklabs.watchtower.enable: "true"
restart: unless-stopped
I’ve tried added the following label, but it didn’t work:
traefik.frontend.headers.customRequestHeaders: "Host:${HOST_IP}||Referer:${HOST_IP}||Origin:${HOST_IP}"
Is there a way to force Plex to treat the IP addresses in my network as local?