media:plex
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| media:plex [2025/12/16 00:07] – created - external edit 127.0.0.1 | media:plex [2025/12/20 17:17] (current) – privacyl0st | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | = Plex = | + | ====== 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**.\\ | ||
| - | Covers | + | This page covers **OS installation, |
| + | ===== 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, | ||
| + | * 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 `/ | ||
| + | - 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**, | ||
| + | |||
| + | ==== 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:// | ||
| + | |||
| + | # Add Plex repository | ||
| + | echo deb https:// | ||
| + | </ | ||
| + | |||
| + | ==== 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: < | ||
| + | \\ | ||
| + | **Notes:** | ||
| + | |||
| + | * Plex runs as the '' | ||
| + | * Ensure that ''/ | ||
| + | * If using GPU acceleration, | ||
| + | |||
| + | ===== Initial Plex Configuration ===== | ||
| + | |||
| + | **Builder' | ||
| + | |||
| + | ==== Plex Account & Online Services ==== | ||
| + | |||
| + | Builder' | ||
| + | |||
| + | * Account login | ||
| + | * Online media sources | ||
| + | * Authorized web devices | ||
| + | * Watchlist | ||
| + | * Webhooks | ||
| + | * Streaming services | ||
| + | * Plex Home | ||
| + | * Manage Library Access | ||
| + | * Privacy settings | ||
| + | |||
| + | ==== Plex Web ==== | ||
| + | |||
| + | **General Section: | ||
| + | Builder' | ||
| + | |||
| + | **Quality Section:** | ||
| + | |||
| + | * Video Quality: 8 Mbps, 1080p | ||
| + | * Check "Play smaller videos at original quality" | ||
| + | * Check "Use recommended settings" | ||
| + | |||
| + | **Debug Section:** | ||
| + | |||
| + | * Debug Level: Disabled | ||
| + | * Check Direct Play | ||
| + | * Check Direct Stream | ||
| + | |||
| + | **Player Section:** | ||
| + | |||
| + | * Check " | ||
| + | * Remaining options: Builder' | ||
| + | |||
| + | ==== 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" | ||
| + | * Uncheck " | ||
| + | * Internet Upload Speed: 90% of ISP allocation | ||
| + | * Limit remote stream bitrate: 8 Mbps (1080p) | ||
| + | |||
| + | **Agents (Legacy): | ||
| + | Builder' | ||
| + | |||
| + | **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' | ||
| + | |||
| + | **Network: | ||
| + | |||
| + | * Client Network: IPv4 Only | ||
| + | * Secure Connections: | ||
| + | * Certificates: | ||
| + | * 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:// | ||
| + | * 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: ''/ | ||
| + | * Downloads temporary directory: ''/ | ||
| + | * 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' | ||
| + | |||
| + | **DLNA: | ||
| + | Builder' | ||
| + | |||
| + | **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' | ||
| + | |||
| + | **Libraries: | ||
| + | Use the Add Libraries button to point to media paths. | ||
media/plex.1765843620.txt.gz · Last modified: by 127.0.0.1
