====== Plex Media Server (Physical Host) ======
This server is the **media hub** of the Trash Panda ecosystem. It manages media libraries, handles streaming, and performs transcoding. While the server is largely internet-adjacent for remote access, it is designed to separate storage and network duties across dedicated interfaces to maximize performance and stability. Proper hardware configuration ensures **reliable media delivery and predictable transcoding performance**.\\
This page covers **OS installation, NIC configuration, storage setup, Plex Media Server native installation, and initial configuration**. Detailed library management, remote access, and advanced Plex configuration are covered in their own guides.\\
===== Role of This Server in the Ecosystem =====
The Plex Media Server:\\
* Hosts all media libraries
* Streams content to internal and remote clients
* Performs video/audio transcoding, leveraging GPU acceleration
* Connects to the NAS via NFS for media access
By dedicating this physical server to Plex, we:\\
* Reduce impact on other services
* Centralize media management
* Ensure predictable performance for streaming and transcoding
* Simplify troubleshooting and scaling
This server is the backbone of media access — it should be **quiet, performant, and reliable**.
===== Base Operating System =====
* **Ubuntu Server 24.04 LTS or newer**
* Minimal installation (no desktop environment)
* Automatic security updates enabled
Ubuntu LTS provides:\\
* Long-term security support
* Strong community documentation
* Stability for long-running media workloads
This server should run **headless** and be administered via SSH.
===== Storage Configuration =====
* **OS SSD:** NVMe SSD1 for OS and system packages
* **Data SSD:** NVMe SSD2 partitioned:
- 60% mounted at `/transcoder` for Plex transcoding
- 40% mounted at `/cache` for Plex cache
This separation ensures:\\
* Transcoding operations do not impact OS performance
* Cache and temporary files are isolated for efficiency
* Disk I/O to the NAS remains optimized
===== Network Configuration =====
This server requires **two physical network interfaces**, following established NIC rules.\\
==== NIC 1 — DMZ VLAN ====
Purpose:\\
* Administrative access (SSH)
* Plex web interface and remote streaming
* Outbound access for updates
Characteristics:\\
* Routed
* MTU 1500
* Static IP recommended
==== NIC 2 — NFS VLAN ====
Purpose:\\
* High-speed access to NAS for media libraries
* Dedicated file I/O for transcoding and caching
Characteristics:\\
* Layer 2 only
* Jumbo Frames enabled (9000 MTU)
* No routing to LAN or internet
Segregating traffic ensures:\\
* Predictable streaming and transcoding performance
* Reduced network contention
* Isolation of critical media operations
===== Plex Media Server Installation =====
Install Plex **natively on Ubuntu** as a system service. Do **not** use Docker.\\
Follow these steps on the bare-metal server:
==== 1. Add the Plex Repository ====
# Install HTTPS transport and necessary packages
sudo apt update
sudo apt install curl apt-transport-https -y
# Add Plex repository key
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
# Add Plex repository
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
==== 2. Install Plex Media Server ====
# Update package lists and install Plex
sudo apt update
sudo apt install plexmediaserver -y
==== 3. Verify and Enable Service ====
# Check Plex service status
sudo systemctl status plexmediaserver
# Enable Plex to start at boot
sudo systemctl enable plexmediaserver
# Start Plex service if not already running
sudo systemctl start plexmediaserver
==== 4. Configure Firewall (if applicable) ====
# Allow default Plex port 32400 TCP
sudo ufw allow 32400/tcp
sudo ufw reload
==== 5. Access Plex Web Interface ====
Open a web browser and go to: :32400\\
\\
**Notes:**
* Plex runs as the ''plex'' user by default.
* Ensure that ''/transcoder'' and ''/cache'' directories have proper permissions for the ''plex'' user.
* If using GPU acceleration, verify that NVIDIA drivers are installed and accessible by Plex (e.g. RTX 3060).
===== Initial Plex Configuration =====
**Builder's choice unless otherwise noted**
==== Plex Account & Online Services ====
Builder's choice for:
* Account login
* Online media sources
* Authorized web devices
* Watchlist
* Webhooks
* Streaming services
* Plex Home
* Manage Library Access
* Privacy settings
==== Plex Web ====
**General Section:**
Builder's choice
**Quality Section:**
* Video Quality: 8 Mbps, 1080p
* Check "Play smaller videos at original quality" (Internet Streaming)
* Check "Use recommended settings" (Home Streaming)
**Debug Section:**
* Debug Level: Disabled
* Check Direct Play
* Check Direct Stream
**Player Section:**
* Check "Normalize Multi-channel Audio"
* Remaining options: Builder's choice
==== Settings ====
**General:**
* Enter Plex Server friendly name
* Leave all checkboxes unchecked
* Server Update Channel: Public
**Remote Access:**
* Plex behind a reverse proxy may show "Not available outside your network" -- this is normal
* Uncheck "Manually specify public port"
* Internet Upload Speed: 90% of ISP allocation
* Limit remote stream bitrate: 8 Mbps (1080p)
**Agents (Legacy):**
Builder's choice
**Library:**
* Scan my library automatically
* Run a partial scan when changes are detected
* Include music libraries in automatic updates (if applicable)
* Scan my library periodically (15 minutes)
* Empty trash automatically after every scan
* Allow media deletion
* Database Cache Size: 256MB
* Remaining options: Builder's choice
**Network:**
* Client Network: IPv4 Only
* Secure Connections: Preferred
* Certificates: configure only if installed locally
* Preferred network interface: DMZ VLAN NIC (do NOT select NFS NIC)
* Uncheck Strict TLS configuration
* Uncheck Enable local network discovery (GDM)
* Remote streams allowed per user: 3
* LAN Networks: comma-delimited list of local subnets
* Terminate sessions paused longer than: 10 minutes
* Uncheck Treat WAN IP as LAN bandwidth
* Check Enable Relay
* Custom server access URLs: https://plex.mydomain.com
* Leave allowed IPs without auth blank
* Webhooks unchecked unless actively used
**Transcoder (baseline: NVIDIA RTX 3060):**
* Transcoder Quality: Make my CPU hurt
* Transcoder temporary directory: ''/transcoder''
* Downloads temporary directory: ''/transcoder/temp_d''
* Transcoder throttle buffer: 120 seconds
* Background transcoding preset: Fast
* Uncheck Enable HDR tone mapping
* Uncheck Disable video stream transcoding
* Check Use hardware acceleration when available
* Check Use hardware-accelerated video encoding
* HEVC encoding: Never
* Hardware transcoding device: explicitly select GPU
* Max simultaneous GPU transcodes: 5
* Max CPU transcodes: Unlimited
* Max background video transcodes: 1
**Languages:**
* Automatically select audio and subtitle tracks
* Remaining options: Builder's choice
**DLNA:**
Builder's choice
**Scheduled Tasks:**
* Start time: 02:00
* Stop time: 05:00
* Backup database every 3 days
* Optimize database weekly
* Remove old bundles weekly
* Remove old cache files weekly
* Refresh local metadata every 3 days
* Update all libraries during maintenance
* Upgrade media analysis during maintenance
* Uncheck Refresh library metadata periodically
* Perform extensive media analysis during maintenance
**Extras:**
Builder's choice
**Libraries:**
Use the Add Libraries button to point to media paths.