3.8 KiB
Installing Plex Media Server
Plex is the heart of your media ecosystem. It scans your library, fetches metadata, organizes everything neatly, and makes your movies and shows available to stream from anywhere. Installing Plex is straightforward, but where you store its configuration and metadata is extremely important.
This guide explains:
- What Plex is and how it works
- Why it should not run inside Docker in this setup
- Why its configuration directory must be placed on your external HDD
- What gets stored there and how large it can grow
- The installation script used to set everything up
🎬 What Is Plex?
Plex Media Server is an application that:
- Indexes your media library
- Fetches rich metadata (posters, backgrounds, cast info, themes)
- Streams your content to TVs, phones, tablets, and browsers
- Transcodes media when needed
- Manages user accounts, watch history, and recommendations
Plex is extremely powerful — but with that power comes heavy disk usage.
🧱 Why Plex Runs Outside Docker
Although Docker is fantastic for the ARR stack, Plex is more demanding and behaves better on the host system.
Running Plex in Docker often introduces problems:
| Issue | Why It Happens in Docker |
|---|---|
| Hardware transcoding failures | Containerization interferes with VAAPI/V4L2/QuickSync |
| Slow scanning of large libraries | Docker's overlay filesystem slows metadata I/O |
| Network discovery issues | Plex requires multicast/IGMP, blocked by Docker networks |
| Large metadata directory | Containers struggle with millions of tiny files |
Real-world experience proves Plex performs best when installed directly on the OS.
🗃️ Why Move Plex Metadata to an External HDD?
Plex stores a massive amount of metadata — often tens or hundreds of gigabytes depending on library size.
Here’s what Plex stores inside its config directory:
-
Posters & artwork
-
Backdrops
-
Theme music
-
Subtitles
-
Optimization cache
-
Transcoding cache
-
Databases for:
- Libraries
- Watch history
- Video analysis
- Intro detection
These files grow quickly.
📌 Example Metadata Sizes
- Small library (500 files): 5–10 GB
- Medium library (2,000 files): 20–50 GB
- Large library (10,000+ files): 100 GB+
If you keep this in /var/lib/plexmediaserver on the SD card or system SSD:
- The OS disk will fill up
- SD cards will wear out quickly
- Plex performance will suffer severely
✔ Placing metadata on your external HDD solves everything
- Massive storage availability
- Higher endurance than SD cards
- Faster scanning and caching
- No risk of filling the root filesystem
This is why we relocate Plex config to:
/mnt/omnissiah-vault/configs/plex
⚙️ Installation Script
Below is the installation script used for this tutorial. It:
- Installs Plex Media Server from the official repository
- Stops the service
- Moves its entire metadata/config directory to your mounted HDD
- Creates a symlink so Plex still sees the expected path
- Ensures correct ownership for the
plexuser - Restarts and enables the service
- 📥 Download Script
👉 install-docker.sh
🚀 After Installation
Once Plex is installed and its metadata moved to your external drive, you can:
- Open the Web UI
- Sign in with your Plex account
- Add your libraries from
/mnt/omnissiah-vault/media - Run a full scan
Everything moving forward — including posters, metadata, intro detection, and caching — will stay safely on the external HDD.
➡️ Next Step
Proceed to Install qBittorrent to complete the host-based components.