Run Plex on a Windows container host. Compared to the Linux image, this gives you the ability to easily integrate with the Windows Storage Spaces and easily includes SMB shares in your library (and even DFS share)
In order to select the streaming quality, Plex is analyzing the network to determine if your player devices are close to the server or not.
The easiest solution is to put the Plex container directly on your LAN. To do this on Windows, you have to use the transparent
network interface.
Usually an transparent
network is already configured in docker for Windows. To determine its name, on you host, run the command:
C:\Docker\Podcasts>docker network ls
NETWORK ID NAME DRIVER SCOPE
48495b5114ea Intel(R) Gigabit CT Desktop Adapter - Virtual Switch transparent local
4161e0d9839f nat nat local
91b6269a26bd none null local
Choose a network which uses the transparent
driver, and run the container with --network "NETWORK_NAME"
.
For instance, here the dump of an ipconfig
in a blank Windows container (the IP should be in the same range of your LAN):
C:\Docker>docker run --rm -i --network "Intel(R) Gigabit CT Desktop Adapter - Virtual Switch" mcr.microsoft.com/windows:1809 cmd
Microsoft Windows [Version 10.0.17763.134]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\>ipconfig
ipconfig
Windows IP Configuration
Ethernet adapter vEthernet (Ethernet) 4:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::b84b:baef:4e1f:cf22%63
IPv4 Address. . . . . . . . . . . : 192.168.1.46
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
C:\>exit
For the remote access, you have to forward the 32400/TCP
to your Plex instance. For this we recommand to fix the MAC address of your container using --mac-address d0:c8:32:12:23:56
,
and then, on your router, setup a DHCP reservation and the port mapping.
C:\Plex
: Directory for the configuration of your plex instance
You can also add all your local media storages, like in the suggested docker file below.
docker run -d -v C:\Docker\Plex:C:\Plex --network "Intel(R) Gigabit CT Desktop Adapter - Virtual Switch" --mac-address d0:c8:32:12:23:56 dr1rrb/plex-win
Suggested docker compose file
version: '3.4'
services:
plex:
container_name: plex
image: dr1rrb/plex-win
restart: unless-stopped
volumes:
- C:\Docker\Plex:C:\Plex
- C:\Storages\Photos:P::ro
# ./.
security_opt:
- "credentialspec=file://plex.json" # Network identity, cf. TIPS below
mac_address: d0:c8:32:12:34:56
hostname: plex
networks:
default:
external:
name: Intel(R) Gigabit CT Desktop Adapter - Virtual Switch
Usually when running a Windows container, we need it to integrates with other servers and network infrastructure. If you have an active directory (AD), it's pretty easy to give a valid network identity to your container. You can find more info here and here.
A crawler is running every day to check if a new release of Plex is avaible for Windows and automatically build a new docker image for it.