Advanced Plex Configuration on Windows


Advanced Plex Configuration on Windows ⚙️

Take your Plex server to the next level with these advanced configurations and customizations.

Running Plex as a Windows Service

By default, Plex runs when you log in. Running it as a service ensures it starts automatically at boot.

  1. Download NSSM (Non-Sucking Service Manager)
  2. Extract to C:\Tools\nssm
  3. Open PowerShell as Administrator:
# Install Plex as a service
C:\Tools\nssm\win64\nssm.exe install "Plex Media Server" "C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe"

# Configure the service
C:\Tools\nssm\win64\nssm.exe set "Plex Media Server" AppDirectory "C:\Program Files\Plex\Plex Media Server"
C:\Tools\nssm\win64\nssm.exe set "Plex Media Server" Start SERVICE_AUTO_START

# Start the service
Start-Service "Plex Media Server"

Method 2: Task Scheduler

  1. Open Task Scheduler
  2. Create a new task:
    • Trigger: At startup
    • Action: Start Plex Media Server.exe
    • Conditions: Uncheck all power conditions
    • Settings: Run whether user is logged on or not

Custom Metadata and Agents

Installing Custom Agents

Popular metadata agents:

  • Absolute Series Scanner - For anime
  • HAMA - For anime metadata from AniDB
  • XBMCnfoMoviesImporter - Import from .nfo files

Installation:

  1. Download the agent
  2. Extract to: %LOCALAPPDATA%\Plex Media Server\Plug-ins
  3. Restart Plex Media Server
  4. Configure in library settings

Custom Posters with Kometa (Plex Meta Manager)

Kometa automatically manages collections and custom posters:

# config.yml example
libraries:
  Movies:
    metadata_path:
      - pmm: imdb
      - pmm: trakt
    overlay_path:
      - pmm: resolution
      - pmm: audio_codec
    operations:
      mass_genre_update: tmdb
      mass_audience_rating_update: mdb_tomatoesaudience

Organizing with Collections

Smart Collections

Create dynamic collections based on criteria:

  1. Go to your library → Collections
  2. Click + to create new collection
  3. Choose Smart Collection
  4. Set filters:
    • Genre contains “Sci-Fi”
    • Year is after 2000
    • Rating is greater than 7

Manual Collections

For curated collections:

  1. Select multiple items (Ctrl+Click)
  2. Right-click → Add to Collection
  3. Create or select a collection

Collection Display Options

In library settings, configure:

  • Collection Mode: Hide items in collections / Show
  • Collection Minimum: Minimum items before showing

Media Organization Best Practices

Advanced Naming for Movies

Movies/
├── The Matrix (1999)/
│   ├── The Matrix (1999).mkv
│   ├── The Matrix (1999).eng.srt      # English subtitles
│   ├── The Matrix (1999).por.srt      # Portuguese subtitles
│   └── poster.jpg                      # Custom poster
└── The Matrix (1999) {tmdb-603}/       # With TMDb ID for matching
    └── The Matrix (1999) {tmdb-603}.mkv

Advanced Naming for TV Shows

TV Shows/
└── Breaking Bad {tvdb-81189}/
    ├── poster.jpg
    ├── Season 01/
    │   ├── Breaking Bad - S01E01 - Pilot.mkv
    │   ├── Breaking Bad - S01E01 - Pilot.eng.srt
    │   └── poster.jpg                  # Season poster
    └── Season 02/
        └── ...

Extras and Bonus Content

Plex supports extras! Organize them like this:

Movies/
└── The Matrix (1999)/
    ├── The Matrix (1999).mkv
    └── Behind The Scenes/
        ├── Making Of.mkv
        └── Cast Interviews.mkv
    └── Featurettes/
        └── Visual Effects.mkv
    └── Trailers/
        └── Theatrical Trailer.mkv

Scheduled Tasks

Automated Library Scans

Plex scans libraries periodically, but you can customize:

  1. SettingsLibraryScan my library periodically
  2. Set interval (every 15 minutes to daily)

Scheduled Maintenance

Create a PowerShell script for maintenance:

# plex-maintenance.ps1

# Stop Plex
Stop-Service "Plex Media Server" -Force

# Clean database
$dbPath = "$env:LOCALAPPDATA\Plex Media Server\Plug-in Support\Databases"
& "C:\Program Files\Plex\Plex Media Server\Plex Media Scanner.exe" --section 1 --refresh

# Optimize database
sqlite3 "$dbPath\com.plexapp.plugins.library.db" "VACUUM; ANALYZE;"

# Start Plex
Start-Service "Plex Media Server"

Backup Your Plex Server

What to Backup

Critical files:

  • %LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases\ - Your library database
  • %LOCALAPPDATA%\Plex Media Server\Preferences.xml - Server settings

Automated Backup Script

# backup-plex.ps1
$backupPath = "D:\Backups\Plex"
$plexData = "$env:LOCALAPPDATA\Plex Media Server"
$date = Get-Date -Format "yyyy-MM-dd"

# Create backup folder
New-Item -ItemType Directory -Force -Path "$backupPath\$date"

# Stop Plex
Stop-Service "Plex Media Server" -Force
Start-Sleep -Seconds 10

# Copy databases
Copy-Item "$plexData\Plug-in Support\Databases\*" "$backupPath\$date\" -Recurse

# Copy preferences
Copy-Item "$plexData\Preferences.xml" "$backupPath\$date\"

# Start Plex
Start-Service "Plex Media Server"

# Clean old backups (keep last 7)
Get-ChildItem $backupPath | Sort-Object CreationTime -Descending | Select-Object -Skip 7 | Remove-Item -Recurse

Multi-User Setup

Creating Managed Users

  1. SettingsUsers & Sharing
  2. Click “Create Managed User”
  3. Set restrictions:
    • Library access
    • Content ratings
    • Download permissions

Home Users

For family sharing without separate accounts:

  1. Create managed users for each family member
  2. Enable PIN protection if needed
  3. Configure parental controls

What’s Next?

You’ve mastered advanced configuration! Continue with: