Setting Up a Plex Media Server with Docker and Block Storage
This guide walks through setting up a Plex Media Server using Docker, with dedicated block storage for your media. The setup is designed to be simple, maintainable, and scalable.
Overview
The setup includes:
- Plex Media Server in Docker
- Block storage for media files
- Automatic directory structure
- Proper permission handling
- Easy updates and maintenance
Key Features
Simple Architecture
- Docker container for Plex
- Block storage for media
- Automated setup script
Easy Media Management
- Organized media directories
- Proper permissions
- Expandable storage
Maintainable Setup
- Git-based configuration
- Docker for easy updates
- Documented procedures
Prerequisites
- Ubuntu 22.04 LTS server
- Docker installed
- Block storage attached (recommended 100GB+)
- Basic command line knowledge
Quick Start
Prepare Storage
# Check your block storage device (usually /dev/vdc on Vultr) lsblk # Create mount point sudo mkdir -p /mnt/blockstore # Format block storage (if new) sudo mkfs.ext4 /dev/vdc # Mount block storage sudo mount /dev/vdc /mnt/blockstore # Add to fstab for persistence echo "/dev/vdc /mnt/blockstore ext4 defaults,nofail 0 0" | sudo tee -a /etc/fstab
Install Plex
git clone https://github.com/joereg4/plex-docker-setup.git cd plex-docker-setup chmod +x scripts/setup/*.sh # Run the setup script sudo ./scripts/setup/setup_plex.sh
Configure Libraries
- Access Plex at
http://YOUR_SERVER_IP:32400/web
- Add libraries using the paths below:
# In Plex web interface, use these paths: /data/Movies /data/TV Shows /data/Music /data/Photos # These map to your server paths: /mnt/blockstore/plex/media/Movies /mnt/blockstore/plex/media/TV Shows /mnt/blockstore/plex/media/Music /mnt/blockstore/plex/media/Photos
Note: The
/data
path is how Plex sees your media inside the Docker container. This is mapped to/mnt/blockstore/plex/media
on your server.
- Access Plex at
Directory Structure
/mnt/blockstore/plex/media/
βββ Movies
βββ TV Shows
βββ Music
βββ Photos
/opt/plex/
βββ database # Plex configuration
βββ transcode # Temporary transcoding files
Maintenance
- Updates:
docker-compose pull && docker-compose up -d
- Backups: Regular database backups recommended
- Storage: Expandable through Vultr dashboard
Best Practices
Media Organization
- Use consistent naming
- Separate movies and TV shows
- Follow Plex naming conventions
Storage Management
- Monitor available space
- Plan for expansion
- Regular cleanup of transcode directory
Security
- Keep Docker updated
- Use strong passwords
- Regular system updates
Troubleshooting
Common issues and solutions are documented in our Troubleshooting Guide.
Contributing
Contributions are welcome! Please see our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.