Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
 
 
 
 
 
 
Go to file
Alex 3cf7d25f4c improved error handling 2019-12-06 16:30:07 +02:00
.vscode add "completed" panel 2019-12-03 22:32:07 +02:00
app improved error handling 2019-12-06 16:30:07 +02:00
favicon add configurable URL prefix 2019-12-03 23:18:14 +02:00
ui improved error handling 2019-12-06 16:30:07 +02:00
.editorconfig initial commit: working version 2019-11-29 19:31:34 +02:00
.gitignore initial commit: working version 2019-11-29 19:31:34 +02:00
Dockerfile add Dockerfile 2019-11-30 09:40:45 +02:00
LICENSE add LICENSE and README.md 2019-11-30 10:27:50 +02:00
Pipfile initial commit: working version 2019-11-29 19:31:34 +02:00
Pipfile.lock initial commit: working version 2019-11-29 19:31:34 +02:00
README.md fix broken PREFIX_URL feature 2019-12-06 14:37:08 +02:00
metube.ai update favicon 2019-11-30 09:41:20 +02:00
screenshot.gif add screenshot 2019-12-03 23:21:27 +02:00

README.md

MeTube

Web GUI for youtube-dl with playlist support

screenshot1

Run using Docker

docker run -d -p 8081:8081 -v /path/to/downloads:/downloads --user 1001:1001 alexta69/metube

Run using docker-compose

version: "3"
services:
  metube:
    image: alexta69/metube
    container_name: metube
    restart: unless-stopped
    user: "1001:1001"
    ports:
      - "8081:8081"
    volumes:
      - /path/to/downloads:/downloads

Configuration via environment variables

Certain values can be set via environment variables, using the -e parameter on the docker command line, or the environment: section in docker-compose.

  • DOWNLOAD_DIR: path to where the downloads will be saved. Defaults to "/downloads" in the docker image, and "." otherwise.
  • URL_PREFIX: base path for the web server (for use when hosting behind a reverse proxy). Defaults to "/".

Running behind a reverse proxy

Use the following nginx configuration to run MeTube behind a reverse proxy. The extra proxy_set_headers directives are there to make WebSockets work. Don't forget to set the URL_PREFIX environment variable to the correct value as well.

location /metube/ {
        proxy_pass http://metube:8081;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

Build and run locally

Make sure you have node.js installed.

cd metube
# install Angular and build the UI
npm install
node_modules/.bin/ng build
# install python dependencies
pip3 install pipenv
pipenv install
# run
python3 app/main.py

A Docker image can be built locally (it will build the UI too):

docker build -t metube .

Development notes

  • The above works on Windows as well as Linux.
  • If you're running the server in VSCode, your downloads will go to your user's Downloads folder (this is configured via the environment in .vscode/launch.json).