Plex Media Server
Popular media server with apps for all platforms.
Overview
Plex Media Server is a comprehensive media streaming platform that transforms your personal media library into a Netflix-like experience. Originally launched in 2008, Plex has become the gold standard for home media servers, offering automatic metadata matching, thumbnail generation, and streaming capabilities to virtually any device. The platform excels at organizing your movies, TV shows, music, and photos while providing rich metadata, artwork, and transcoding for smooth playback across different devices and network conditions.
This Docker configuration deploys Plex using the LinuxServer.io image, which provides automatic updates and simplified management through environment variables. The setup uses host networking to ensure optimal performance for media streaming and discovery protocols, while mounting your media directories directly into the container. The configuration includes support for hardware transcoding when properly configured, allowing efficient real-time video conversion for devices that can't play your media's native format.
This stack is ideal for media enthusiasts who want a polished, feature-rich streaming solution that works across all their devices. Unlike self-hosted alternatives like Jellyfin or Emby, Plex offers superior mobile apps, automatic photo backup, free streaming content, and features like Skip Intro detection. The trade-off is requiring a Plex account and some data collection, but you gain access to a mature ecosystem with apps for smart TVs, gaming consoles, and mobile devices that rival commercial streaming services.
Key Features
- Automatic metadata matching with rich artwork, cast information, and plot summaries
- Hardware transcoding support for Intel QuickSync, NVIDIA NVENC, and AMD VCE
- Mobile sync for offline viewing with automatic quality optimization
- Skip Intro detection that automatically identifies and allows skipping TV show intros
- Multi-user support with managed profiles and parental controls
- Free streaming content including movies, TV shows, and web series
- Live TV and DVR capabilities with compatible tuners and Plex Pass
- Cross-platform apps for smart TVs, gaming consoles, mobile devices, and web browsers
Common Use Cases
- 1Home media server for families wanting to share movies and TV shows across multiple devices
- 2Cord-cutting solution combining personal media with free streaming content
- 3Photography enthusiasts organizing and sharing large photo collections with automatic backup
- 4Remote media access for travelers wanting to stream their content anywhere
- 5Multi-location media sharing between family members or friends
- 6Home theater setups requiring high-quality transcoding for 4K content
- 7Music library management with smart playlists and mobile sync for offline listening
Prerequisites
- Minimum 2GB RAM recommended for smooth transcoding and metadata processing
- Media files organized in separate directories for movies, TV shows, and music
- Plex account created at plex.tv for server claiming and remote access
- Port 32400 available for web interface and API access
- Understanding of file permissions (PUID/PGID) for media directory access
- Optional: Plex Pass subscription for premium features like hardware transcoding and mobile sync
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: linuxserver/plex:latest4 container_name: plex5 restart: unless-stopped6 network_mode: host7 environment: 8 PUID: 10009 PGID: 100010 TZ: UTC11 VERSION: docker12 PLEX_CLAIM: ${PLEX_CLAIM}13 volumes: 14 - plex_config:/config15 - /path/to/movies:/movies16 - /path/to/tv:/tv17 - /path/to/music:/music1819volumes: 20 plex_config: .env Template
.env
1PLEX_CLAIM=claim-xxxxxxxxxxxx2# Get claim token at https://plex.tv/claimUsage Notes
- 1Docs: https://support.plex.tv/articles/
- 2Access at http://localhost:32400/web - claim server with Plex account
- 3Get claim token at https://plex.tv/claim (valid 4 minutes)
- 4Hardware transcoding: mount /dev/dri for Intel QSV/VAAPI
- 5Plex Pass unlocks mobile sync, hardware transcoding, and Skip Intro
- 6Apps available for every platform including smart TVs and game consoles
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 plex:5 image: linuxserver/plex:latest6 container_name: plex7 restart: unless-stopped8 network_mode: host9 environment:10 PUID: 100011 PGID: 100012 TZ: UTC13 VERSION: docker14 PLEX_CLAIM: ${PLEX_CLAIM}15 volumes:16 - plex_config:/config17 - /path/to/movies:/movies18 - /path/to/tv:/tv19 - /path/to/music:/music2021volumes:22 plex_config:23EOF2425# 2. Create the .env file26cat > .env << 'EOF'27PLEX_CLAIM=claim-xxxxxxxxxxxx28# Get claim token at https://plex.tv/claim29EOF3031# 3. Start the services32docker compose up -d3334# 4. View logs35docker 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/run | bashTroubleshooting
- Server not accessible remotely: Check router port forwarding for port 32400 and enable Remote Access in Plex settings
- Transcoding performance issues: Mount /dev/dri device for Intel hardware transcoding or configure NVIDIA runtime for GPU acceleration
- Media files not appearing: Verify PUID/PGID match media file ownership and check directory permissions
- Claim token expired during setup: Generate new token at plex.tv/claim within 4-minute validity window
- Database corruption after unclean shutdown: Stop container and repair database using Plex Media Server repair tool
- High CPU usage during library scans: Adjust scheduled task timing or limit simultaneous analysis tasks in server settings
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