Skip to content

Plex Media Server

Media streaming server for movies, TV shows, and music.


Production

Storage

  • Media Root: /root/vault/media/
  • TV Shows: /root/vault/media/tv/
  • Movies: /root/vault/media/movies/
  • Music: /root/vault/media/music/

Overview

Plex Media Server runs in an LXC container on Proxmox, providing media streaming to all devices on the network. It integrates with the arr-stack (Sonarr, Radarr) for automated media management.


Configuration

Container Details

Property Value
Container ID 111
Hostname tower
IP Address 10.89.97.10
OS Debian 12 (Bookworm)
Plex Version 1.42.1.10060

Paths

/rpool/data/subvol-111-disk-0/
├── var/lib/plexmediaserver/
│   └── Library/Application Support/Plex Media Server/
│       ├── Plug-ins/           # Custom plugins
│       ├── Plug-in Support/    # Plugin data
│       └── Logs/               # Server logs
└── root/vault/media/
    ├── tv/
    ├── movies/
    └── music/

Installed Plugins

Plugin Purpose Source
XBMCnfoTVImporter Read .nfo metadata files GitHub

Administration

Access Container

# From Proxmox host
pct enter 111

# Or via SSH
ssh root@10.89.97.10

Service Management

# Check status
systemctl status plexmediaserver

# Restart Plex
systemctl restart plexmediaserver

# View logs
journalctl -u plexmediaserver -f

Plugin Installation

Plugins are installed to:

/rpool/data/subvol-111-disk-0/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/

After installing plugins, restart Plex for them to be recognized.


Libraries

One Pace

Custom-edited One Piece anime with filler removed and pacing improved.

Location: /root/vault/media/tv/One Pace/

Setup Guide: SpykerNZ/one-pace-for-plex

Season Structure

Season Arc Episodes
1 Romance Dawn 4
2 Orange Town 3
3 Syrup Village 7
4 Gaimon 1
5 Baratie 8
6 Arlong Park 10
7 Buggy's Crew (Cover Story) 1
8 Loguetown 3
9 Reverse Mountain 2
10 Whisky Peak 2
11 Koby-Meppo (Cover Story) 1
12 Little Garden 5
13 Drum Island 8
14 Alabasta 21

File Naming

Files follow Plex standard naming:

One Pace - S01E01 - Romance Dawn, the Dawn of an Adventure.mp4
One Pace - S14E21 - Stowaway.mp4

Metadata

Uses XBMCnfoTVImporter agent to read .nfo files for episode metadata. Each season folder contains: - Episode video files (.mp4) - Episode metadata (.nfo) - Season metadata (season.nfo)

Root folder contains: - tvshow.nfo - Series metadata - poster.png - Series poster - seasonXX-poster.png - Season posters

Library Configuration

  1. Create new TV library pointing to /root/vault/media/tv/One Pace
  2. Advanced settings:
  3. Agent: XBMCnfoTVImporter
  4. Scanner: Plex TV Series
  5. Scan library

Adding New Episodes

# SSH to server
ssh root@10.89.97.10

# Navigate to One Pace directory
cd /root/vault/media/tv/One\ Pace/

# Download rename scripts (if not present)
curl -sL https://raw.githubusercontent.com/SpykerNZ/one-pace-for-plex/main/dist/rename.py -o rename.py
curl -sL https://raw.githubusercontent.com/SpykerNZ/one-pace-for-plex/main/dist/seasons.json -o seasons.json
curl -sL https://raw.githubusercontent.com/SpykerNZ/one-pace-for-plex/main/dist/exceptions.json -o exceptions.json

# Place new episodes in correct season folder

# Dry run to preview renames
python3 rename.py --dry-run

# Apply renames
python3 rename.py

# Trigger Plex library scan

Integration

arr-stack

Plex integrates with the arr-stack on VM 100 (10.89.97.50): - Sonarr - TV show management - Radarr - Movie management - Overseerr - Request management

Tautulli

For Plex analytics and monitoring (if installed).


Troubleshooting

Plugin Not Loading

# Check plugin is installed
ls "/rpool/data/subvol-111-disk-0/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/"

# Check ownership (should be plex user - 100999)
ls -la "/rpool/data/subvol-111-disk-0/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/"

# Fix ownership if needed
chown -R 100999:100999 "/rpool/data/subvol-111-disk-0/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/XBMCnfoTVImporter.bundle"

# Restart Plex
systemctl restart plexmediaserver

One Pace Episodes Not Showing

  1. Verify files are in correct season folders (check seasons.json mapping)
  2. Ensure .nfo files exist alongside video files
  3. Check library agent is set to XBMCnfoTVImporter
  4. Force library rescan: Library → ... → Scan Library Files

Media Not Found

# Check mount points
df -h | grep vault

# Verify media exists
ls -la /root/vault/media/tv/

DVR Recording Failed - Could Not Move to Destination

Symptom: DVR recording completes but fails with "Could not move recorded media to destination"

Cause: Media folders created by Sonarr have restrictive permissions (755). Plex runs as UID 999 and can't write to folders owned by UID 1000.

Diagnosis:

# Check folder permissions (from Proxmox host)
ls -la "/vault/subvol-101-disk-0/media/tv/Show Name/"
# If shows drwxr-xr-x (755), Plex can't write

# Test write from Plex container
pct exec 111 -- touch "/mnt/media/tv/Show Name/test" 2>&1
# "Permission denied" confirms the issue

Fix:

# Fix specific show folder
chmod -R 777 "/vault/subvol-101-disk-0/media/tv/Show Name/"

# Fix all TV folders
find "/vault/subvol-101-disk-0/media/tv" -type d ! -perm -002 -exec chmod 777 {} \;

Prevention: Configure Sonarr/Radarr to create folders with 777 permissions. See arr-stack.md - Media Folder Permissions.


Backup

Important Paths to Backup

/rpool/data/subvol-111-disk-0/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/
├── Preferences.xml          # Server settings
├── Plug-ins/                 # Custom plugins
└── Plug-in Support/
    └── Databases/            # Library databases (*.db)

Media files are stored separately on vault and should be backed up independently.


References