# LunaTV | MoonTechLab | Knowledge Base | Instagit

本项目采用 CC BY-NC-SA 协议，禁止任何商业化行为，任何衍生项目必须保留本项目地址并以相同协议开源

GitHub Stars: 10.1k

Repository: https://github.com/MoonTechLab/LunaTV

---

## Articles

### [How to Customize Douban Image Proxy Settings in LunaTV: A Complete Guide](/MoonTechLab/LunaTV/how-to-customize-douban-image-proxy-settings-in-lunatv)

Learn how to customize Douban image proxy settings in LunaTV. Easily adjust proxy type and URL via user menu or browser console for seamless image loading.

- Tags: how-to-guide
- Published: 2026-09-09

### [Recommended Deployment Method for LunaTV: Zeabur Cloud vs Docker Compose](/MoonTechLab/LunaTV/what-is-the-recommended-deployment-method-for-lunatv)

Discover the best LunaTV deployment method. Compare Zeabur Cloud and Docker Compose for your containerized Docker architecture with Kvrocks. Deploy efficiently today.

- Tags: how-to-guide
- Published: 2026-09-09

### [How to Configure the Site Name and Announcement in LunaTV](/MoonTechLab/LunaTV/how-to-configure-the-site-name-and-announcement-in-lunatv)

Learn to configure your LunaTV site name and announcement using environment variables and the admin API. Customize your platform's identity and notifications effectively.

- Tags: how-to-guide
- Published: 2026-09-09

### [Understanding the Role of middleware.ts in LunaTV: Authentication and Route Protection](/MoonTechLab/LunaTV/what-is-the-role-of-the-middleware-ts-file-in-lunatv)

Discover the role of middleware.ts in LunaTV. This Next.js Edge Middleware file secures your app by handling authentication, preventing unauthorized access, and protecting API routes.

- Tags: deep-dive
- Published: 2026-09-09

### [How LunaTV Handles Playback History and Favorites Synchronization](/MoonTechLab/LunaTV/how-does-lunatv-handle-playback-history-and-favorites-synchronization)

Discover how LunaTV syncs playback history and favorites across devices with its stateless API, pluggable storage, and secure authentication for real-time data consistency.

- Tags: how-to-guide
- Published: 2026-09-09

### [Understanding the MIT License for LunaTV: Permissions, Requirements, and Compliance](/MoonTechLab/LunaTV/what-is-the-mit-license-for-lunatv-and-its-implications)

Understand the MIT License for LunaTV. Learn about permissions, requirements, and compliance for this permissive open-source license. Use, modify, and distribute LunaTV freely.

- Tags: understanding
- Published: 2026-09-09

### [How to Set Up LunaTV with Upstash: Complete Configuration Guide](/MoonTechLab/LunaTV/how-to-set-up-lunatv-with-upstash)

Learn how to set up LunaTV with Upstash by configuring essential environment variables. Persist user accounts, play records, and favorites seamlessly with this complete guide.

- Tags: how-to-guide
- Published: 2026-09-09

### [How to Set Up LunaTV with Redis: Complete Configuration Guide](/MoonTechLab/LunaTV/how-to-set-up-lunatv-with-redis)

Configure LunaTV with Redis for enhanced performance. Follow our guide to set up Redis storage for user data by setting environment variables and providing a valid connection string.

- Tags: how-to-guide
- Published: 2026-09-09

### [How to Set Up LunaTV with Kvrocks: Docker & Cloud Deployment Guide](/MoonTechLab/LunaTV/how-to-set-up-lunatv-with-kvrocks)

Learn to set up LunaTV with Kvrocks using Docker Compose or Zeabur. Deploy Redis-compatible storage easily for your LunaTV core service. Get persistent storage now.

- Tags: how-to-guide
- Published: 2026-09-09

### [Database Options Supported by LunaTV: Redis, Upstash, KVROCKS, and LocalStorage](/MoonTechLab/LunaTV/what-database-options-are-supported-by-lunatv)

Discover LunaTV's supported database options including Redis, Upstash, KVROCKS, and LocalStorage. Easily configure your backend with NEXT_PUBLIC_STORAGE_TYPE.

- Tags: getting-started
- Published: 2026-09-09

### [LunaTV Search Flow Architecture: How Multi-Source Video Search Works](/MoonTechLab/LunaTV/how-does-the-search-flow-architecture-work-in-lunatv)

Explore the LunaTV search flow architecture. Learn how concurrent multi-source video search, caching, and filtering deliver aggregated results efficiently.

- Tags: architecture
- Published: 2026-09-09

### [What Is `downstream.ts` in LunaTV? The Core Video Source API Module Explained](/MoonTechLab/LunaTV/what-is-the-purpose-of-the-downstream-ts-file-in-lunatv)

Understand downstream.ts in LunaTV. This core module unifies external video API searches, caches results, normalizes data, and retrieves details, simplifying application integration.

- Tags: deep-dive
- Published: 2026-09-09

### [How to Enable or Disable Content Filtering in LunaTV: A Complete Guide](/MoonTechLab/LunaTV/how-to-enable-or-disable-content-filtering-in-lunatv)

Learn how to enable or disable content filtering in LunaTV easily. Follow our complete guide to configure the DisableYellowFilter setting through environment variables or the Admin API.

- Tags: how-to-guide
- Published: 2026-09-09

### [How LunaTV Manages Authentication: Cookie-Based Security with HMAC Signatures](/MoonTechLab/LunaTV/how-is-authentication-managed-in-lunatv)

Discover how LunaTV secures user access with its robust cookie-based authentication system. Learn about HMAC signatures and Next.js middleware for enhanced security.

- Tags: internals
- Published: 2026-09-09

### [LunaTV Douban Proxy Options: Complete Configuration Guide](/MoonTechLab/LunaTV/what-are-the-available-douban-proxy-options-in-lunatv)

Discover LunaTV's six Douban proxy options direct cors-proxy-zwei cmliussss-cdn-tencent cmliussss-cdn-ali cors-anywhere and custom. Configure them easily via localStorage or environment variables.

- Tags: how-to-guide
- Published: 2026-09-09

### [How to Integrate Douban Data with LunaTV: A Complete Guide Using the Core Fetch Client](/MoonTechLab/LunaTV/how-to-integrate-douban-data-with-lunatv)

Learn to integrate Douban data with LunaTV using the Core Fetch Client. This guide shows you how to import and call fetchDoubanData to get typed movie and TV show info.

- Tags: how-to-guide
- Published: 2026-09-09

### [How LunaTV Handles Video Search from Multiple Sources: Architecture and Implementation](/MoonTechLab/LunaTV/how-does-lunatv-handle-video-search-from-multiple-sources)

Discover how LunaTV performs unified, parallel video search across multiple APIs. Learn about its architecture featuring timeouts, caching, and real-time streaming.

- Tags: architecture
- Published: 2026-09-09

### [How to Use Zeabur for One-Click Deployment of LunaTV](/MoonTechLab/LunaTV/how-to-use-zeabur-for-one-click-deployment-of-lunatv)

Deploy LunaTV on Zeabur with one click. This guide shows how to effortlessly launch a secure, CDN-accelerated streaming interface using Zeabur's automated deployment.

- Tags: how-to-guide
- Published: 2026-09-09

### [How to Configure Storage for LunaTV: Kvrocks, Redis, and Upstash Setup Guide](/MoonTechLab/LunaTV/how-to-configure-storage-for-lunatv)

Learn how to configure storage for LunaTV with Kvrocks, Redis, and Upstash. Easily switch between backends using the NEXT_PUBLIC_STORAGE_TYPE variable without code changes.

- Tags: how-to-guide
- Published: 2026-09-09

### [Complete Guide to Environment Variables for LunaTV Configuration](/MoonTechLab/LunaTV/what-are-the-environment-variables-for-lunatv)

Explore LunaTV environment variables for seamless configuration. Learn how to manage settings for authentication, caching, and integrations via process env variables.

- Tags: how-to-guide
- Published: 2026-09-09

### [How to Deploy LunaTV Using Docker Compose: Complete Self-Hosting Guide](/MoonTechLab/LunaTV/how-to-deploy-lunatv-using-docker-compose)

Deploy LunaTV with Docker Compose. Follow this complete self-hosting guide to set up your own media server easily and securely. Get started now.

- Tags: how-to-guide
- Published: 2026-09-09

### [next.config.js in LunaTV: Complete Build Configuration Guide](/MoonTechLab/LunaTV/what-is-the-role-of-nextconfigjs-in-lunatvs-build-and-configuration)

Explore next.config.js in LunaTV. Learn how it controls standalone output, custom webpack rules, PWA integration, and image optimization for your Next.js build.

- Tags: how-to-guide
- Published: 2026-09-08

### [How to Configure Douban Proxy Settings in LunaTV: Environment, Admin, and Client Methods](/MoonTechLab/LunaTV/how-to-configure-douban-proxy-settings-in-lunatv)

Learn how to configure Douban proxy settings in LunaTV using environment variables, admin API, or client localStorage for global, site-wide, or per-user control.

- Tags: how-to-guide
- Published: 2026-09-08

### [How LunaTV Manages Environment Variables: Runtime Configuration Architecture](/MoonTechLab/LunaTV/how-are-environment-variables-managed-in-lunatv)

Discover how LunaTV manages environment variables, separating client and server secrets and caching configurations via getConfig() for efficient runtime configuration architecture.

- Tags: architecture
- Published: 2026-09-08

### [PWA Implementation in LunaTV: Offline Caching and Installation Benefits](/MoonTechLab/LunaTV/what-are-the-benefits-of-pwa-implementation-in-lunatv-offline-caching-installation)

Discover PWA benefits in LunaTV. Learn how offline caching and installation enhance user experience for browsing TV guides and video content. Explore MoonTechLab/LunaTV.

- Tags: benefits
- Published: 2026-09-08

### [How next-pwa Handles Service Worker Generation in LunaTV](/MoonTechLab/LunaTV/how-does-next-pwa-in-lunatv-handle-service-worker-generation)

Discover how LunaTV uses next-pwa to automate service worker generation. Learn about Workbox, sw.js creation, auto-registration, and skipWaiting for immediate activation.

- Tags: internals
- Published: 2026-09-08

### [How to Configure PWA Capabilities in LunaTV: A Complete Setup Guide](/MoonTechLab/LunaTV/how-to-configure-pwa-capabilities-in-lunatv)

Configure PWA capabilities in LunaTV easily. Follow our guide to enable the next-pwa plugin, set environment variables, and ensure smooth manifest and icon routing for your progressive web app.

- Tags: how-to-guide
- Published: 2026-09-08

### [What Does the start.js Script Do Before Starting the LunaTV Server?](/MoonTechLab/LunaTV/what-does-the-startjs-script-in-lunatv-do-before-starting-the-server)

Discover what start.js does before launching the LunaTV server. Learn how it prepares the Docker manifest, boots the server, and initializes cron jobs.

- Tags: internals
- Published: 2026-09-08

### [How Next.js Standalone Output Reduces LunaTV's Docker Image Size](/MoonTechLab/LunaTV/how-does-nextjs-standalone-output-affect-lunatvs-docker-image-size)

Discover how Next.js standalone output dramatically cuts LunaTV's Docker image size. Learn how this feature optimizes your build for smaller, more efficient deployments. Get the details now.

- Tags: performance
- Published: 2026-09-08

### [Understanding the Three-Stage Build Process in LunaTV's Dockerfile](/MoonTechLab/LunaTV/what-is-the-purpose-of-the-three-stage-build-process-in-lunatvs-dockerfile)

Discover LunaTV's Dockerfile three-stage build process. Minimize image size, optimize caching, and enhance security by isolating stages. Learn how it works.

- Tags: internals
- Published: 2026-09-08

### [How to Deploy LunaTV Using Docker: Multi-Stage Builds and Production Configuration](/MoonTechLab/LunaTV/how-to-deploy-lunatv-using-docker)

Deploy LunaTV using Docker with multi-stage builds and production configuration. Learn to pull the image or build locally, set variables, and expose port 3000 for a seamless Nextjs deployment.

- Tags: how-to-guide
- Published: 2026-09-08

### [How the Storage Abstraction Layer in LunaTV Works: IStorage Interface and Multi-Backend Architecture](/MoonTechLab/LunaTV/how-does-the-storage-abstraction-layer-in-lunatv-work)

Explore LunaTVs storage abstraction layer. Discover how the IStorage interface and multi-backend architecture manage data seamlessly across LocalStorage, Redis, Upstash, and Kvrocks.

- Tags: deep-dive
- Published: 2026-09-08

### [How to Configure Upstash for LunaTV Deployments: Complete Setup Guide](/MoonTechLab/LunaTV/how-to-configure-upstash-for-lunatv-deployments)

Configure Upstash for LunaTV deployments by setting environment variables NEXT_PUBLIC_STORAGE_TYPE UPSTASH_URL and UPSTASH_TOKEN for managed Redis storage. Learn more now.

- Tags: how-to-guide
- Published: 2026-09-08

### [What Is Kvrocks and Why It’s Recommended for Self-Hosted LunaTV Deployments](/MoonTechLab/LunaTV/what-is-kvrocks-and-why-is-it-recommended-for-self-hosted-lunatv-deployments)

Discover Kvrocks, a Redis-compatible key-value store ideal for self-hosted LunaTV. Prevent data loss with built-in disk persistence during container restarts. Zero code changes needed.

- Tags: deep-dive
- Published: 2026-09-08

### [How to Configure the Storage System in LunaTV: Kvrocks, Redis, and Upstash Setup](/MoonTechLab/LunaTV/how-to-configure-the-storage-system-in-lunatv-kvrocks-redis-upstash)

Configure LunaTV's storage with Kvrocks, Redis, or Upstash. Easily switch backends using the STORAGE environment variable without code changes for flexible data management.

- Tags: how-to-guide
- Published: 2026-09-08

### [Why LunaTV Uses pnpm as Its Package Manager: Performance, Consistency, and Workspace Support](/MoonTechLab/LunaTV/why-does-lunatv-use-pnpm-as-its-package-manager)

Discover why LunaTV chooses pnpm for superior performance and consistency. Learn how its unique architecture and workspace support ensure reliable development and eliminate environment drift.

- Tags: deep-dive
- Published: 2026-09-08

### [How LunaTV Implements Framer Motion Animations: A Technical Deep Dive](/MoonTechLab/LunaTV/how-are-animations-implemented-in-lunatv-using-framer-motion)

Explore how LunaTV uses Framer Motion for dynamic UI animations. Discover variant-based state machines, component wrappers, and AnimatePresence for seamless transitions.

- Tags: deep-dive
- Published: 2026-09-08

### [How to Implement Drag-and-Drop Functionality in LunaTV with @dnd-kit](/MoonTechLab/LunaTV/how-to-implement-drag-and-drop-functionality-in-lunatv-with-dnd-kit)

Learn how to implement drag-and-drop functionality in LunaTV using @dnd-kit for smooth vertical sorting of video sources and categories on desktop and mobile devices.

- Tags: how-to-guide
- Published: 2026-09-08

### [How LunaTV Handles Runtime Validation with Zod in Next.js API Routes](/MoonTechLab/LunaTV/how-is-runtime-validation-handled-in-lunatv-using-zod)

Learn how LunaTV uses Zod for robust runtime validation in Next.js API routes. Discover how safeParse ensures data integrity and returns clear error responses for invalid payloads.

- Tags: how-to-guide
- Published: 2026-09-08

### [Best Alternatives to ArtPlayer for Video Playback in LunaTV](/MoonTechLab/LunaTV/what-are-the-alternatives-to-artplayer-for-video-playback-in-lunatv)

Explore top ArtPlayer alternatives for LunaTV like Video.js, Plyr, and Shaka Player. Easily integrate them to enhance your video playback experience while keeping HLS compatibility and custom controls.

- Tags: comparison
- Published: 2026-09-08

### [How LunaTV Handles HLS Streaming with HLS.js and ArtPlayer](/MoonTechLab/LunaTV/how-does-lunatv-handle-hls-streaming-with-hlsjs-and-artplayer)

Learn how LunaTV achieves low-latency HLS streaming using HLS.js and ArtPlayer. Discover its dynamic quality probing, ad-blocking, and error recovery features.

- Tags: how-to-guide
- Published: 2026-09-08

### [Which TypeScript Version Does LunaTV Use?](/MoonTechLab/LunaTV/which-typescript-version-does-lunatv-use)

Discover the exact TypeScript version LunaTV utilizes. Find the specific version number declared in the project's package.json file for MoonTechLab/LunaTV.

- Tags: getting-started
- Published: 2026-09-08

### [How to Configure Tailwind CSS in LunaTV: Complete Setup Guide](/MoonTechLab/LunaTV/how-to-configure-tailwind-css-in-lunatv)

Easily configure Tailwind CSS v3 in LunaTV using our complete setup guide. Learn to customize themes, process builds, and add custom styles for a modern, type-safe design.

- Tags: how-to-guide
- Published: 2026-09-08

### [What Are the Core Technologies Used in LunaTV?](/MoonTechLab/LunaTV/what-are-the-core-technologies-used-in-lunatv)

Discover the core technologies powering LunaTV: Next.js 14, TypeScript, Tailwind CSS, ArtPlayer, HLS.js, Kvrocks, Redis, and Docker. Learn how this modern stack delivers adaptive streaming and efficient state management.

- Tags: deep-dive
- Published: 2026-09-08

### [How to Set Up LunaTV with Next.js 14 App Router: Complete Installation Guide](/MoonTechLab/LunaTV/how-to-set-up-lunatv-with-nextjs-14-app-router)

Learn how to set up LunaTV with Next.js 14 App Router. Follow our complete installation guide to get the streaming app running quickly. Clone, install, configure, and run.

- Tags: getting-started
- Published: 2026-09-08

