|New guide published||05/03/2022|
|Small amendment made to the environment variables to specify the use of a local database||10/05/2022|
|Updated with DSM7.1 Steps and Screenshots||23/06/2022|
|Changes to ‘latest’ image and update steps||09/07/2022|
|Added new port settings and Docker Bridge Network||23/07/2022|
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 offline or if you like to hoard entire channels!
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
In order for you to successfully use this guide please complete the two steps below first.
Downloading the Container
Open up Docker within DSM and navigate to the ‘Registry’ tab and search for ‘tzahi12345’ in the keyword box.
Within the results right click and download the top result ‘, When it asks which version number to download select ‘latest’ as this has the most recent updates for this container.
Setting up the container
Now we have downloaded the image and got hold of our user IDs we can move onto the next stage.
Go back into Docker and click on the ‘Image’ tab, in the list of your containers select the image, and click on ‘Launch’
The first screen will ask how you want to set up the Docker network, we are going to use the ‘bridge’ network allowing us to amend ports later.
Next you will be greeted with the General Settings screen, this is where you can start specifying some of your preferences.
You can change the name of the container to anything you like, and you may want to enable Auto Restart as this will ensure the container starts automatically if you reboot your NAS.
You will also notice a Configure capabilities button — don’t change anything in here!
Next up we are going to click on the ‘Advanced Settings’ button, this will take you to a new window with a number of tabs which we are going to work through.
Next we are going to set up a couple of environment variables that docker will use to allow the container access to our files and folders.
Click the Add button, and fill in the following details as per the table/screenshot, you will need to do one at a time.
|UID||The UID you obtained in the user setup guide|
|GID||The GID you obtained in the user setup guide|
You do not need to set up anything on these tabs.
Press ‘Save’ to go back to the initial setup screen, then press ‘Next’
On this screen we are going to specify port 8889 to access YouTubeDL, this is in line with the Environment Variable set earlier. You only need to set the Local Port don’t change the Container Port. When done click Next.
Where you store your downloaded videos can be changed based on your own preferences, I am basing this guide on the overall media setup and folder structure from our other guides.
Create a ‘youtube’ folder in /data/media and then add 4 subfolders
We can now move onto the volume tab in which we will be specifying the directories where YoutubeDL will store its configuration files and where the video downloads will be stored.
Click on Add Folder, click on the ‘docker’ share and create a new sub-folder called ‘youtubedl’ click on this folder and click ‘select’
We now need to repeat this process adding the folders below one at a time. Your path settings should look like the table/screenshot below.
Click Next to move to the final screen.
You have now completed the setup of the container.
You will be shown an overall summary of the settings we have specified, this is a good time to double-check everything is correct. Finally, click on Done and the container should start to boot.
You should now be able to access the web interface via the IP of your NAS followed by the port 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.
You can use the below code saved as youtubedl.yml in the ‘/docker/youtubedl’ share to do a much quicker setup than via the Synology UI. Not only that, but you will need to set up the folders as per the Volumes/Mounts section first. Ensure you change the variables to your own.
version: "3.8" services: youtubedl-material: image: tzahi12345/youtubedl-material:latest container_name: youtubedl-material environment: - UID=YOUR_UID - GID=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 network_mode: synobridge ports: - 9998:9998/tcp restart: unless-stopped
sudo docker-compose -f /volume1/docker/youtubedl/youtubedl.yml up -d
Throw me some bits or buy me a coffee?
If you have found my site useful please consider pinging me a tip as it helps cover the cost of running the site, you can even buy me a coffee 🙂