Skip to content

Bladestar2105/IPTV-Manager

Repository files navigation

IPTV-Manager Logo

IPTV-Manager

A comprehensive IPTV management system with automatic provider synchronization, intelligent category mapping, and multi-user support.

License: MIT

⚠️ DISCLAIMER: This project is for educational purposes only.

πŸš€ Features

Core Functionality

  • Multi-User Management: Support for multiple users with individual channel configurations, secure login, and customizable concurrent stream limits (max connections).
  • Provider Management: Connect to multiple IPTV providers via Xtream Codes API with automatic connection pooling.
  • Category Organization: Drag & drop sorting and visual channel assignment.
  • EPG Integration: Comprehensive Electronic Program Guide (EPG) support with automatic updates.

Advanced Features

  • Automatic Synchronization: Configurable intervals (hourly, daily, weekly) with intelligent category mapping.
  • Provider Connection Pooling: Add the same provider multiple times to create a pool; streams automatically round-robin and fall back to available accounts when connection limits are reached.
  • HDHomeRun Emulation: Emulate HDHomeRun devices for seamless integration with Plex, Emby, and Jellyfin.
  • Shared Links: Create public share links with customizable slugs (short URLs) and expiration dates.
  • Bulk Operations: Optimized bulk category import and deletion for managing large playlists efficiently.
  • VOD & Series Support: Full proxy support for Movies and TV Series.
  • Internationalization: Localized UI (English, German, French, Greek).
  • M3U Playlist Generation: Generate custom M3U playlists for external players.
  • Import/Export: Secure, password-protected data migration.
  • User Backups: Automatically create and manage backups of assigned categories and channels per user.

Security

  • πŸ›‘οΈ SSRF Protection: Robust validation of upstream URLs (preventing access to private IPs, localhost, cloud metadata).
  • πŸ” Rate Limiting: Protection against brute force (Login) and DoS attacks (Client Logs).
  • 🎫 Secure Authentication: JWT-based auth with session management and Bcrypt password hashing.
  • 🚫 IP Blocking: Configurable IP blocking and whitelisting.
  • πŸ”’ Security Headers: Comprehensive Helmet.js security headers.

Performance

  • πŸ”₯ Multi-Core Optimization: Node.js Clustering utilizes all CPU cores.
  • ⚑ Optional Redis: High-performance tracking for active streams (recommended for >500 users).
  • 🧡 Worker Threads: Offloads CPU-intensive tasks like EPG mapping.
  • ⚑ Optimized Channel Matching: Fast channel matching algorithms using bitwise signatures.
  • ⚑ Optimized Database Schema: Optimized indices for faster streaming performance and EPG updates.

πŸ“‹ Requirements

  • Node.js: 20.x+
  • npm: 9.x+
  • SQLite: 3.x (included)
  • MaxMind GeoLite2 License Key: While basic region locking functions work out of the box with the included database, updating the internal GeoIP database requires a free MaxMind License Key. You can get one at maxmind.com and enter it in the WebUI Security Settings.

Production Deployment

For production environments, it is strongly recommended to set NODE_ENV=production and run the application behind a reverse proxy (like Nginx or Traefik) that handles HTTPS. The application will enforce secure cookies when in production mode.

🐳 Docker Installation (Recommended)

Using Docker Compose

  1. Create docker-compose.yml:
    services:
      iptv-manager:
        image: ghcr.io/bladestar2105/iptv-manager:latest
        container_name: iptv-manager
        restart: unless-stopped
        ports:
          - "3000:3000"
        volumes:
          - ./data:/data
        environment:
          - DATA_DIR=/data
  2. Run docker-compose up -d.
  3. Access at http://localhost:3000.

πŸ”§ Bare Metal / Manual Installation (Debian/Ubuntu)

We provide automated scripts for easy local deployment on Debian and Ubuntu systems. This is ideal for users who do not want to use Docker.

Automated Installation

To install IPTV-Manager as a background systemd service, run the following command as root:

curl -fsSL https://raw.githubusercontent.com/Bladestar2105/IPTV-Manager/main/scripts/install.sh -o install.sh
chmod +x install.sh
sudo ./install.sh

Automated Updates

To update an existing automated installation, simply navigate to the installation directory and run the update script:

cd /opt/iptv-manager
sudo ./scripts/update.sh

Manual Installation (Development)

  1. Clone repo: git clone https://github.com/Bladestar2105/IPTV-Manager.git
  2. Install: npm install
  3. Configure: cp .env.example .env (edit as needed)
  4. Run: npm start

Proxmox LXC Installation

For Proxmox VE users, you can easily deploy an LXC container running IPTV-Manager. Run the following command directly on your Proxmox Host Shell:

curl -fsSL https://raw.githubusercontent.com/Bladestar2105/IPTV-Manager/main/scripts/proxmox.sh -o proxmox.sh
chmod +x proxmox.sh
./proxmox.sh

Development

  • Linting: npm run lint
  • Testing: npm test

First Time Setup

  • Default Username: admin
  • Default Password: Automatically generated (check your console output).
  • Important: Change password immediately after login.

CORS Configuration

The application blocks Cross-Origin Resource Sharing (CORS) by default for security. If you need to access the API or streams from another domain (e.g., an external web player), you must configure the ALLOWED_ORIGINS environment variable.

  • Default: Cross-origin requests are blocked (false).
  • Setup: Add ALLOWED_ORIGINS=https://your-web-player.com,https://another-site.com to your .env file.
  • Allow All: Set ALLOWED_ORIGINS=* to allow all domains (⚠️ Not recommended for production).

πŸ“Έ Screenshots

Login Dashboard
Login Page Dashboard
User Backups Import/Export
User Backups Import/Export
Categories Channels
Category Management Channel Assignment
Sync Logs
Sync Logs
EPG Sources EPG Browse
EPG Sources EPG Browse
EPG Mapping Statistics
EPG Mapping Statistics
Security Xtream Credentials
Security Xtream Credentials
Web Player
Web Player

πŸ“š API Overview

Main Endpoints

  • Auth: /api/login, /api/change-password
  • Users: /api/users (CRUD)
  • Providers: /api/providers (CRUD, Sync, Import)
  • Categories: /api/user-categories (Manage, Reorder)
  • EPG: /api/epg-sources (Manage, Update)
  • Shares: /api/shares (Create, Update, Delete)

Xtream Codes / Player API

  • GET /player_api.php: Auth & Metadata
  • GET /live/:user/:pass/:id.ts: Live Stream
  • GET /movie/:user/:pass/:id.ext: Movie Stream
  • GET /series/:user/:pass/:id.ext: Series Stream
  • GET /xmltv.php: XMLTV EPG

HDHomeRun Emulation

  • GET /hdhr/:token/discover.json
  • GET /hdhr/:token/lineup.json
  • GET /hdhr/:token/auto/v:channelId

πŸ“„ License

MIT License

About

A powerful IPTV management panel that aggregates multiple IPTV providers into customized playlists for end users. Built with Node.js, Express, and SQLite.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors