
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.
Method 1: NSSM (Recommended)
- Download NSSM (Non-Sucking Service Manager)
- Extract to
C:\Tools\nssm - 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
- Open Task Scheduler
- 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:
- Download the agent
- Extract to:
%LOCALAPPDATA%\Plex Media Server\Plug-ins - Restart Plex Media Server
- 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_tomatoesaudienceOrganizing with Collections
Smart Collections
Create dynamic collections based on criteria:
- Go to your library → Collections
- Click + to create new collection
- Choose Smart Collection
- Set filters:
- Genre contains “Sci-Fi”
- Year is after 2000
- Rating is greater than 7
Manual Collections
For curated collections:
- Select multiple items (Ctrl+Click)
- Right-click → Add to Collection
- 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}.mkvAdvanced 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.mkvScheduled Tasks
Automated Library Scans
Plex scans libraries periodically, but you can customize:
- Settings → Library → Scan my library periodically
- 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 -RecurseMulti-User Setup
Creating Managed Users
- Settings → Users & Sharing
- Click “Create Managed User”
- Set restrictions:
- Library access
- Content ratings
- Download permissions
Home Users
For family sharing without separate accounts:
- Create managed users for each family member
- Enable PIN protection if needed
- Configure parental controls
What’s Next?
You’ve mastered advanced configuration! Continue with: