LibreTV: Open-Source Media Aggregator and IPTV Streaming Platform Built with Next.js 15 and Docker
An in-depth overview and deployment guide for LibreTV, an open-source self-hosted media platform integrating multi-source VOD search and M3U IPTV live streaming
In October 2026, open-source development organization LibreSpark introduced LibreTV, a self-hosted media aggregator and streaming platform built on Next.js 15 and Docker. Released under the GNU AGPLv3 license, the project focuses on unifying fragmented video-on-demand (VOD) repositories and live IPTV channels into a cohesive, responsive web interface.

Image source: GitHub / LibreSpark
Unlike conventional self-hosted media servers that require vast local storage arrays and complex library ingestion, LibreTV is structured as a lightweight parser and client aggregator. Guided by its tagline of setting up a personal streaming hub in one minute, it enables users to seamlessly aggregate and play back external media streams with minimal operational overhead.
ArtPlayer and HLS Playback Engine with Optimized Viewing Ergonomics
The frontend of LibreTV is developed with Next.js 15 (App Router), TypeScript, and Tailwind CSS, delivering low latency and a clean, modern user experience.
At the core of its media playback pipeline, LibreTV pairs ArtPlayer with hls.js to deliver practical viewing features right out of the box:
- Ad-Segment Filtering: Stream sources containing unwanted advertisement segments are automatically identified and bypassed during playback.
- Continuous and Variable-Speed Playback: Seamless auto-advance across multi-episode series and customizable playback speed controls allow viewers to tailor their viewing tempo.
- Direct Episode Downloads: In addition to inline streaming, users can export episodes directly as local TS or MP4 files for offline access.
- Second-Level Watch Progress Sync: Utilizing the browser's IndexedDB storage, playback positions are saved continuously in real time down to the second, allowing users to resume playback precisely where they left off upon returning.
Parallel Multi-VOD Aggregation and Real-Time M3U/XMLTV IPTV Integration
LibreTV's central capability is its automated parsing engine, which normalizes diverse external media protocols into a unified catalog:
- Multi-Source VOD Ingestion and Unified Cards: The platform parses Apple CMS VOD endpoints and TVBox single-depot JSON configuration formats. When a user submits a search query, LibreTV executes parallel queries across all registered endpoints, merging duplicate listings into a consolidated metadata card. Real-time health checks and response-speed benchmarks rank the most performant playback source at the top.
- Live IPTV Streaming: Dedicated live streaming views (
/live) support M3U playlist parsing coupled with XMLTV Electronic Program Guides (EPG). Viewers can review broadcast schedules and switch channels intuitively. - Dedicated Long-Connection Proxy: To bypass cross-origin resource sharing (CORS) roadblocks and resolve intermittent stream dropping in web browsers, LibreTV includes a dedicated persistent stream proxy (
/api/live/stream) to sustain stable connections.
Docker Deployment Architecture and Essential Production Considerations
LibreTV is fully containerized, allowing instances to be deployed in minutes. Official multi-architecture container images (ghcr.io/librespark/libretv:latest and docker.io/bestzwei/libretv) are distributed with native support for both linux/amd64 and arm64 environments.
By configuring a single PASSWORD environment variable for administrative access, the entire service can be launched via Docker Compose. However, production deployments require careful attention to network architecture and security baselines:
- Mandatory HTTPS Reverse Proxy: In production environments, LibreTV enforces the
Secureflag on session cookies. If accessed over raw HTTP via direct IP address, browsers automatically drop the cookie, preventing administrative authentication. Production setups must place a reverse proxy such as Nginx, Caddy, or Cloudflare in front of the container to terminate SSL/TLS. - Zero-Storage Architecture: LibreTV functions strictly as an aggregator and client parser. It does not store or host video files or live broadcast streams on the server. Users are responsible for providing valid external public M3U playlists and VOD endpoints.
- SSRF Protection on Internal Networks: To safeguard against unauthorized requests targeting local network resources, server-side request forgery (SSRF) defenses are active by default. Users integrating self-hosted IPTV servers running inside a private local subnet or homelab must explicitly pass the
LIVE_ALLOW_PRIVATE=1environment variable.
Sources
- GitHub Repository: LibreSpark/LibreTV