PeerTube
Decentralized, federated video streaming platform and open-source alternative to YouTube.
Why consider PeerTube?
PeerTube is a federated video hosting platform powered by ActivityPub and WebTorrent P2P streaming. It enables creators and communities to host their own independent video channels.
Learn PeerTube by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide10 sections
What is PeerTube?
PeerTube is an open-source, decentralized video hosting and streaming platform developed by the French non-profit Framasoft. It serves as a federated alternative to centralized video networks like YouTube and Vimeo. Built on the ActivityPub protocol and WebTorrent/HLS peer-to-peer delivery, PeerTube allows anyone to host their own video server while interconnecting into a global, censorship-resistant Fediverse network.
When popular videos are watched simultaneously by multiple users, PeerTube shares video delivery bandwidth among browser peers using WebRTC P2P mesh technology, drastically reducing host server bandwidth costs.
Who Is It For?
- Independent Filmmakers & Video Creators: Publishing video channels without algorithmic demonetization, content suppression, or mandatory corporate advertising.
- Educational Institutions & Research Groups: Hosting lecture archives, conference recordings, and academic seminars under private institutional domains.
- Community Collectives: Running community-driven video sharing portals with custom moderation policies and decentralized federation rules.
Key Features
- Federated ActivityPub network allowing users across different PeerTube and Mastodon servers to follow channels and comment on videos.
- Hybrid P2P video delivery (HLS with WebRTC P2P) that balances bandwidth loads among active viewers.
- Native live streaming with low-latency mode and integrated real-time live chat.
- Comprehensive video transcoding engine supporting multiple resolutions (1080p, 720p, 480p) via FFmpeg.
- Robust moderation tools including automated NSFW blurring, domain blocklists, and user reporting queues.
Installing PeerTube with Docker Compose
PeerTube requires PostgreSQL, Redis, and an Nginx reverse proxy.
version: '3.3'services: peertube: image: chocobozzz/peertube:production-bookworm container_name: peertube restart: unless-stopped environment: - PEERTUBE_DB_USER=peertube - PEERTUBE_DB_PASSWORD=secure_peertube_db_password - PEERTUBE_DB_NAME=peertube_prod - PEERTUBE_DB_HOSTNAME=postgres - PEERTUBE_REDIS_HOSTNAME=redis - PEERTUBE_WEBSERVER_HOSTNAME=peertube.example.com - PEERTUBE_SECRET=generate_a_secure_random_secret_string volumes: - ./data:/data - ./config:/config ports: - "9000:9000" depends_on: - postgres - redis postgres: image: postgres:15-alpine container_name: peertube_postgres restart: unless-stopped volumes: - ./postgres:/var/lib/postgresql/data environment: - POSTGRES_USER=peertube - POSTGRES_PASSWORD=secure_peertube_db_password - POSTGRES_DB=peertube_prod redis: image: redis:7-alpine container_name: peertube_redis restart: unless-stoppedStart the containers:
docker compose up -dRetrieve the automatically generated administrator credentials:
docker compose logs peertube | grep -A1 "Admin password"Configure your Nginx reverse proxy with SSL certificates to forward traffic to http://localhost:9000.
Practical Use Cases
1. Federated Video Channel Publishing
A tech educator publishes video tutorials on an independent PeerTube instance, allowing thousands of Mastodon and Fediverse users across the globe to comment and subscribe directly from their own timelines.
2. High-Concurrency Live Event Streaming
A cultural festival live-streams music performances to 10,000 concurrent viewers; WebRTC P2P sharing handles 70% of video bandwidth, drastically cutting cloud egress costs.
3. Enterprise Internal Video Library
A corporate enterprise hosts confidential employee onboarding videos, town halls, and internal training screencasts within a private, non-federated PeerTube instance behind corporate SSO.
Troubleshooting and Limitations
- FFmpeg Transcoding CPU Spikes: Generating multiple video resolutions (1080p, 720p, 480p) during video processing consumes significant CPU; configure concurrent transcoding job limits in
config/production.yaml. - Public Domain & SSL Requirement: ActivityPub federation requires public HTTPS; federation cannot establish connections over plain HTTP or non-public IP addresses.
Official Resources
- Official Website: https://joinpeertube.org
- GitHub Repository: https://github.com/Chocobozzz/PeerTube
- Documentation: https://docs.joinpeertube.org
Related tools
More options with a similar category or technology profile.
MyPaint
Nimble, distraction-free, and easy graphic application for digital painters.
Pencil2D
Easy, intuitive traditional hand-drawn 2D animation software across raster and vector.
Hydrogen
Advanced open-source drum machine and pattern-based step sequencer for audio production.
Pure Data
Open source visual programming language for multimedia, audio, and physical computing.