YoutubeDL-Server
Web and REST interface to Youtube-DL for downloading videos onto a server.
Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Introduction
YoutubeDL-Server is a simple web and REST interface for downloading videos to a server. The backend is written in Python with the Starlette framework, and downloads are handled by yt-dlp or youtube-dl. This project is a fork of manbearwiz/youtube-dl-server and is released under the MIT license.
Key Features
- Web interface: Open
http://<host>:8080/in a browser and enter a link to start a download. The interface lets you view task logs and completed files, and choose the download format and profile. - REST API: Supports submitting download tasks (a single URL, or several URLs combined into one task), listing and filtering tasks, viewing queue statistics, stopping, retrying or deleting tasks, clearing history, fetching metadata only without downloading, listing or deleting downloaded files, and querying supported formats and extractors.
- Multiple formats: Video supports best, mp4, webm, mkv, avi, flv, ogg and more; audio supports mp3, aac, flac, m4a, opus, vorbis, wav and more.
- Profiles: Choose a preset group of settings in the interface, such as "Audio Podcast" (extracts MP3 and embeds the thumbnail). Each profile can override any yt-dlp option.
- Option groups (Aliases): Reusable sets of options that can be shared by several profiles, or selected individually in the advanced options of the download form.
- Scheduled livestreams and premieres: For livestreams or premieres that haven't started yet, the task enters the "Scheduled" state and is downloaded once the broadcast begins, instead of failing outright.
- Parallel downloads: You can set the number of download workers; the default is 2. Task data is stored in a SQLite database.
- Bookmarklet: Send the web page you are currently viewing to the server for download with one click, with one version for HTTPS deployments and another for plain HTTP.
Target Users and Use Cases
Suited to self-hosting users who have a NAS, home server or VPS. You can submit download tasks remotely from any device through a browser or a script, and the files are saved directly on the server, which makes it easy to archive them in one place or hand them to a media server for playback.
Deployment
Docker
Docker Hub image: nbr23/youtube-dl-server
nbr23/youtube-dl-server:yt-dlp(or the default image without a tag): uses yt-dlpnbr23/youtube-dl-server:youtube-dl: uses youtube-dl (the project notes that the latest release of youtube-dl is already quite old)
docker run -d --name youtube-dl -p 8080:8080 -v $HOME/youtube-dl:/youtube-dl nbr23/youtube-dl-server:yt-dlp
Docker Compose
youtube-dl:
image: "nbr23/youtube-dl-server:latest"
volumes:
- $HOME/youtube-dl:/youtube-dl
- ./config.yml:/app_config/config.yml:ro
ports:
- 8080:8080
restart: always
Running from Python source
Requires Python 3.8 or later:
pip install -r requirements.txt
cd front && npm install && npm run build
python3 -u ./youtube-dl-server.py
You can use the environment variable YOUTUBE_DL=yt-dlp to specify which download tool to use.
The community also provides an Ansible role and a Kubernetes Helm chart (ytdl-k8s) for other deployment methods.
Configuration
All configuration lives in config.yml. You can set a different path with the environment variable YDL_CONFIG_PATH; if the file does not exist, a default configuration is generated automatically.
ydl_server: listening port and address, site title, database path, playlist output template, number of download threads, trust of reverse proxy headers, and so on.ydl_options: any yt-dlp option; just remove the leading--from the command-line option name, for examplewrite-sub: True,sub-lang: es.profilesandaliases: profiles and option groups; option groups can reference each other withuse:.
Technical Requirements and Notes
- Some format conversions and audio extraction require
ffmpeg. - If you deploy over plain HTTP, using the fetch-based bookmarklet on an HTTPS site will be blocked by the browser as mixed content, so you need to use the form-submission version instead; alternatively, put the server behind a reverse proxy and access it over HTTPS.
- The
outputpath must not resolve to the filesystem root, otherwise the service refuses to start.
Discover more
MKVPriority
Assigns priority scores to audio and subtitle tracks in MKV files
youtube-dl-nas
Lightweight authenticated yt-dlp queue for NAS: video, audio, subtitles, mobile sharing, restart-safe downloads, and Docker.
Deleterr
Automated Plex media cleanup with watch-based rules, smart exclusions, and "Leaving Soon" notifications via Radarr, Sonarr & Tautulli.
HomeTube
HomeTube is a friendly video downloader managing single video URL into organized content structure for automatic home media server experience.
Jellyseerr
Manage requests for your media library, supports Plex, Jellyfin and Emby media servers (fork of Overseerr).
Kapowarr
Kapowarr is a software to build and manage a comic book library, fitting in the *arr suite of software.