🎬 Plex
Plex is a media server platform that organizes video, music, and photo libraries and streams them to client devices. It provides user management, metadata enrichment, transcoding, and remote streaming capabilities.
Category: Media Service
🧩 Platform Dependencies
- Compute / Virtualization: Bare-metal Beelink S12 Pro Mini PC (Intel 12th Gen Alder Lake‑N100, 16GB RAM, 500GB PCIe SSD)
- Supports Intel QuickSync hardware transcoding for efficient video streaming
- Storage: NFS shares hosted by TrueNAS, mounted via Autofs under
/nfs/ - Networking: Reverse-Proxy for external access, ports 32400 TCP/UDP
- Host Authentication: SSH and system login via LDAP / Microsoft Active Directory
- Application Authentication: Standard Plex authentication via Plex accounts
- Monitoring / Observability: Prometheus exporter, Grafana dashboards for CPU, RAM, disk I/O, and media transcoding metrics
⚙️ Installation & Deployment
Plex is installed via an Ansible playbook:
ansible-playbook -k -i inventory/plex/inventory.ini playbooks/plex/deploy_plex.yml
Key tasks:
- Wait for Plex host to come online (
wait_for_connection) - Download Plex Media Server package from official source
- Install
.debpackage viaapt - Ensure Plex service is started and enabled (
plexmediaserver)
Roles included in deployment:
global,ad,autofs,python3,users,ansible_node,plex_setup
Notes:
- Automates standard Plex installation
- Host-level accounts authenticated via LDAP / Microsoft Active Directory
- Plex itself uses its standard Plex authentication
- Follows same OS configuration as all other Ubuntu 24.04 hosts on the network
🔐 Access & Authentication
- Host Access: SSH and system login via LDAP / Microsoft Active Directory
- Plex Application: Standard Plex accounts for media access and admin control
Here’s a clean, ready‑to‑paste update you can add to your Plex wiki page to document the required router port‑forwarding rule for Remote Access. I’ve matched the tone, structure, and formatting style of the existing page you shared ( lab.refol.us).
🌐 Remote Access Configuration
To enable Plex Remote Access, the router must forward external traffic on Plex’s default port to the Plex server inside the DMZ.
Port Forwarding Rule (ER605)
Create the following NAT rule on the router:
| Setting | Value |
|---|---|
| Type | Port Forwarding |
| WAN Port | 32400 (TCP) |
| LAN Host | plex-0 |
| LAN Host IP | 192.168.30.x (Plex server in VLAN 30 / DMZ) |
| LAN Port | 32400 (TCP) |
| Description | plex-remote-access |
Firewall Requirements
Because Plex resides in the DMZ (VLAN 30), ensure the following:
- Allow inbound WAN →
plex-0on TCP 32400 - Deny all other unsolicited inbound WAN traffic
- Allow DMZ → Internet (metadata, authentication, remote access handshake)
- Block DMZ → LAN/Infrastructure except for any explicit storage pinholes (NFS/SMB)
Verification
After applying the rule:
- Open Plex Web → Settings → Remote Access
- Confirm that Plex reports:
“Fully accessible outside your network” - If not, verify:
- The NAT rule is active
- No upstream ISP CGNAT is interfering
- The Plex server is listening on TCP 32400
💾 Storage & Data Management
- Media libraries mounted via Autofs from NFS shares on TrueNAS
- Mount points defined in
/etc/auto.nfs(managed via Ansible):
photos -> /nfs/photos
music -> /nfs/music
books -> /nfs/books
tvshows -> /nfs/tvshows
movies -> /nfs/movies
downloads -> /nfs/downloads/complete
incomplete-downloads -> /nfs/downloads/incomplete
backups -> /nfs/backups_ex
- Local SSD stores Plex database, metadata, and caching
- Backups performed with
playbooks/plex/backup_plex.yml
Backup workflow:
- Stop Plex service
- Archive Plex data directory into gzipped tarball
- Start Plex service
- Retain only last 7 backups
📈 Observability
- Prometheus exporter collects CPU, RAM, disk, and Plex transcoding metrics
- Grafana dashboards visualize metrics
- Alerts for high CPU load, low storage, or heavy transcoding activity
📝 Operational Notes
- Restart Plex:
systemctl restart plexmediaserver - Update Plex via official repository package
- Logs:
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs - Add new media volumes via Autofs
- Consider backup/snapshot before major upgrades
🔗 Related Pages
Integrations
- Tautulli for usage tracking
- Radarr, Sonarr, Lidarr for automated media acquisition
- Ombi for user media requests
Performance Notes
- CPU supports 2–3 simultaneous transcodes; direct play recommended for multiple clients
- Monitor CPU, RAM, and I/O with Prometheus / Grafana