YouTubeDL-Material
Container
YoutubeDL-Material is a Material Design frontend for youtube-dl. It's coded using Angular 9 for the frontend, and Node.js on the backend.
Image details
Source details
Configuration
TypeContainerlinuxtzahi12345/youtubedl-material:latest17442:17442/tcp/app/appdata : /portainer/Files/AppData/Config/YTDLM/app/video : /portainer/Files/AppData/Youtube/Video/app/subscriptions : /portainer/Files/AppData/Youtube/Subscriptions/app/users : /portainer/Files/AppData/Youtube/Users/app/audio : /portainer/Files/AppData/Youtube/Audiounless-stoppedTemplate by novaspirit
Notes
Check our Github page: https://github.com/pi-hosted/pi-hosted
Official Webpage: https://github.com/Tzahi12345/YoutubeDL-Material
Official Docker Documentation: https://github.com/Tzahi12345/YoutubeDL-Material#docker
Standalone Install
Select an install method, to see config/commands for deploying YouTubeDL-Material
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select YouTubeDL-Material, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
More install options in our documentation, or see tzahi12345/youtubedl-material for app-specific guidance.
YoutubeDL-Material
YoutubeDL-Material is a Material Design frontend for youtube-dl. It's coded using Angular 11 for the frontend, and Node.js on the backend.
Now with Docker support!
USAGE OF THE NIGHTLY BUILDS IS HIGHLY RECOMMENDED.
For much better scaling with large datasets please run your YTDL-M instance with a MongoDB backend rather than the json file-based default. It will fix a lot of performance problems (especially with datasets in the tens of thousands videos/audios)! The (closed) issues as well as the project's Wiki will give you good starting points for your journey!For MongoDB specifically there is this little guide.
Getting Started
Check out the prerequisites, and go to the installation section. Easy as pie!Here's an image of what it'll look like once you're done:

Dark mode:

Prerequisites
NOTE: If you would like to use Docker, you can skip down to the Docker section for a setup guide.Debian/Ubuntu:
sudo apt-get install nodejs youtube-dl ffmpeg unzip python npmCentOS 7:
sudo yum install epel-release
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum install centos-release-scl-rh
sudo yum install rh-nodejs12
scl enable rh-nodejs12 bash
sudo yum install nodejs youtube-dl ffmpeg ffmpeg-develOptional dependencies:
- AtomicParsley (for embedding thumbnails, package name
atomicparsley)
Installing
- First, download the latest release!
- Drag the
youtubedl-materialdirectory to an easily accessible directory. Navigate to theappdatafolder and edit thedefault.jsonfile.
NOTE: If you are intending to use a reverse proxy, this next step is not necessary
- Port forward the port listed in
default.json, which defaults to17442.
- Once the configuration is done, run
npm installto install all the backend dependencies. Once that is finished, typenpm start. This will run the backend server, which serves the frontend as well. On your browser, navigate to to the server (url with the specified port). Try putting in a youtube link to see if it works. If it does, viola! YoutubeDL-Material is now up and running.
If you experience problems, know that it's usually caused by a configuration problem. The first thing you should do is check the console. To get there, right click anywhere on the page and click "Inspect element." Then on the menu that pops up, click console. Look at the error there, and try to investigate.
Build it yourself
If you'd like to install YoutubeDL-Material, go to the Installation section. If you want to build it yourself and/or develop the repository, then this section is for you.To deploy, simply clone the repository, and go into the
youtubedl-material directory. Type npm install and all the dependencies will install. Then type cd backend and again type npm install to install the dependencies for the backend.Once you do that, you're almost up and running. All you need to do is edit the configuration in
youtubedl-material/appdata, go back into the youtubedl-material directory, and type npm build. This will build the app, and put the output files in the youtubedl-material/backend/public folder.The frontend is now complete. The backend is much easier. Just go into the
backend folder, and type npm start.Finally, if you want your instance to be available from outside your network, you can set up a reverse proxy.
Alternatively, you can port forward the port specified in the config (defaults to
17442) and point it to the server's IP address. Make sure the port is also allowed through the server's firewall.Docker
Host-specific instructions
If you're on a Synology NAS, unRAID or any other possible special case you can check if there's known issues or instructions both in the issue tracker and in the Wiki!Setup
If you are looking to setup YoutubeDL-Material with Docker, this section is for you. And you're in luck! Docker setup is quite simple.- Run
curl -L https://github.com/Tzahi12345/YoutubeDL-Material/releases/latest/download/docker-compose.yml -o docker-compose.ymlto download the latest Docker Compose, or go to the releases page to grab the version you'd like. - Run
docker-compose pull. This will download the official YoutubeDL-Material docker image. - Run
docker-compose upto start it up. If successful, it should say "HTTP(S): Started on port 17443" or something similar. This tells you the container-internal port of the application. Please check yourdocker-compose.ymlfile for the external port. If you downloaded the file as described above, it defaults to 8998. - Make sure you can connect to the specified URL + external port, and if so, you are done!
NOTE: It is currently recommended that you use the
nightly tag on Docker. To do so, simply update the docker-compose.yml image field so that it points to tzahi12345/youtubedl-material:nightly.Custom UID/GID
By default, the Docker container runs as non-root with UID=1000 and GID=1000. To set this to your own UID/GID, simply update theenvironment section in your docker-compose.yml like so:environment:
UID: YOUR_UID
GID: YOUR_GIDAPI
API DocsTo get started, go to the settings menu and enable the public API from the Extra tab. You can generate an API key if one is missing.
Once you have enabled the API and have the key, you can start sending requests by adding the query param
apiKey=API_KEY. Replace API_KEY with your actual API key, and you should be good to go! Nearly all of the backend should be at your disposal. View available endpoints in the link above.iOS Shortcut
If you are using iOS, try YoutubeDL-Material more conveniently with a Shortcut. With this Shorcut, you can easily start downloading YouTube video with just two taps! (Or maybe three?)You can download Shortcut here.
Contributing
If you're interested in contributing, first: awesome! Second, please refer to the guidelines/setup information located in the Contributing wiki page, it's a helpful way to get you on your feet and coding away.Pull requests are always appreciated! If you're a bit rusty with coding, that's no problem: we can always help you learn. And if that's too scary, that's OK too! You can create issues for features you'd like to see or bugs you encounter, it all helps this project grow.
If you're interested in translating the app into a new language, check out the Translate wiki page.
Authors
- Isaac Grynsztein (me!) - Initial work
Official translators:
- Spanish - tzahi12345
- German - UnlimitedCookies
- Chinese - TyRoyal
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for detailsLegal Disclaimer
This project is in no way affiliated with Google LLC, Alphabet Inc. or YouTube (or their subsidiaries) nor endorsed by them.Acknowledgments
- youtube-dl
- AllTube (for the inspiration)
Serve YouTubeDL-Material on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying youtubedl-material.example.com to http://youtubedl-material:17442
Add this to your Caddyfile
youtubedl-material.example.com {
reverse_proxy http://youtubedl-material:17442
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs youtubedl-material - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:17442 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :17442 - Stop the other service, or pick a different host port. In
17442:17442only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:17442. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, youtubedl-material can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 17442
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /portainer/Files/AppData/Config/YTDLM(and the same for the other mapped folders)
Image won't pull
Test the pull directly on the host: docker pull tzahi12345/youtubedl-material:latest
- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64, arm/v7, arm64/v8 - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.
- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect youtubedl-material --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue on tzahi12345/youtubedl-material
- Template not working: Open an issue on novaspirit/pi-hosted
- This website not working: Open an issue on lissy93/portainer-templates
A single container
YouTubeDL-Material runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.
The app image
An image is the app packed up ready to go, everything YouTubeDL-Material needs bundled into one download. This template pulls tzahi12345/youtubedl-material:latest, which Docker fetches once (about 280 MB) and then starts your own copy from.
Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. YouTubeDL-Material's comes from Docker Hub, published by tzahi12345.
Version tags
The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Pin a specific tag if you would rather stay on one version.
Which machines it runs on
Every image is built for particular CPU types. This one ships for amd64, arm64, arm/v7, arm64/v8, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.
Ports
A port is the door the app answers on. A mapping like 17442:17442 means it's reachable on port 17442 of your server, where the left number is yours to change and the right one belongs to the app. It opens:
17442:17442
Volumes
A volume is where YouTubeDL-Material keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/app/appdatafrom/portainer/Files/AppData/Config/YTDLMon the host/app/videofrom/portainer/Files/AppData/Youtube/Videoon the host/app/subscriptionsfrom/portainer/Files/AppData/Youtube/Subscriptionson the host/app/usersfrom/portainer/Files/AppData/Youtube/Userson the host/app/audiofrom/portainer/Files/AppData/Youtube/Audioon the host
Restart policy
The restart policy here is unless-stopped, so Docker restarts YouTubeDL-Material after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Networking
Nothing custom is set, so YouTubeDL-Material sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Container name
Once it's deployed, Portainer names the container youtubedl-material. That's what you'll spot in the containers list and use in commands like docker logs youtubedl-material.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Open source license
YouTubeDL-Material is open source, released under the MIT license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set YouTubeDL-Material up. Add the template list to Portainer once, then deploying YouTubeDL-Material is a click rather than a wall of config.