selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
youtube-dl-server logo

Self-host youtube-dl-server

Download YouTube videos via web UI or REST API

BetaOpen SourceMIT
Updated4 months ago
LanguagePython
Setup difficultyEasy
Stars
319
Port
8080 (HTTP web UI and REST API)
Docker
nbr23/youtube-dl-server
Install with Docker
youtube-dl-server screenshot 1youtube-dl-server screenshot 2youtube-dl-server screenshot 3

What is youtube-dl-server?

youtube-dl-server is a self-hosted web application that provides a simple web UI and REST API for downloading videos from YouTube and other supported sites using yt-dlp or youtube-dl as the backend. It features a web interface for queuing downloads, a REST API for programmatic access, download profiles for common format combinations, scheduled downloads for live events and premieres, job history with logs, and Docker-based deployment. The server stores download metadata in a SQLite database and outputs files to a configured directory. It is a fork of manbearwiz/youtube-dl-server with added features like profiles, aliases, and scheduling.

Should you self-host youtube-dl-server?

youtube-dl-server scores 47/100 on selfhost.directory (how scoring works) and ranks #31 of 45 in Download Management. It has 319 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is cobalt (83/100, 45 586 stars). It scores higher overall, so compare the two before you pick. See youtube-dl-server vs cobalt side by side.

Features

  • Bookmarklet Support
  • Download profiles
  • Format Selection
  • Job history and management
  • Multiple download backends
  • Option aliases
  • REST API
  • Scheduled Downloads
  • Web UI

youtube-dl-server README

How to install youtube-dl-server

Install youtube-dl-server with Docker

Environment variables
YDL_CONFIG_PATH for alternate config path

docker run -d --name youtube-dl -p 8080:8080 -v $HOME/youtube-dl:/youtube-dl nbr23/youtube-dl-server:latest

Use :yt-dlp tag for yt-dlp backend, :youtube-dl tag for youtube-dl backend

How to configure youtube-dl-server

  • debugFalseEnable debug mode

    Enable debug mode

  • default_formatvideo/bestDefault format pre-selected in the UI

    Default format pre-selected in the UI

  • download_workers_count2Number of parallel download worker threads

    Number of parallel download worker threads

  • forwarded_allow_ipsNoneComma-separated list of IPs to trust proxy headers from (passed to uvicorn)

    Comma-separated list of IPs to trust proxy headers from (passed to uvicorn)

  • host0.0.0.0IP to bind to

    IP to bind to

  • max_log_entries100Maximum number of job history entries to keep

    Maximum number of job history entries to keep

  • metadata_db_path/youtube-dl/.ydl-metadata.dbPath to the SQLite job database

    Path to the SQLite job database

  • output_playlist/youtube-dl/%(playlist_title)s [%(playlist_id)s]/%(title)s.%(ext)sOutput template for playlists and multi-URL jobs

    Output template for playlists and multi-URL jobs

  • port8080Port to listen on

    Port to listen on

  • proxy_headersTrueTrust X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port headers (passed to uvicorn)

    Trust X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port headers (passed to uvicorn)

  • schedule_check_interval60Seconds between checks for scheduled jobs that have become due

    Seconds between checks for scheduled jobs that have become due

  • schedule_max_attempts24Maximum number of times a job may be rescheduled before it is failed

    Maximum number of times a job may be rescheduled before it is failed

  • schedule_upcomingTruePark upcoming live events and premieres in the Scheduled status until their start time instead of failing them

    Park upcoming live events and premieres in the Scheduled status until their start time instead of failing them

  • site_titleOptional browser tab title, navbar brand, and main-page heading

    Optional browser tab title, navbar brand, and main-page heading

  • YDL_CONFIG_PATHAlternate configuration path or file path

    Alternate configuration path or file path

  • YDLS_RELEASE_DATERelease date string shown in the server info endpoint

    Release date string shown in the server info endpoint

  • YDLS_VERSIONVersion string shown in the server info endpoint

    Version string shown in the server info endpoint

  • YOUTUBE_DLThe yt-dlp/youtube-dl module to use (yt-dlp, youtube-dl)

    The yt-dlp/youtube-dl module to use (yt-dlp, youtube-dl)

    values: yt-dlp, youtube-dl

More in Media

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…