Plex Integration for IPTV Billing
Set up Plex as a media server alongside your IPTV panel and manage access through IPTVbp billing.
Plex Integration for IPTV Billing
Plex is a popular media server that can complement your IPTV service by providing on-demand content, DVR capabilities, and a polished client experience across dozens of devices. This guide explains how to integrate Plex with IPTVbp.
Why Add Plex?
Many IPTV providers bundle a Plex library with their live TV service:
- VOD library -- serve movies and TV series through Plex's well-known interface.
- DVR -- let customers record live channels and watch later.
- Multi-device -- Plex apps exist for iOS, Android, Roku, Apple TV, Fire TV, Samsung, LG, and web browsers.
- Offline viewing -- Plex allows downloads on mobile for offline playback.
- Upsell opportunity -- offer Plex access as a premium add-on.
Architecture Overview
A typical setup looks like this:
- IPTV Panel (Xtream UI or NXT) serves live TV channels via M3U/Xtream API.
- Plex Media Server hosts a VOD library (movies, series) on a separate server or the same server.
- IPTVbp manages billing, creates accounts on both systems, and controls access.
Step 1: Set Up Your Plex Server
- Install Plex Media Server on a dedicated server (Ubuntu/Debian recommended).
- Sign into Plex with an admin account.
- Add media libraries:
- Movies -- point to your movie folder.
- TV Shows -- point to your series folder.
- Music (optional).
- Enable remote access in Settings > Remote Access.
- Ensure port 32400 is open in your firewall.
Step 2: Organise Your Content
Plex relies on proper folder and file naming for metadata matching:
Movies:
/media/movies/The Matrix (1999)/The Matrix (1999).mkv
/media/movies/Inception (2010)/Inception (2010).mkv
TV Shows:
/media/tv/Breaking Bad/Season 01/Breaking Bad - S01E01 - Pilot.mkv
/media/tv/Breaking Bad/Season 01/Breaking Bad - S01E02 - Cat's in the Bag.mkv
Plex will automatically fetch posters, descriptions, ratings, and trailers.
Step 3: Create Managed Users or Plex Home Users
For each customer who purchases a Plex add-on, you can:
Option A: Managed Users (Plex Home)
- Create a managed user under your Plex Home.
- Share specific libraries with that user.
- The customer accesses Plex with their managed profile.
- Limitation: requires Plex Pass on the admin account.
Option B: Shared Libraries (Friend Invite)
- The customer creates their own Plex account.
- You invite them as a friend and share libraries.
- More flexible but requires the customer to have a Plex account.
Step 4: Connect to IPTVbp
Currently, Plex integration works through a semi-automated flow:
- Create a product in IPTVbp for the Plex add-on (e.g. "Plex VOD Access -- Monthly, EUR 5").
- Set the product type to Manual Provisioning or use a webhook.
- When a customer purchases, IPTVbp sends a webhook notification to your provisioning script.
- Your script calls the Plex API to invite the user or create a managed account.
- Credentials or invite instructions are emailed to the customer.
Plex API Basics
Plex uses an HTTP API. Key endpoints:
- Get auth token:
POST https://plex.tv/users/sign_in.json - Invite friend:
POST https://plex.tv/api/v2/shared_serverswith the customer's email and library IDs. - Remove access:
DELETE https://plex.tv/api/v2/shared_servers/{id}
Store your Plex auth token securely in environment variables.
Step 5: Manage Renewals and Cancellations
- Renewal: No action needed if the user is already invited. The subscription just stays active.
- Cancellation or expiry: Your script calls the Plex API to remove the shared library access.
- Suspension: Remove access temporarily. Re-share libraries when the customer reactivates.
Content Automation
To keep your Plex library fresh:
- Use Radarr for automated movie downloads.
- Use Sonarr for automated TV show downloads.
- Use Bazarr for subtitles.
- Use Overseerr to let customers request content (optional premium feature).
These tools monitor RSS feeds and automatically download, rename, and organise new content into the correct Plex library folders.
Performance Tips
- Dedicate at least 4 CPU cores and 8 GB RAM to the Plex server for smooth transcoding.
- Use SSD storage for metadata and HDD for media files.
- Enable hardware transcoding (Intel Quick Sync or NVIDIA NVENC) to reduce CPU usage.
- Limit simultaneous transcodes based on your hardware (2-3 per CPU core).
- Use direct play when possible -- encourage customers to use clients that support the stored codecs.
Pricing Strategy
| Tier | Includes | Suggested Price |
|---|---|---|
| Basic IPTV | Live channels only | EUR 10/month |
| IPTV + Plex | Live channels + VOD library | EUR 15/month |
| Premium | Live + VOD + 4K content + requests | EUR 25/month |
Plex access works well as an upsell at checkout ("Add Plex VOD for just EUR 5/month").
Related Articles
Xtream UI Integration Guide
Connect your Xtream UI or XUI panel to IPTVbp for automated subscription provisioning, renewals, and credential management.
NXT Panel Integration Guide
Connect your NXT Dashboard panel to IPTVbp with API token authentication, package mapping, and multi-device support.
Jellyfin and Emby Setup Guide
Use Jellyfin or Emby as a free or low-cost alternative to Plex for serving VOD content to your IPTV customers.