Important or Recent Updates
Historic Updates | Date |
---|---|
Guide rewritten using Projects in Container Manager | 08/07/2023 |
Added additional security option to the compose to restrict the container from gaining new privileges. | 21/10/2023 |
Moved to nightly image to receive important bug fixes | 04/12/2023 |
I am no longer updating this guide as this container seems to have been abandoned – Use the TubeArchivist guide as it provides the same functionality and has much more active development.
What is YouTubeDL Material?
YouTubeDL Material is nice web front end for YoutubeDL, This is a tool that is used to download video from YouTube and many other sites. This is useful for if you want copies of videos to watch locally – You can also subscribe to channels.
Let’s Begin
In this guide I am going to take you through the steps to get YoutubeDL Material up and running in Docker on your Synology NAS. We will be using the new Projects (Docker Compose) feature to get this running as it will save you time vs manual setup using the normal UI.
In order for you to successfully use this guide please complete the steps below first.
- Docker Package, SSD and Memory Recommendations
- Step 1: Directory Setup Guide
- Step 2: Setting up a restricted Docker user
- Step 3: Setting up a Docker Bridge Network
Folder Setup
Let’s start by getting some folders set up for the container to use. Open up File Station create the following.
/docker/projects/youtubedl-compose
/docker/youtubedl
/data/media/youtube
/data/media/youtube/audio
/data/media/youtube/subscriptions
/data/media/youtube/users
/data/media/youtube/video
Container Manager
Next we are going to set up a ‘Project’ in Container Manager. Open up Container Manager and click on Project then on the right-hand side click ‘Create’.
In the next screen we will set up our General Settings, enter the following:
Section | Setting |
---|---|
Project Name: | youtubedl |
Path: | /docker/projects/youtubedl-compose |
Source: | Create docker-compose.yml |
Next we are going to drop in our docker compose configuration, copy all the code in the box below and paste it into line ‘1’ just like the screenshot.
What on earth is a Docker Compose? Docker Compose allows us to define how Docker should set up one or more containers within a single configuration file. This file is yaml formatted and Container Manager uses the Projects feature to manage them.
services:
youtubedl-material:
image: tzahi12345/youtubedl-material:nightly
container_name: youtubedl-material
environment:
- UID=1234 #CHANGE_TO_YOUR_UID
- GID=65432 #CHANGE_TO_YOUR_GID
- USER=youtube
- ytdl_default_downloader=yt-dlp
- ytdl_use_local_db=true
- ytdl_port=9998
- write_ytdl_config=true
volumes:
- /volume1/data/media/youtube/users:/app/users:rw
- /volume1/data/media/youtube/subscriptions:/app/subscriptions:rw
- /volume1/data/media/youtube/audio:/app/audio:rw
- /volume1/data/media/youtube/video:/app/video:rw
- /volume1/docker/youtubedl:/app/appdata:rw
ports:
- 9998:9998/tcp
network_mode: synobridge
security_opt:
- no-new-privileges:true
restart: always
Environment Variables
We are now going to amend some key variables to make sure the container has access to our folders and also knows where we are in the world. Any I don’t mention leave as they are.
Variable | Value |
---|---|
UID | (required) The UID you obtained in the user setup guide |
GID | (required) The GID you obtained in the user setup guide |
Once you have made the edits you can click ‘Next’
You do not need to enable anything on the ‘Web portal settings’ screen click ‘Next’ again.
On the final screen click ‘Done’ which will begin the download of the container images and once downloaded they will be launched!
The images will now be downloaded and extracted. You should see ‘Code 0’ when it has finished.
Firewall Exceptions
(Skip if you don’t have the Firewall configured)
If you have the Synology Firewall enabled please see this additional guide for further info on exceptions and correct set up.
Container set up finished
You should now be able to access the web interface via the IP of your NAS followed by the port 9998
e.g. 192.168.0.40:9998
You can use the main screen to download individual videos by pasting the URL and selecting the quality, or if you want to add subscriptions to specific channels use the menu on the left.
I recommend going into the advanced settings and amending the downloader to ‘yt-dlp’ if you have any issues pulling videos.
Looking for some help, join our Discord community
If you are struggling with any steps in the guides or looking to branch out into other containers join our Discord community!
Buy me a beverage!
If you have found my site useful please consider pinging me a tip as it helps cover the cost of running things or just lets me stay hydrated. Plus 10% goes to the devs of the apps I do guides for every year.
Just add the following mapping and it will prompt a download error. I have checked the path and there is no problem
volumes:
– /volume1/ytdl/youtube/users:/app/users:rw
– /volume1/ytdl/youtube/subscriptions:/app/subscriptions:rw
– /volume1/ytdl/youtube/audio:/app/audio:rw
– /volume1/ytdl/youtube/video:/app/video:rw
– /volume1/docker/youtubedl:/app/appdata:rw
Starting the container with the default unmapped folder to download videos is not a problem
Any ideas why the container keeps going from green to grey and not letting me fully start it up? All instructions followed.
Followed the instructions to a T but the container keeps going from green to grey and won’t stay turned on. Cannot connect via IP address.
I am just about to change the image to the nightly version as there is a new bug in ‘latest’ that has not received the fix yet.
See the yaml in the guide in about 10 mins you will see the image line has changed, just update your yaml in line.
Thank you so much!
switching to nightly worked for me for a while but now im getting a differnt error ” skipping player responce from web client”. i suspect a new bug is present and i may just have to wait for them to fix it. but if you have any other sugestions let me know
This sounds like another bug, I am looking at doing a guide for https://github.com/tubearchivist/tubearchivist. Its more of a YouTube Archiver rather than individual files, also looking for another tool to replace YouTubeDL Material for individual video grabbing as this one has had a bit of a rough time dev wise.
Just read the documentation and TubeArchivist can download single videos as well! – Watch this space as a new guide will come along shortly and this one will likely hit the archive..
thank you!
I’m getting npm ERR! code EACCES error now. It used to work. Have you encountered this?
See the comment above/below it’s currently logged as a bug.
Apologies confused a comment here vs Discord.. It should be fixed shortly as a merge to fix the issue was just accepted
https://github.com/Tzahi12345/YoutubeDL-Material/pull/1035
I had this NPM error in my docker and rebuilt it before I saw this message on this forum, if I have still my previous videos, how do I get youtube-dl rebuild whatever existing I had in my folder structure in data/video folder?
That is a good question, but you would need to ask the Dev to see if that is possible I am afraid.
Please consider rewriting the “Folder Setup” section as it is easy to miss the steps, especially if one is used to most of the other guides and hasn’t finished their first cup of coffee. Something like:
Folder Setup
Our first task is to set up some folders for YoutubeDL Material to store its configuration files.
Open up Filestation and go to the /docker share. Create a folder called ‘youtubedl’.
Then, within the projects folder we created in the preceding guide create another folder called ‘youtubedl’.
… and continue the guide from there.
And then maybe change the picture to show the three folder elements separately: /volume1/docker/youtubedl, /volume1/docker/projects/youtubedl, and the tree under /volume1/data/media/youtube. The current picture makes it seem like their are only two changes as their are only two boxes. Maybe use arrows?
Great stuff as usual!
Thanks for the feedback – I have made the amendments, I also tweaked the folders to line up with how I am doing the projects folder to help differentiate them.