MCPSERV.CLUB
Invidious

Invidious

Self-Hosted

Open‑source YouTube alternative front‑end

Active(90)
18.1kstars
0views
Updated 8 days ago
Invidious screenshot 1
1 / 5

Overview

Discover what makes Invidious powerful

Invidious is an open‑source, self‑hosted front‑end to YouTube that removes the need for Google’s tracking and ad infrastructure. From a developer perspective, it acts as a lightweight HTTP API layer that fetches video metadata, streams, and channel information directly from YouTube’s public endpoints or via the unofficial `youtube-dl`/yt‑dl libraries. The core idea is to expose a clean, privacy‑oriented interface while keeping the underlying logic modular enough for custom deployments.

Language

Web Framework

Data Layer

Background Workers

Overview

Invidious is an open‑source, self‑hosted front‑end to YouTube that removes the need for Google’s tracking and ad infrastructure. From a developer perspective, it acts as a lightweight HTTP API layer that fetches video metadata, streams, and channel information directly from YouTube’s public endpoints or via the unofficial youtube-dl/yt‑dl libraries. The core idea is to expose a clean, privacy‑oriented interface while keeping the underlying logic modular enough for custom deployments.

Technical Stack & Architecture

  • Language: Go 1.20+ is the primary implementation language, chosen for its performance, static binaries, and concurrency primitives.
  • Web Framework: The project uses the net/http standard library with minimal middleware, keeping the runtime footprint small. Templates are rendered via Go’s html/template package, ensuring no client‑side JavaScript is required for core functionality.
  • Data Layer: PostgreSQL (>=12) or MySQL are supported. The schema stores user accounts, subscriptions, cache entries for video metadata, and audit logs. A separate Redis instance is optional for caching popular queries.
  • Background Workers: Go routines fetch video details asynchronously. A simple job queue (channel‑based) handles subscription updates, metadata refreshes, and moderation tasks.
  • Containerization: Dockerfiles are provided for all supported stacks. The image exposes a single port and is ready for orchestration with Docker‑Compose, Kubernetes (via Helm charts), or any OCI‑compatible platform.

Core Capabilities & APIs

  • RESTful API: Endpoints for videos, channels, playlists, and search. Authentication is JWT‑based; unauthenticated requests are rate‑limited.
  • Webhook Support: External services can subscribe to channel updates or subscription events via configurable webhooks.
  • Customizable Front‑End: Themes, homepage layouts, and audio‑only playback are all configurable via JSON/YAML files. The template engine allows developers to inject custom CSS/JS if needed.
  • Export/Import: JSON export of user subscriptions and preferences, useful for migrations or backups.
  • Rate‑Limit & Quota Management: Built‑in logic to respect YouTube’s API quotas, with optional integration of a paid quota provider.

Deployment & Infrastructure

Deploying Invidious is straightforward: a single binary, a database, and optional Redis. The application supports both HTTP and HTTPS out of the box; reverse‑proxy configuration is documented for NGINX, Caddy, and Apache. For high‑traffic scenarios, horizontal scaling is achieved by running multiple instances behind a load balancer; the shared database ensures consistent user state. The Docker image is lightweight (~120 MB) and can be run on ARM or x86 architectures, making it suitable for Raspberry Pi clusters or edge devices.

Integration & Extensibility

The codebase exposes a plugin‑style architecture: developers can write Go modules that hook into the request lifecycle or extend the API. For example, a custom authentication provider (OAuth2 against an external IdP) can be dropped in without touching the core. The public API is documented with OpenAPI/Swagger, enabling third‑party clients to generate SDKs automatically. Community contributions often add new storage backends (e.g., SQLite for single‑node setups) or additional analytics endpoints.

Developer Experience

Invidious prioritizes clean, well‑structured code. The repository follows semantic versioning, and the CI pipeline ensures every pull request passes linting and unit tests. Documentation is split into user, admin, and developer sections; the developer docs include a “For Developers” chapter that walks through extending endpoints, adding middleware, and contributing. The active community on Matrix, IRC, and GitHub ensures rapid issue triage and feature discussions.

Use Cases

  • Privacy‑Focused Media Hubs: Enterprises or educational institutions can host Invidious to provide YouTube content without exposing users to Google’s tracking.
  • Custom Video Platforms: Developers can build on top of Invidious to create niche video portals (e.g., educational content, internal training) with their own branding.
  • Edge Computing: Deploy on low‑power devices to cache popular videos locally, reducing bandwidth for remote users.
  • Testing & Automation: The API can be used in CI pipelines to validate video availability or scrape metadata for analytics.

Advantages Over Alternatives

  • Performance: Go’s compiled binaries and goroutine concurrency deliver low latency even under load.
  • Licensing: AGPLv3 ensures any derivative works remain open, aligning with privacy‑first values.
  • Modularity: Minimal dependencies and a clear separation of concerns make the codebase approachable for contributors.
  • Scalability: Stateless HTTP servers with shared database enable horizontal scaling without complex sharding.
  • Community & Documentation: Regular releases, comprehensive docs, and an active chat ecosystem reduce onboarding friction.

In summary, Invidious offers developers a robust, privacy‑oriented platform that can be extended, scaled, and integrated into larger ecosystems with minimal friction.

Open SourceReady to get started?

Join the community and start self-hosting Invidious today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
AGPL-3.0
Stars
18.1k
Technical Specs
Pricing
Open Source
Database
Multiple
Docker
Official
Supported OS
LinuxDocker
Author
iv-org
iv-org
Last Updated
8 days ago