Many of my friends know that I run a private learning video portal on my Homelab - Network. I have saved video courses from past learning portal memberships and good Youtube tutorials for offline use on my NAS.
Over time, I have collected 8845 video courses with 282616 individual videos. The total running time is equivalent to about 2 years. Absolutely crazy!In this tutorial I show how to backup good Youtube tutorials with a Docker download service for offline purposes.
Option for professionals
As an experienced Synology user, you can of course log in with SSH and install the whole setup via Docker Compose file.
version: "2"
services:
youtube-dl:
image: modenaf360/youtube-dl-nas
container_name: youtube-dl
environment:
- MY_ID=admin
- MY_PW=admin
volumes:
- ./YouTube:/downfolder
ports:
- 8080:8080
restart: unless-stopped
Step 1
First I create a folder for the downloads. I go to the “Control Panel” -> “Shared Folder” and create a new folder “Downloads”.
Step 2: Find Docker image
I click on the “Registration” tab in the Synology Docker window and search for “youtube-dl-nas”. I select the Docker image “modenaf360/youtube-dl-nas” and then click on the tag “latest”.
After the image download, the image is available as an image. Docker distinguishes between 2 states, container “dynamic state” and image/image (fixed state). Before we now create a container from the image, a few settings must be made.
Step 3: Put the image into operation:
I double click on my youtube-dl-nas image.
After that I click on “Advanced settings” and activate the “Automatic restart”. I select the “Volume” tab and click on “Add Folder”. There I create a new database folder with this mount path “/downfolder”.
I assign fixed ports for the “Youtube Downloader” container. Without fixed ports it could be that the “Youtube Downloader” runs on another port after a restart.
Finally, I enter two environment variables. The variable “MY_ID” is my username and “MY_PW” is my password.
After these settings Downloader can be started! After that you can call Downloader using the Ip address of Synology disctation and assigned port, for example http://192.168.21.23:8070 .
For authentication, take the username and password from MY_ID and MY_PW.
Step 4: Let’s go
Now Youtube video urls and playlist urls can be entered into “URL” field and all videos will automatically end up in the download folder of Synology disk station.
Download folder: