🎬 LunaTV Enhanced Edition is a comprehensive video streaming platform deeply customized from MoonTV. Built on top of the original version, it adds 60+ major feature enhancements including Multi-Provider OIDC, Watch Room, YouTube Integration, Cloud Drive Search, AI Recommendations, Short Drama, IPTV Live TV, Bangumi Anime, Playback Statistics, Danmaku System, and more, delivering the ultimate online streaming experience.
📢 Project Overview
This project is a deeply customized version based on MoonTV, continuously developed from v4.3.1 to the current v5.9.3, with 60+ major feature modules and 400+ detailed optimizations added. See CHANGELOG for all new features.
💡 Core Enhancement Highlights
🎥 Content Ecosystem Expansion
YouTube Integration: Complete YouTube search, playback, live streaming with cookieless domain support
Cloud Drive Search (PanSou): Integrated advanced filtering and cache management
Short Drama Features: Search, playback, dedicated detail pages, mobile API proxy, auto-skip to next episode when backup API unavailable
IPTV Live TV: m3u/m3u8 subscriptions, EPG program guide (multi-source & url-tvg support), source aggregation, logo proxy, channel search within current source, live source tab quick search, long channel name click-to-expand
Bangumi Anime: Intelligent anime detection, API integration, caching mechanism
Traditional Chinese Search Support: Smart Traditional-Simplified conversion, multi-strategy search, lightweight switch-chinese library, optimized Traditional Chinese user search experience
2026 Year Filter: Add 2026 year filter option for Douban content, easily find latest releases
🤖 AI Recommendation System
AI Smart Assistant: Global AI recommendation button (ModernNav header), GPT-5/o series support, dynamic prompts, 85-90% input latency optimization, streaming transmission, orchestrator, video context support, integrated Douban and TMDB data, auto TMDB search when ID missing
Tavily Search Mode: Supports Tavily search mode without AI API requirement, flexible API verification, SSE streaming, friendly user guidance
Multiple Card Types: Video recommendations, YouTube videos, video link parsing
TMDB Actor Search: Complete actor search, filtering, and caching
Interactive Actor Works Viewer: Inline actor works display in play page, 2-hour cache, TMDB fallback source
Release Calendar & Upcoming Releases: Upcoming content preview and tracking, support favoriting upcoming releases, automatically becomes playable after release, 2026 release data crawler
Facebook OAuth: Graph API v24.0 integration, supports avatar and user info retrieval
WeChat Login: Web app QR code login, supports openid and user info retrieval
Backward Compatible: Supports automatic migration from legacy single-provider configuration
V2 User Storage System: SHA256 encryption, improved user management and OIDC integration
V2 User Data Backup: Backup/migration system fully supports V2 user data
Telegram Magic Link Authentication: Secure and convenient Telegram-based login with auto webhook configuration
User Level System: Replaces large login count numbers with friendly level display
Default User Group for New Users: Auto-assign default user group for new registrations
User Group Filtering: Admin backend user list supports filtering by user group
Playback Statistics: Complete viewing data statistics, analysis, visualization, global/personal stats tab switching, favorites API performance monitoring
Dual Reminder System: New episodes (red theme) and continue watching (blue theme) with gradient badges and halo effects
Global Favorites: Cross-device synchronized favorites system, database storage, category filtering (movies, series, variety shows, short dramas, anime)
User Group Permissions: Fine-grained permission control for AI Assistant, YouTube features, preselect user group API, display combined permissions
Inactive User Cleanup: Smart auto-cleanup with detailed configuration and logging
🎮 Player Feature Enhancement
Liquid-glass Frosted Glass Control Bar: Modern frosted glass effect control bar with 12px blur background, responsive button auto-sizing, perfectly solves mobile button overflow issues
Watch Room Feature: Real-time synchronized viewing experience with external server integration
Global Buttons: Watch room buttons integrated into global layout, positioned above back-to-top button
Room Management: Create/join/leave/disband rooms, supports host permission control
Material UI Tabs CategoryBar: Brand new industrial-style category selector for live TV and playback pages, using Material UI Tabs for reliable scrolling and responsive design, replacing previous manual scroll implementation
Douban Category Selector Scroll Optimization: Using requestAnimationFrame to optimize scroll performance
Netflix-style Badge System: Unified all badges (episode badges, notification badges, source indicators) with Netflix-style design and glassmorphism effect control buttons
Hero Banner Full Category Support: Homepage auto-rotating hero banner supports all content types (movies, series, variety shows, short dramas, anime), gradient background design
Modern Navigation UI: Desktop horizontal top navbar, mobile Liquid Glass bottom navigation, responsive switching
Mobile Banner Optimization: Swipeable card-style layout with touch gesture navigation, better suited for mobile devices
TVBox Diagnostics Mobile Optimization: Optimized TVBox diagnostic page mobile layout, prevent text overflow, completed all component mobile responsive fixes
Douban Pagination Optimization: Unified pagination constants prevent inconsistency, added deduplication logic prevents duplicates, optimized image preloading and API proxy ensure CORS safety
Douban Reviews Integration: Play page displays Douban user reviews, providing richer film discussion and viewing experience
Celebrity Avatars & Recommendations: Play page displays celebrity avatars (supports celebrity and personage URLs), similar movie recommendations, smart image proxy (auto-migrate from direct to server mode)
Completed Series Episode Count: Search and category pages display total episode count for completed series, helping users understand content scale at a glance
Anime Category Default Sorting: Default to "Recent Popularity" sorting for anime category pages
User Menu Features: Update reminders, continue watching (with new episode badges), favorites quick access, TVBox settings integration
Login Interface Modernization: Dynamic random wallpapers, gradient cards, responsive design
Back to Top Button: Quick return for long pages like release calendar
Video Source Import/Export: Array/config file format export, backup & migration, quick copy buttons
Subscription Source Management: Replace subscription sources instead of merging, support auto-fetch remote config
Fallback API Support: Search and homepage data loading support fallback APIs, auto-switching when primary API fails, improving system stability and availability
Source Browser & Testing Module: Source testing, health checks, mobile responsive layout
Resource Search API Authentication: Enhanced security with user authentication
Calendar Cache Migration: Migrated from localStorage to database, cross-device sync support, cache duration optimized from 24 hours to 8 hours
Favorites Database Storage: Global favorites data stored in database, supporting cross-device sync and category management
Cache Optimization: Unified cache management (YouTube, cloud drive, Douban, danmaku), version check dual-layer cache and request deduplication optimization
Enhanced Storage Modes: Full Kvrocks/Redis/Upstash support, memory cache prevents QuotaExceededError, handles Redis tag serialization
User Registration System (configurable toggle)
Image Proxy Optimization: Improved image proxy performance and caching strategy, supports Baidu image proxy option, provides more proxy methods
⚠️ Important Notices
📦 Project Status
Notice: After deployment, this is an empty shell project with no built-in video sources or live streaming sources. You need to collect and configure them yourself.
For short-term testing. Database is cleaned regularly.
🚫 Distribution Restrictions
Do NOT promote this project on Bilibili, Xiaohongshu (RedNote), WeChat Official Accounts, Douyin (TikTok China), Toutiao, or other Chinese mainland social platforms through videos or articles. This project does NOT authorize any "Tech Weekly/Monthly" projects or sites to include it.
📜 Open Source License
This project is licensed under CC BY-NC-SA 4.0, with the following terms:
❌ Commercial use is prohibited
✅ Personal learning and use is allowed
✅ Derivative works and distribution are allowed
⚠️ Any derivative projects must retain this project's address and be open-sourced under the same license
✨ Complete Feature List
🎬 Content Aggregation
✅ Multi-source video aggregation search (streaming output, smart variants, language-aware filtering, fallback API support, Traditional Chinese support)
✅ YouTube integration (search, live streaming, iframe playback, time filtering & sorting)
Click the button below for one-click deployment, automatically configures LunaTV + Kvrocks database:
Advantages:
✅ Zero configuration, instant startup (auto-deploy complete environment)
✅ Automatic HTTPS and global CDN acceleration
✅ Persistent storage, data never lost
✅ Free tier sufficient for personal use
⚠️ Important Notice: After deployment completes, you need to set up an access domain (Domain) for the LunaTV service in Zeabur before you can access it in your browser. See the Set Up Access Domain step below for details.
After clicking the button, just fill in the environment variables to complete deployment! See Zeabur Deployment Guide below for details.
🐳 Docker Self-Hosted Deployment
This project only supports Docker or Docker-based platforms (such as Dockge, Portainer, Komodo, etc.).
📦 Recommended: Kvrocks Storage
Kvrocks is a persistent Redis-compatible storage based on RocksDB, recommended for production environments.
services:moontv-core:image:ghcr.io/szemeng76/lunatv:latestcontainer_name:moontv-corerestart:on-failureports:-'3000:3000'environment:-USERNAME=admin-PASSWORD=your_secure_password-NEXT_PUBLIC_STORAGE_TYPE=kvrocks-KVROCKS_URL=redis://moontv-kvrocks:6666# Optional: Site configuration-SITE_BASE=https://your-domain.com-NEXT_PUBLIC_SITE_NAME=LunaTVEnhancednetworks:-moontv-networkdepends_on:-moontv-kvrocksmoontv-kvrocks:image:apache/kvrockscontainer_name:moontv-kvrocksrestart:unless-stoppedvolumes:-kvrocks-data:/var/lib/kvrocksnetworks:-moontv-networknetworks:moontv-network:driver:bridgevolumes:kvrocks-data:
🔴 Redis Storage (Risk of Data Loss)
Redis default configuration may lead to data loss. Persistence must be enabled.
Zeabur is a one-stop cloud deployment platform. Using pre-built Docker images allows for quick deployment without waiting for builds.
Deployment Steps:
Add KVRocks Service (Add database first)
Click "Add Service" > "Docker Images"
Enter image name: apache/kvrocks
Configure port: 6666 (TCP)
Remember the service name (usually apachekvrocks)
Configure Persistent Volume (Important):
Find "Volumes" section in service settings
Click "Add Volume" to add new volume
Volume ID: kvrocks-data (customizable, only letters, numbers, and hyphens)
Path: /var/lib/kvrocks/db
Save configuration
💡 Important: Persistent volume path must be set to /var/lib/kvrocks/db (KVRocks data directory). This keeps config files in the container while persisting database files, preventing data loss on restart!
Add LunaTV Service
Click "Add Service" > "Docker Images"
Enter image name: ghcr.io/szemeng76/lunatv:latest
Configure port: 3000 (HTTP)
Configure Environment Variables
Add the following environment variables to your LunaTV service:
After deployment, it's an empty shell application. You need to fill in the configuration in Admin Panel > Configuration File.
📝 Configuration Format
{"cache_time":7200,"api_site":{"example_source":{"api":"http://example.com/api.php/provide/vod","name":"Example Resource","detail":"http://example.com"}},"custom_category":[{"name":"Chinese Movies","type":"movie","query":"华语"},{"name":"US TV Series","type":"tv","query":"美剧"}]}
📖 Field Description
cache_time: API cache duration (seconds), recommended 3600-7200
TV Series Categories: Popular, US Series, UK Series, Korean Drama, Japanese Drama, Chinese Drama, Hong Kong Drama, Japanese Animation, Variety Shows, Documentaries
You can also enter specific content like "Harry Potter", which works the same as Douban search.
🌐 Environment Variables
Required Variables
Variable
Description
Example Value
USERNAME
Admin account
admin
PASSWORD
Admin password
your_secure_password
NEXT_PUBLIC_STORAGE_TYPE
Storage type
kvrocks / redis / upstash
Storage Configuration
Variable
Description
Example Value
KVROCKS_URL
Kvrocks connection URL
redis://moontv-kvrocks:6666
REDIS_URL
Redis connection URL
redis://moontv-redis:6379
UPSTASH_URL
Upstash endpoint
https://xxx.upstash.io
UPSTASH_TOKEN
Upstash Token
AxxxxxxxxxxxxxxxxxxxxxxxxxxxQ==
Optional Configuration
Variable
Description
Default
Options
SITE_BASE
Site URL
Empty
https://example.com
NEXT_PUBLIC_SITE_NAME
Site name
MoonTV
Any string
ANNOUNCEMENT
Site announcement
Default
Any string
NEXT_PUBLIC_SEARCH_MAX_PAGE
Max search pages
5
1-50
NEXT_PUBLIC_DOUBAN_PROXY_TYPE
Douban data proxy type
direct
direct / cors-proxy-zwei / cmliussss-cdn-tencent / cmliussss-cdn-ali / custom
NEXT_PUBLIC_DOUBAN_PROXY
Custom Douban proxy
Empty
URL prefix
NEXT_PUBLIC_DOUBAN_IMAGE_PROXY_TYPE
Douban image proxy type
direct
direct / server / img3 / cmliussss-cdn-tencent / cmliussss-cdn-ali / custom
NEXT_PUBLIC_DOUBAN_IMAGE_PROXY
Custom image proxy
Empty
URL prefix
NEXT_PUBLIC_DISABLE_YELLOW_FILTER
Disable adult filter
false
true / false
NEXT_PUBLIC_FLUID_SEARCH
Streaming search output
true
true / false
Douban Proxy Options
DOUBAN_PROXY_TYPE Options:
direct: Server directly requests Douban (may be blocked)
🐛 Fixed EPG Channel Parsing: Support multi-line XML format channel parsing
🐛 Fixed TVBox Config and Parsing: Support encrypted config (Base64), JSON comment parsing, M3U8 proxy source key propagation, full URL resolution fixes live segment 500 error
🐛 Fixed TVBox Functionality Issues: AdminConfig type definition, edit mode toggle state updates, parsing and playback mode improvements
🐛 Fixed UI Issues: Tab button visibility and mobile responsiveness, search category button dark mode contrast, ScrollableRow hidden button pointer event capture, Firefox hover disappearance
🐛 Fixed Deployment Issues: Zeabur deployment standalone mode, time range display condition operator precedence, Traditional-Simplified conversion application scope
Major Milestone Versions
v5.9.3: Traditional Chinese search support, download feature enhancement, TVBox source management enhancement, User-Agent comprehensive upgrade to 2026 latest versions, Baidu image proxy, fnOS deployment guide
v5.9.2: Douban Trailer System Enhancement, Proxy Configuration System, M3U8 Downloader 6x Speed Boost, EPG System Enhancement, Live Direct Connect Mode, Mobile Navigation Netflix-style Redesign
v5.9.1: Glassmorphism Design, Material UI CategoryBar, Netflix-style HeroBanner, AI Feature Comprehensive Enhancement, Douban Cache Optimization
v5.9.0: Multi-Provider OIDC (GitHub/Apple/Facebook/WeChat), Watch Room, M3U8 Download, Anime4K Super Resolution, Player Buffer Optimization
v5.8.0: Next.js 16.1 + React 19 + Tailwind CSS 4.1, AI Chat Performance Optimization, Actor Works Viewer, Danmaku Settings Panel
v5.7.1: Liquid-glass Frosted Glass Control Bar, Douban Reviews, Global Favorites, Fallback API, Completed Series Episode Count
v5.7.0: Celebrity Avatars & Recommendations, Live Source Search, Image Proxy Optimization, Mobile Navigation Fixes
v5.6.3: Short Drama Multi-source Search, Smart Source Filtering, Upcoming Smart Distribution, Comprehensive z-index Conflict Fixes
v5.6.2: Upcoming Release Calendar, Hero Banner Full Category Support, Live DVR Detection, Mobile Banner Optimization
v5.6.1: Hero Banner & Modern Navigation UI, TVBox Intelligent Search Proxy, Export Format Selection
v5.6.0: Telegram Magic Link authentication, Source Browser & Testing Module, video source import/export
v5.5.0: User level system, release calendar, inactive user cleanup
v5.4.0: Complete short drama features, playback statistics system
v5.3.0: YouTube integration, AI recommendation system, TVBox security config
Set Strong Password: Use a complex PASSWORD environment variable
Disable Public Registration: Close user registration in admin panel
Personal Use Only: Do not publicly share or distribute your instance link
Comply with Local Laws: Ensure usage complies with local laws and regulations
📋 Disclaimer
This project is for educational and personal use only
Do not use for commercial purposes or public services
All content comes from third-party websites, this site stores no video resources
Users are solely responsible for legal issues arising from public sharing
Project developers assume no legal responsibility for user actions
This project does not provide services in mainland China. Legal risks and responsibilities from usage in that region are the user's personal actions, unrelated to this project