Joe Regenstein, CPA, CMA, FPAC

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:

Key Features

  1. Simple Architecture

    • Docker container for Plex
    • Block storage for media
    • Automated setup script
  2. Easy Media Management

    • Organized media directories
    • Proper permissions
    • Expandable storage
  3. Maintainable Setup

    • Git-based configuration
    • Docker for easy updates
    • Documented procedures

Prerequisites

Quick Start

  1. 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
    
  2. 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
    
  3. 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.

Directory Structure

/mnt/blockstore/plex/media/
β”œβ”€β”€ Movies
β”œβ”€β”€ TV Shows
β”œβ”€β”€ Music
└── Photos

/opt/plex/
β”œβ”€β”€ database    # Plex configuration
└── transcode   # Temporary transcoding files

Maintenance

Best Practices

  1. Media Organization

    • Use consistent naming
    • Separate movies and TV shows
    • Follow Plex naming conventions
  2. Storage Management

    • Monitor available space
    • Plan for expansion
    • Regular cleanup of transcode directory
  3. 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.