Overview
Discover what makes ChannelTube powerful
ChannelTube is a lightweight, self‑hosted service that automates the synchronization of YouTube channel content using **yt-dlp**. From a developer’s standpoint, it acts as a scheduled downloader that can be embedded into larger media‑management pipelines. The application exposes a minimal REST endpoint (default port 5000) and relies on environment variables for configuration, making it trivial to integrate with container orchestrators or CI/CD workflows. The core logic revolves around invoking yt-dlp with user‑defined format IDs, codec fallbacks, and subtitle handling options—all of which are exposed as environment variables for maximum flexibility.
Runtime
Framework
Data Layer
Scheduling
Overview
ChannelTube is a lightweight, self‑hosted service that automates the synchronization of YouTube channel content using yt-dlp. From a developer’s standpoint, it acts as a scheduled downloader that can be embedded into larger media‑management pipelines. The application exposes a minimal REST endpoint (default port 5000) and relies on environment variables for configuration, making it trivial to integrate with container orchestrators or CI/CD workflows. The core logic revolves around invoking yt-dlp with user‑defined format IDs, codec fallbacks, and subtitle handling options—all of which are exposed as environment variables for maximum flexibility.
Technical Stack & Architecture
- Runtime: Python 3 (the base image is
python:slim), leveraging the official yt-dlp library as a dependency. - Framework: A small Flask‑like microservice (or similar lightweight web server) that exposes a single HTTP endpoint for triggering syncs and reporting status.
- Data Layer: None beyond the filesystem; media files are written directly to mounted volumes (
/channeltube/downloadsfor video,/channeltube/audio_downloadsfor audio). Metadata is optional and can be stored in a simple JSON file if needed. - Scheduling: Cron‑style scheduling is implemented via an in‑process scheduler that reads a comma‑separated list of hours from the
SYNC_HOURSenvironment variable. The scheduler is tolerant to drift, allowing a 10‑minute deadband around the target hour. - Media Server Hooks: Optional callbacks to Plex or Jellyfin are performed by issuing HTTP POST requests to the respective
/library/sections/{id}/refreshendpoints, using bearer tokens supplied via environment variables.
Core Capabilities & APIs
- Download Control: Specify video/audio format IDs (
video_format_id,audio_format_id) and fallback codecs (fallback_vcodec,fallback_acodec). - Subtitle Management: Choose between none, embed, or external subtitles; specify languages (
subtitle_languages). - Naming Conventions: Toggle inclusion of the YouTube video ID in filenames (
include_id_in_filename). - Threading: Configure concurrency with
thread_limit. - Logging: Verbose mode (
verbose_logs) toggles detailed logs to stdout, which can be captured by Docker logging drivers or systemd journal. - Webhook‑style API: The
/syncendpoint accepts a JSON payload containing channel identifiers, triggering an immediate download outside the scheduled window.
Deployment & Infrastructure
- Containerization: A ready‑to‑use Docker image (
thewicklowwolf/channeltube) is published to Docker Hub, with adocker‑composesnippet in the README for quick spin‑up. - Volume Management: Separate volumes for video and audio downloads allow fine‑grained storage policies.
- User Permissions:
PUIDandPGIDenvironment variables let the container run as a non‑root user, essential for host file system security. - Scalability: While the application is single‑process, horizontal scaling can be achieved by running multiple instances behind a load balancer, each with isolated volume mounts. The
thread_limitparameter ensures that each instance respects host CPU limits.
Integration & Extensibility
- Plugin Hooks: The design is intentionally minimal, but developers can fork the repository and add custom post‑processing steps (e.g., transcoding with FFmpeg or uploading to cloud storage).
- Webhooks: By exposing the
/syncendpoint, external services (GitHub Actions, Jenkins) can trigger downloads on demand. - Extensible Config: All runtime options are environment variables; adding new flags is straightforward and automatically picked up by the scheduler.
- Community Contributions: The project’s open‑source nature invites pull requests for additional media server integrations or advanced subtitle handling.
Developer Experience
- Documentation: The README provides concise, actionable instructions for Docker deployment and environment variable usage.
- Community Support: The GitHub repository has active issue tracking and CI status badges, indicating ongoing maintenance.
- Error Handling: yt-dlp errors are captured and returned in the HTTP response, enabling automated retry logic.
- Testing: While not included, the codebase is amenable to unit tests around the scheduling and download logic due to its modular structure.
Use Cases
- Personal Media Libraries – A hobbyist can keep a Plex or Jellyfin library up to date with their favorite channels without manual downloads.
- Educational Institutions – Schools can automatically ingest lecture videos from institutional YouTube channels, ensuring consistent naming and subtitle availability.
- Corporate Training – Companies can sync internal training channels to a private media server, with custom codecs and security tokens.
- DevOps Pipelines – CI/CD workflows can trigger ChannelTube via its API to fetch build‑related video artifacts or tutorials for internal documentation.
Advantages Over Alternatives
- Zero‑Configuration Runtime – No database or external services required; all state lives on the filesystem.
- Fine‑Grained Control – Direct exposure of yt-dlp’s rich option set gives developers deep control over download quality and codec selection.
- Open Licensing – The project is released under a permissive license, allowing integration into proprietary systems without licensing headaches.
- Performance
Open SourceReady to get started?
Join the community and start self-hosting ChannelTube today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Picsur
Self-hosted image hosting with editing, expiring links, and ShareX integration
HortusFox
Collaborative, self‑hosted plant management for tech‑savvy gardeners
Countly Community Edition
Open‑source product analytics for mobile, web, and desktop
Black Candy
Self-hosted music streaming for your personal library
Directory Lister
Browse and share web folders with zero configuration
ntfy
Send push notifications via HTTP scripts