I’ve been racking my brain here trying to get Plex up and running in Docker. I’m using Linux containers on a machine running Windows 10. I’ve tried with both the PMS-Docker and Linuxserver/plex containers. Below is a copy of my current docker-compose file
version: “3.7”
plex:
image: linuxserver/plex
container_name: plex
restart: unless-stopped
hostname: Docker
volumes:
- ${data_dir}/plex:/config
- ${media_dir}:/media
ports:
- 32400:32400/tcp
- 3005:3005/tcp
- 8324:8324/tcp
- 32469:32469/tcp
- 1900:1900/udp
- 32410:32410/udp
- 32412:32412/udp
- 32413:32413/udp
- 32414:32414/udp
- 5353:5353
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
- VERSION=latest
- CHANGE_CONFIG_DIR_OWNERSHIP=false
- ADVERTISE_IP=//192.168.1.2:32400/
and .env
data_dir=d:/docker
media_dir=e:/
PUID=1000
PGID=1000
TZ=America/Los_Angeles
Problem 1
Every time Docker is restarted Plex doesn’t see the server that was previously created and tries to go through the whole first run setup process again. If I issue docker restart plex in powershell the original server will be accessible again.
Problem 2
I have tried to no avail to achieve access to the server from outside my network. I’ve tried adding network_mode: host to the docker-compose file and omitting all the ports but then I can’t even connect to the web app.
Any help would be greatly appreciated