MCPSERV.CLUB
PeerTube

PeerTube

Self-Hosted

Decentralized, ad‑free video sharing platform

Active(100)
14.1kstars
0views
Updated 14 days ago

Overview

Discover what makes PeerTube powerful

PeerTube is a self‑hosted, federated video platform that replaces centralized services like YouTube with an open‑source, community‑owned network. From a developer’s perspective it is a full‑stack application that bundles video ingestion, transcoding, storage, and distribution while exposing a rich REST/JSON‑API for integration. The core goal is to give operators complete control over data, moderation policies, and monetization while still allowing cross‑instance discovery via ActivityPub.

Backend

Frontend

Media Pipeline

Federation

Overview

PeerTube is a self‑hosted, federated video platform that replaces centralized services like YouTube with an open‑source, community‑owned network. From a developer’s perspective it is a full‑stack application that bundles video ingestion, transcoding, storage, and distribution while exposing a rich REST/JSON‑API for integration. The core goal is to give operators complete control over data, moderation policies, and monetization while still allowing cross‑instance discovery via ActivityPub.

Technical Stack

  • Backend: Written in Node.js with the express framework, leveraging passport for authentication and sequelize as an ORM.
  • Frontend: Angular (v12+) delivers a SPA experience; the client talks to the backend through JSON endpoints and WebSocket streams for live events.
  • Media Pipeline: Video files are processed by ffmpeg (via the fluent-ffmpeg wrapper) into HLS and DASH manifests, then stored in a PostgreSQL‑backed database for metadata and an S3/MinIO compatible object store for the actual media files.
  • Federation: ActivityPub is implemented using activitypub-node, enabling instances to share videos, comments, and follow relationships.
  • Database: PostgreSQL (>=12) for relational data; Redis is optional for caching and job queues.
  • Background Workers: Node‑based workers (using bull/Redis) handle transcoding, thumbnail generation, and federation tasks asynchronously.

Core Capabilities

  • REST/JSON API: CRUD operations for videos, channels, playlists, and user accounts; OAuth2 support for third‑party clients.
  • Webhooks & ActivityPub: Subscribe to events such as new uploads or instance joins; publish and consume ActivityPub objects for federation.
  • Transcoding Jobs: Expose job status, progress, and logs via API; allow custom transcoding profiles.
  • Plugin System: Loadable modules (npm packages) that hook into lifecycle events, add routes, or extend the UI.
  • CLI Tools: peertube-cli for database migrations, instance checks, and media cleanup.

Deployment & Infrastructure

PeerTube can be deployed on any Linux distribution with Node.js, PostgreSQL, and a compatible object store. Docker Compose is the official deployment method; images are available on Docker Hub (chocobozzz/peertube). Kubernetes manifests (Helm chart) are community‑maintained. For scaling, horizontal pod autoscaling can be applied to the worker pool; media files are served via a CDN or edge cache (e.g., Cloudflare R2). The application is stateless except for the database and object store, making it straightforward to add replicas.

Integration & Extensibility

  • Custom Authentication: Replace the default passport strategies with LDAP, SAML, or OAuth providers.
  • External Analytics: Expose raw event streams that can be consumed by Prometheus or Grafana dashboards.
  • Content Moderation: Hook into the moderation API to integrate AI‑based filtering or external policy engines.
  • UI Themes: Angular components can be overridden via CSS variables and custom component bundles.

Developer Experience

The documentation is hosted on the official website and includes a dedicated “Developer” section with API reference, SDK examples (JavaScript/TypeScript), and migration guides. The community is active on GitHub Discussions, Matrix rooms, and a dedicated Mastodon instance, providing quick support for integration questions. The open‑source license (AGPLv3) encourages customization while ensuring that improvements remain community‑shared.

Use Cases

  • Educational Institutions: Host lecture videos on a private federated network, avoiding third‑party trackers.
  • NGOs & Advocacy Groups: Create a resilient platform that can interoperate with other activist networks (e.g., Mastodon).
  • Enterprise Video Portals: Deploy an internal video hub with custom authentication and analytics, while still allowing selective federation.
  • Open‑Source Projects: Provide a community channel for demos, tutorials, and release videos without vendor lock‑in.

Advantages

  • No Vendor Lock‑In: Operators own the code, data, and moderation policies.
  • Federated Growth: Small instances can interconnect, creating a larger audience without central servers.
  • Performance & Flexibility: Node.js + Angular offers modern, responsive UI; the transcoding pipeline is fully configurable.
  • Open‑Source Licensing: AGPLv3 ensures that any modifications are shared, fostering a healthy ecosystem.
  • Scalable Architecture: Stateless API servers, worker queues, and CDN‑compatible storage make horizontal scaling straightforward.

PeerTube delivers a developer‑friendly platform that balances modern web technologies with the principles of decentralization, giving you full control over your video distribution while still tapping into a growing federated community.

Open SourceReady to get started?

Join the community and start self-hosting PeerTube 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
14.1k
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Docker
Official
Min RAM
1GB
Min Storage
5GB
Supported OS
LinuxDocker
Author
Chocobozzz
Chocobozzz
Last Updated
14 days ago