Overview
Discover what makes youtube-dl-server powerful
`youtube-dl-server` is a lightweight, self‑hosted media ingestion service that exposes a web UI and REST API for programmatically downloading videos from YouTube and other supported hosts. Built on **Starlette** (an ASGI framework) and powered by **yt‑dlp** or the legacy **youtube-dl**, it offers a clean separation between HTTP handling, task orchestration, and the underlying download engine. The application stores metadata in a lightweight SQLite database (`.ydl-metadata.db`) and persists downloaded files to a user‑defined volume, making it ideal for integration into media pipelines or cloud storage backends.
RESTful API
Web UI
Configurable download options
Profile support
Overview
youtube-dl-server is a lightweight, self‑hosted media ingestion service that exposes a web UI and REST API for programmatically downloading videos from YouTube and other supported hosts. Built on Starlette (an ASGI framework) and powered by yt‑dlp or the legacy youtube-dl, it offers a clean separation between HTTP handling, task orchestration, and the underlying download engine. The application stores metadata in a lightweight SQLite database (.ydl-metadata.db) and persists downloaded files to a user‑defined volume, making it ideal for integration into media pipelines or cloud storage backends.
Key Features
- RESTful API – Endpoints for enqueueing downloads, checking status, and retrieving metadata.
- Web UI – A minimal front‑end for quick manual downloads, queue inspection, and configuration tweaking.
- Configurable download options – Exposes any yt‑dlp/youtube‑dl flag via YAML, including subtitles, format selection, and output templates.
- Profile support – Allows named sets of options for different use cases (e.g., high‑quality archival vs. quick thumbnails).
- Extensible via environment variables – Swap between yt‑dlp and youtube‑dl at runtime, override configuration paths, or mount custom config files.
Technical Stack
| Layer | Technology | Rationale |
|---|---|---|
| Web & API | Starlette (ASGI) | Lightweight, async capable, minimal boilerplate. |
| Download engine | yt‑dlp / youtube‑dl | Mature, actively maintained downloader with broad host support. |
| Data persistence | SQLite (.ydl-metadata.db) | Zero‑config, file‑based DB for metadata; sufficient for most deployments. |
| Containerization | Docker (official image) | Simplifies deployment, volume binding for persistent storage. |
| Configuration | YAML (config.yml) + env vars | Human‑readable, supports overrides and profile merging. |
Core Capabilities
- Task Queue – Internally uses Python’s
asyncioto manage concurrent download jobs. - Metadata API – Exposes JSON endpoints for querying job status, progress percentages, and final file paths.
- Webhooks – Optional callback URLs can be configured to notify external services upon completion or failure.
- Extensibility – Since the download logic is a thin wrapper around yt‑dlp, developers can inject custom post‑processing scripts or integrate with other media services (e.g., transcoding, CDN uploads) by watching the output directory or subscribing to webhook events.
Deployment & Infrastructure
- Self‑hosting – Requires a machine with Docker (or Podman) and sufficient disk space for downloads.
- Scalability – Horizontal scaling is straightforward: run multiple instances behind a load balancer, each with its own output volume or a shared NFS mount.
- Resource Limits – Configure CPU/memory limits in Docker Compose; yt‑dlp respects system limits, but heavy concurrent downloads can saturate I/O.
- Persistence – Volume mounts (
/youtube-dl) ensure that both downloaded files and the SQLite DB survive container restarts.
Integration & Extensibility
- Plugin hooks – The project’s modular design allows adding custom middleware in Starlette or extending the download command via environment variables.
- API clients – Libraries exist in several languages (Python, Node.js, Go) to consume the REST endpoints; developers can embed the service into CI/CD pipelines or media ingestion workflows.
- Webhooks – Configure a callback URL in
config.yml; the server POSTs JSON payloads on job completion, enabling automated post‑processing pipelines.
Developer Experience
- Configuration – YAML is intuitive; missing files are auto‑generated with defaults.
- Documentation – README covers Docker usage, config schema, and API basics; community examples are available on GitHub.
- Community – MIT‑licensed, active forks (e.g.,
manbearwiz/youtube-dl-server) and issue trackers provide quick support. - Extensibility – Adding a new yt‑dlp flag is as simple as inserting it into
ydl_options; no code changes required.
Use Cases
| Scenario | Why use youtube-dl-server |
|---|---|
| Automated archival | Queue large video libraries via API, store locally or on NAS. |
| Media CDN bootstrap | Download videos once and push to a CDN using webhooks or scheduled scripts. |
| Educational content ingestion | Pull lecture recordings, auto‑generate subtitles, and serve via LMS. |
| Custom media bots | Integrate with chat platforms (Slack, Discord) to fetch videos on command. |
| Edge‑computing pipelines | Deploy on a local server to reduce bandwidth, then stream to downstream services. |
Advantages Over Alternatives
- Performance – Starlette’s async core keeps the API responsive even under heavy download loads.
- Flexibility – Exposes the full feature set of yt‑dlp without wrapper limitations.
- Licensing – MIT license allows unrestricted commercial use and internal modifications.
- Simplicity – One Docker image, minimal config, no external dependencies beyond Docker.
- Extensibility – Easy to hook into existing DevOps tooling
Open SourceReady to get started?
Join the community and start self-hosting youtube-dl-server 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
Remotely
Remote control and scripting platform for desktops
Documenso
Open‑source, self‑hosted e‑signature platform
RSS2EMail
Self-hosted other

Tryton
Open-source ERP for businesses of all sizes
OpenSearch
Enterprise‑grade search and observability for unstructured data
LMS
Self-hosted music streaming with rich metadata and discovery