binhex-official-metube

binhex-official-metube

Docker app from Binhex's Repository

Overview

MeTube is a web GUI for youtube-dl with playlist support. Allows you to download videos from YouTube and dozens of other sites. Features: Download videos from YouTube, Vimeo, and many other sites, Queue downloads and track progress, Playlist support, Dark/light themes, Custom output directories, Audio-only downloads, and much more.

MeTube

Build Status Docker Pulls

MeTube is a self-hosted web UI for yt-dlp. Paste a link from YouTube or hundreds of other sites, and it downloads to your server:

  • Video, audio, subtitles and thumbnails — from single videos, whole playlists or entire channels.
  • Subscriptions to channels and playlists, which queue new uploads as they appear.
  • Per-download choices of quality, format and folder, plus server-wide yt-dlp options and presets.

📖 Guides, recipes and a troubleshooting FAQ live in the wiki — many feature requests are already a recipe there, so check it before filing one.

screenshot1

Quick start

docker run -d -p 8081:8081 -v /path/to/downloads:/downloads ghcr.io/alexta69/metube

Or with Docker Compose:

services:
  metube:
    image: ghcr.io/alexta69/metube
    container_name: metube
    restart: unless-stopped
    ports:
      - "8081:8081"
    volumes:
      - /path/to/downloads:/downloads

Then open http://<host>:8081 in your browser. Images are multi-arch (amd64/arm64), and also published on Docker Hub as alexta69/metube.

Configuration

MeTube is configured with environment variables: -e NAME=value on the docker run command line, or the environment: section in Compose. Defaults are the Docker image's; outside Docker, the directories default to the working directory.

Runtime and permissions

Variable Default Description
PUID / PGID 1000 User and group MeTube runs as and writes files with. Legacy UID/GID also work.
UMASK 022 Umask for the files MeTube creates.
CHOWN_DIRS true Make PUID:PGID the owner of the download, state and temp directories at startup. With false, MeTube's user must already have access.
LOGLEVEL INFO DEBUG, INFO, WARNING, ERROR, CRITICAL or NONE.
ENABLE_ACCESSLOG false Log every HTTP request.
DEFAULT_THEME auto UI theme: light, dark, or auto to follow the system.

Downloads

Variable Default Description
MAX_CONCURRENT_DOWNLOADS 3 Downloads that run at once; the rest wait their turn.
DEFAULT_OPTION_PLAYLIST_ITEM_LIMIT 0 Default for the Items Limit field: how many entries of a playlist or channel to download (0 = all).
CLEAR_COMPLETED_AFTER 0 Seconds before finished and failed downloads leave the Completed list (0 = never).
DELETE_FILE_ON_TRASHCAN false Also delete the file from disk when its entry is removed from Completed. ask prompts each time.
SUBSCRIPTION_DEFAULT_CHECK_INTERVAL 60 Default minutes between checks of a subscription.
SUBSCRIPTION_SCAN_PLAYLIST_END 50 Newest entries fetched each time a subscription is checked.
SUBSCRIPTION_MAX_SEEN_IDS 50000 Video IDs remembered per subscription, to bound the state file's size.

Directories

Variable Default Description
DOWNLOAD_DIR /downloads Where downloads are saved.
AUDIO_DOWNLOAD_DIR same as DOWNLOAD_DIR Where audio-only downloads are saved, to keep them apart from video.
TEMP_DIR /downloads Where files are written while downloading. An SSD or tmpfs is faster, but on a RAM disk interrupted downloads can't resume.
STATE_DIR /downloads/.metube Where MeTube keeps its queue, history, subscriptions and uploaded cookies.
CUSTOM_DIRS true Show a Download Folder field under Advanced Options, to save into a subfolder of the download directory.
CREATE_CUSTOM_DIRS true Let that field create folders that don't exist yet.
CUSTOM_DIRS_EXCLUDE_REGEX (^|/)[.@].*$ Folders left out of the field's suggestions; the default hides names starting with . or @. Empty hides none.
DEFAULT_FOLDER Folder the field starts with, relative to the download directory. Requires CUSTOM_DIRS.
DOWNLOAD_DIRS_INDEXABLE false Serve browsable listings of the download directories.

File naming

Templates use yt-dlp's output template syntax. How MeTube applies them is explained in Output templates.

Variable Default Description
OUTPUT_TEMPLATE %(title)s.%(ext)s Filename for downloads.
OUTPUT_TEMPLATE_PLAYLIST %(playlist_title)s/%(title)s.%(ext)s Filename for items added from a playlist. Empty means OUTPUT_TEMPLATE.
OUTPUT_TEMPLATE_CHANNEL %(channel)s/%(title)s.%(ext)s Filename for items added from a channel. Empty means OUTPUT_TEMPLATE.
OUTPUT_TEMPLATE_CHAPTER %(title)s - %(section_number)02d - %(section_title)s.%(ext)s Default filename for each chapter when Split by chapters is on.

yt-dlp

Variable Default Description
YTDL_OPTIONS {} Options for every download, as a JSON object — see yt-dlp options.
YTDL_OPTIONS_FILE Path to a JSON file of such options. Reloaded when it changes; wins over YTDL_OPTIONS for the same key.
YTDL_OPTIONS_PRESETS {} Named option bundles, picked per download in the UI.
YTDL_OPTIONS_PRESETS_FILE Path to a JSON file of presets. Reloaded when it changes; wins over YTDL_OPTIONS_PRESETS for the same name.
ALLOW_YTDL_OPTIONS_OVERRIDES false Show a field for per-download yt-dlp options in the UI. Trusted users only: it allows running commands in the container.
YTDL_NIGHTLY_UPDATE_TIME Use nightly yt-dlp builds, upgrading and restarting daily at this time (HH:MM, 24-hour).

Web server and network

Variable Default Description
HOST 0.0.0.0 Address to listen on. The default is every IPv4 interface; * (or empty) adds IPv6; :: is IPv6 only.
PORT 8081 Port to listen on.
URL_PREFIX / Base path, for serving MeTube under a subpath of a reverse proxy.
HTTPS false Serve HTTPS directly, using CERTFILE and KEYFILE.
CERTFILE / KEYFILE Paths to the HTTPS certificate and key.
PUBLIC_HOST_URL download/ Base URL for the links to completed files. The default is relative to MeTube itself; set a full URL if the files are served from elsewhere.
PUBLIC_HOST_AUDIO_URL audio_download/ The same, for audio downloads.
CORS_ALLOWED_ORIGINS Comma-separated origins allowed to call MeTube from other sites, as browser extensions and bookmarklets do. * allows any site, so prefer naming them.
ALLOW_PRIVATE_ADDRESSES false Allow URLs on private and internal addresses, turning off SSRF protection. Needed for Fake-IP proxy clients, not for ordinary proxies — details.
ROBOTS_TXT Path to a robots.txt file to serve, mounted into the container.

yt-dlp options

yt-dlp options are JSON objects keyed by yt-dlp's API option names, which differ from its command-line flags (converter). They apply at three levels, and for an option set at more than one, the more specific level wins:

  1. Global — YTDL_OPTIONS and YTDL_OPTIONS_FILE, for every download.
  2. Presets — YTDL_OPTIONS_PRESETS and YTDL_OPTIONS_PRESETS_FILE, picked per download under Advanced Options.
  3. Overrides — typed into the UI for a single download, when ALLOW_YTDL_OPTIONS_OVERRIDES is on.
environment:
  - 'YTDL_OPTIONS={"writesubtitles": true, "subtitleslangs": ["en", "de"], "updatetime": false}'

The yt-dlp options guide covers presets, overrides and option files in detail, and the YTDL_OPTIONS Cookbook has ready-made recipes.

Guides

The wiki covers everything beyond the reference above:

Keeping yt-dlp up to date

Sites change constantly, and yt-dlp keeps up with frequent releases. A new MeTube image is published automatically for every yt-dlp stable release, so keep your container updated — watchtower can do it for you. To follow yt-dlp's nightly builds instead, set YTDL_NIGHTLY_UPDATE_TIME.

Troubleshooting and support

MeTube is only a UI for yt-dlp, so most download failures are yt-dlp's. Reproduce them with yt-dlp inside the container, and once a set of options works there, carry it over to YTDL_OPTIONS:

docker exec -ti metube sh
cd /downloads
yt-dlp <url>

The Troubleshooting FAQ covers common problems. Ask questions in Discussions; issues are for bugs in MeTube itself.

Scope and contributing

MeTube's scope is deliberately narrow: it downloads well, and stops once the file is written. Tagging and library organization belong to dedicated tools — point beets (headless, scriptable), MusicBrainz Picard (GUI, acoustic fingerprinting) or Lidarr (full library manager) at your AUDIO_DOWNLOAD_DIR.

Feature requests that fit this scope are welcome, and so are pull requests — for a change that isn't obvious, start a discussion first. CONTRIBUTING.md has the scope policy and how to build and run MeTube locally.

Categories

Download Statistics

48,852,664
Total Downloads
4,684,670
This Month
3,169,094
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/alexta69/metube
Last Updated2026-09-27
First Seen2021-08-21

Runtime arguments

Web UI
http://[IP]:[PORT:8081]/
Network
bridge
Shell
bash
Privileged
false

Template configuration

Port: Web InterfacePorttcp

This is the TCP port for the WebUI

Target
8081
Default
8333
Variable: CUSTOM_DIRSVariable

Whether to enable downloading videos into custom directories

Target
CUSTOM_DIRS
Default
true|false
Variable: DOWNLOAD_MODEVariable

Controls how downloads are scheduled and executed

Target
DOWNLOAD_MODE
Default
sequential|concurrent|limited
Variable: MAX_CONCURRENT_DOWNLOADSVariable

Maximum number of simultaneous downloads (used with limited mode)

Target
MAX_CONCURRENT_DOWNLOADS
Default
3
Variable: DOWNLOAD_DIRVariable

Path to where the downloads will be saved

Target
DOWNLOAD_DIR
Default
/downloads
Variable: AUDIO_DOWNLOAD_DIRVariable

Path to where audio-only downloads will be saved

Target
AUDIO_DOWNLOAD_DIR
Default
/downloads
Variable: DEFAULT_THEMEVariable

Default theme to use for the UI

Target
DEFAULT_THEME
Default
auto|light|dark
Variable: DOWNLOAD_DIRS_INDEXABLEVariable

If true, the download dirs are indexable on the webserver

Target
DOWNLOAD_DIRS_INDEXABLE
Default
true|false
Variable: CREATE_CUSTOM_DIRSVariable

Whether to support automatically creating directories if they do not exist

Target
CREATE_CUSTOM_DIRS
Default
true|false
Variable: CUSTOM_DIRS_EXCLUDE_REGEXVariable

Regular expression to exclude some custom directories from the drop-down

Target
CUSTOM_DIRS_EXCLUDE_REGEX
Variable: STATE_DIRVariable

Path to where the queue persistence files will be saved

Target
STATE_DIR
Default
/config/.metube
Variable: TEMP_DIRVariable

Path where intermediary download files will be saved

Target
TEMP_DIR
Default
/downloads
Variable: DELETE_FILE_ON_TRASHCANVariable

If true, downloaded files are deleted when trashed from the UI

Target
DELETE_FILE_ON_TRASHCAN
Default
true|false
Variable: URL_PREFIXVariable

Base path for the web server (for reverse proxy use)

Target
URL_PREFIX
Default
/
Variable: PUBLIC_HOST_URLVariable

Base URL for download links shown in the UI

Target
PUBLIC_HOST_URL
Variable: HTTPSVariable

Use HTTPS instead of HTTP (requires CERTFILE and KEYFILE)

Target
HTTPS
Default
false|true
Variable: CERTFILEVariable

HTTPS certificate file path

Target
CERTFILE
Variable: KEYFILEVariable

HTTPS key file path

Target
KEYFILE
Variable: PUBLIC_HOST_AUDIO_URLVariable

Base URL for audio download links

Target
PUBLIC_HOST_AUDIO_URL
Variable: OUTPUT_TEMPLATEVariable

Template for downloaded video filenames

Target
OUTPUT_TEMPLATE
Default
%(title)s.%(ext)s
Variable: OUTPUT_TEMPLATE_CHAPTERVariable

Template for chapter filenames

Target
OUTPUT_TEMPLATE_CHAPTER
Default
%(title)s - %(section_number)s %(section_title)s.%(ext)s
Variable: OUTPUT_TEMPLATE_PLAYLISTVariable

Template for playlist video filenames

Target
OUTPUT_TEMPLATE_PLAYLIST
Default
%(playlist_title)s/%(title)s.%(ext)s
Variable: DEFAULT_OPTION_PLAYLIST_STRICT_MODEVariable

If true, strict playlist mode is enabled by default

Target
DEFAULT_OPTION_PLAYLIST_STRICT_MODE
Default
true|false
Variable: DEFAULT_OPTION_PLAYLIST_ITEM_LIMITVariable

Maximum number of playlist items that can be downloaded (0 = no limit)

Target
DEFAULT_OPTION_PLAYLIST_ITEM_LIMIT
Default
0
Variable: YTDL_OPTIONSVariable

Additional options to pass to yt-dlp in JSON format

Target
YTDL_OPTIONS
Default
{}
Variable: YTDL_OPTIONS_FILEVariable

Path to JSON file for yt-dlp options

Target
YTDL_OPTIONS_FILE
Variable: ROBOTS_TXTVariable

Path to robots.txt file mounted in the container

Target
ROBOTS_TXT
Variable: LOGLEVELVariable

Log level for the application

Target
LOGLEVEL
Default
DEBUG|INFO|WARNING|ERROR|CRITICAL|NONE
Variable: ENABLE_ACCESSLOGVariable

Whether to enable access log

Target
ENABLE_ACCESSLOG
Default
true|false
Variable: PUIDVariable

User ID under which MeTube will run

Target
PUID
Default
99
Variable: PGIDVariable

Group ID under which MeTube will run

Target
PGID
Default
100
Variable: UMASKVariable

Umask value used by MeTube

Target
UMASK
Default
022
Path: /downloadsPathrw

This is the path to store downloaded videos

Target
/downloads
Path: /configPathrw

This is the path to store MeTube configuration files

Target
/config
Default
/mnt/user/appdata/metube