Plex Media Server
Organize and stream your media collection anywhere.
Overview
Plex Media Server is a comprehensive media management and streaming platform that transforms any collection of digital media into a professionally organized, Netflix-like experience. Originally launched in 2007 as a fork of XBMC, Plex has evolved into the leading personal media server solution, offering automatic metadata enrichment, artwork collection, and multi-device streaming capabilities that rival commercial streaming services. The platform excels at organizing movies, TV shows, music, and photos while providing rich contextual information, cast details, and viewing recommendations.
This Docker deployment leverages the LinuxServer.io Plex image with host networking for optimal performance and hardware transcoding support through device passthrough. The configuration includes persistent volume storage for Plex's extensive metadata database and transcoding cache, while maintaining read-only access to media libraries to prevent accidental modifications. The setup supports hardware acceleration via Intel Quick Sync or NVIDIA NVENC when compatible hardware is available, dramatically improving transcoding performance for multiple simultaneous streams.
This stack is ideal for media enthusiasts, families with diverse device ecosystems, and users who want a polished streaming experience without relying on external services. Plex's superior mobile applications, automatic mobile sync capabilities, and extensive device compatibility make it particularly valuable for households with mixed Apple, Android, and smart TV environments. The platform's managed user system and parental controls also make it excellent for family deployments where content filtering and viewing restrictions are important.
Key Features
- Automatic metadata matching with rich movie and TV show information from multiple databases
- Hardware transcoding support with Intel Quick Sync, NVIDIA NVENC, and AMD VCE acceleration
- Mobile sync for offline viewing on phones and tablets with Plex Pass subscription
- Skip intro detection and automatic chapter creation for enhanced viewing experience
- Multi-user support with managed accounts, parental controls, and viewing restrictions
- Access to free ad-supported streaming content including movies, TV shows, and live TV
- Remote access capabilities allowing streaming from anywhere with internet connectivity
- Wide device compatibility including smart TVs, gaming consoles, mobile devices, and web browsers
Common Use Cases
- 1Home media server for organizing and streaming personal movie and TV show collections
- 2Family entertainment system with parental controls and individual user profiles
- 3Remote media access for streaming personal content while traveling or away from home
- 4Cord-cutting solution combining personal media with Plex's free streaming content
- 5Multi-location deployment for vacation homes or offices requiring media access
- 6Photography and music collection management with album organization and slideshow features
- 7Home theater integration with high-quality transcoding for 4K and HDR content playback
Prerequisites
- Minimum 2GB RAM recommended for smooth transcoding and metadata operations
- Organized media library with properly named files following Plex naming conventions
- Plex account creation and claim token generation for server linking and remote access
- Port 32400 available for web interface access and client connections
- Sufficient storage space for transcoding cache and metadata database (10-50GB typical)
- Hardware transcoding capable GPU or CPU for multiple simultaneous streams (optional but recommended)
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 plex: 3 image: lscr.io/linuxserver/plex:latest4 container_name: plex5 network_mode: host6 environment: 7 - PUID=10008 - PGID=10009 - TZ=UTC10 - VERSION=docker11 - PLEX_CLAIM=${PLEX_CLAIM}12 volumes: 13 - plex-config:/config14 - /path/to/movies:/movies:ro15 - /path/to/tv:/tv:ro16 devices: 17 - /dev/dri:/dev/dri18 restart: unless-stopped1920volumes: 21 plex-config: .env Template
.env
1# Plex2# Get claim token from: https://plex.tv/claim3PLEX_CLAIM=claim-xxxxxxxxxxxx45# Change paths to your media directoriesUsage Notes
- 1Web UI at http://localhost:32400/web
- 2Get claim token for linking
- 3Add media libraries
- 4Plex Pass for premium features
- 5Hardware transcoding supported
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 plex:5 image: lscr.io/linuxserver/plex:latest6 container_name: plex7 network_mode: host8 environment:9 - PUID=100010 - PGID=100011 - TZ=UTC12 - VERSION=docker13 - PLEX_CLAIM=${PLEX_CLAIM}14 volumes:15 - plex-config:/config16 - /path/to/movies:/movies:ro17 - /path/to/tv:/tv:ro18 devices:19 - /dev/dri:/dev/dri20 restart: unless-stopped2122volumes:23 plex-config:24EOF2526# 2. Create the .env file27cat > .env << 'EOF'28# Plex29# Get claim token from: https://plex.tv/claim30PLEX_CLAIM=claim-xxxxxxxxxxxx3132# Change paths to your media directories33EOF3435# 3. Start the services36docker compose up -d3738# 4. View logs39docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/plex-media-server/run | bashTroubleshooting
- Server not accessible remotely: Check port forwarding for port 32400 and ensure remote access is enabled in Plex settings
- Hardware transcoding not working: Verify GPU drivers are installed on host and /dev/dri device passthrough is successful
- Media files not detected: Ensure file naming follows Plex conventions and library paths are correctly mounted with proper permissions
- Transcoding performance issues: Increase allocated RAM, enable hardware acceleration, or reduce concurrent stream limits in server settings
- Claim token expired during setup: Generate new claim token from plex.tv/claim and restart container with updated PLEX_CLAIM variable
- Database corruption after unexpected shutdown: Stop container, backup Plex database, and run Plex database repair tool before restart
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download