Can't get Plex working in Docker on Windows machine

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

Don’t use Docker on Windows! The Plex database requires file locking to work but the means by which docker on Windows works it is missing this functionality. You WILL end up with a corrupt database. This is why we cannot recommend docker on Windows.

Are there any plans to address this, or will docker on WS environments remain unsupported? I don’t want to sound rude, but docker is on it’s way to ubiquity and at the least isn’t going anywhere anytime soon.

This is a deficiency how Microsoft has handled volume support in Docker. It’s their issue so they are the ones to ask; I don’t have any knowledge of their future plans.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.