MeTube is a Web GUI for youtube-dl (using the yt-dlp fork) with playlist support. Allowing you to download videos from YouTube and dozens of other sites. For a full list of sites they support, check the GitHub Link. I use it for offline downloading of YouTube shows to watch off my plex server later. This container doesn’t have functionality to schedule downloads or grab new uploads, its a manual process of pasting the URL of the video you want to download and it goes out and grabs it. I would like to event have it setup so it automatically downloads new videos from some of the channels I follow but I may have to find a different container for that.
This walk through will cover the deployment of the container and what I do to get it to automatically get downloaded content onto my Plex server.
Prerequisites
I will be setting this up on Portainer utilizing Docker containers running on Ubuntu 22.04.1. Here are my setup guide for all of those pieces of software:
- Installing Ubuntu Server 22.04 LTS
- Things to do after installing Ubuntu Server
- Install and Configure Docker, Docker Compose, and Portainer on Ubuntu Server
Next, you will need to mount your folder shares onto the base servers so the container will be able to access them. If you have followed one of my other walk throughs on Radarr, Sonarr, or Lidarr, I would recommend you use the same docker server those are running on so you only have one mount. If you need a walk through on how to mount a file share onto a linux server:
Deployment
---
version: "3"
services:
metube:
image: alexta69/metube:latest
container_name: metube
environment:
- UID=0
- GID=0
volumes:
- /mnt/plex/metube:/downloads
ports:
- {port number}:8081
restart: always
Stuff to change for your deployment:
- Version – This is be determined by the version of Docker you are running on your server. You can find this by entering the command “docker -v”. Here is a link to the Compatibility Matrix.
- Image – You can do “latest” and it will pull the current version. I prefer to look up the actual tag for the current version. This adds a little more management to updating however pinning it to a specific version adds reliability. Here is a link to the MeTube Tag page.
- PUID and PGID – These numbers are specific to the user account you are running the container under. The Root user is “0” for both. You can find this for your user by logging into your server and running the “id” command.
- Volumes – You will want to map this folder to the location you want the video files to be downloaded. If you want to integrate this with a Plex server, obviously the server will need access to this folder. Update the information with your username or change the location before the “:” to a location of your choosing.
- Ports – You will want to update this to a port that works well inside your environment. It will be the port that you connect to the web interface of the container.
- Restart – You will want to set this to the way you want docker to handle the restarting of the container. Here is a link to the Restart Policies to choose from. I prefer “always” so if it crashes or the server restarts, it will automatically restart the container.
Launch the Stack and navigate to the URL of your docker server followed by the port number you entered for the container. You should see a page that looks like this:
Here is a little information on configuring the interface. You are free to change any settings that you want to do to fit your use, these are the settings and how I use the container:
First, in the top right corner, you should see a half filled circle icon, click it to change the theme.
Next I’ll go over all the settings under the URL paste area:
- Quality – I just leave this on the default of “Best” that way it will download it in the highest resolution available for the video.
- Format – I like to change this to MP4 so its more predictable and pretty much every video player can play it.
- Auto Start – This is a newer setting for the container. If you leave this on “Yes”, it will act like it used to and start downloading the video as soon as you hit Add no matter how many videos you are currently downloading. If you change it to “No”, it will stage up the download and you have to click the download icon next to it when you want it to start.
- Download Folder – You can either leave this as “Default” and the downloaded videos will all go into the main folder you set in the config stack. Or you can create folders inside that folder for organizing the content. I like to create folders for each channel I follow.
- Custom Name Prefix – This will add a custom text in front of the video name on the downloaded video file. This could be used for organization with the date of the video or the channel name.
Thats it for the configuration! Its a very simple yet power tool.
If all you want to do is download the video files, you are done. I went a step further and setup the folder that it downloads to as a Plex library and set it up to scan whenever it sees new content so anytime i want to save a video to watch later or offline, its on my server waiting for me.
I have heard of containers that allow you to monitor a channel or playlist and automatically download new videos when they are posted which would be nice for some of the channels I follow so stay turned for a walk through on setting that up.