Skip to content

YouTubeDL Material in Container Manager on a Synology NAS

Important or Recent Updates
Historic UpdatesDate
Guide rewritten using Projects in Container Manager08/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 fixes04/12/2023
Historic updates

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.

Folder Setup

Let’s start by getting some folders set up for the container to use. Open up File Station create the following.

Folders
/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:

SectionSetting
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.
YAML
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.

VariableValue
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.

Published inDockerMedia Management 7.2Synology

24 Comments

  1. Marx Marx

    Seems to be an error with the location of .npm and permissions settings that needs fixing. Mapping .npm seems to help but still can’t load.

    • Dr_Frankenstein Dr_Frankenstein

      I would look at the TubeArchivist guide as this container has not received updates for just under a year. I will likely move this to Archive shortly

  2. Pothos Pothos

    Can I ask that you keep the DSM 7.1 versions of your guides visible on the site? Some older NAS are still very usable but not compatible with 7.2+ despite still being supported.

    • Dr_Frankenstein Dr_Frankenstein

      Hey, yeah they are in the Archives section currently in the menu on the left – I will make it a bit more obvious they are there

  3. Nick Nick

    Can you provide the firewall ports that must be opened for this to work correctly? It works with the firewall shut off, but I have thus far been unsuccessful in opening the correct ports with the firewall enabled.

  4. yu yu

    I tried setting the permissions for the ytdl folder to Everyone
    There’s no problem downloading now
    Can you help me answer this permission question? What is the Docker permission under Synology

    • Dr_Frankenstein Dr_Frankenstein

      Hey, so the key here is to make sure whatever user you are using to run the container for the UID / GID has the appropriate permissions for your folder.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

drfrankenstein.co.uk – writing Synology Docker Guides since 2016 – Join My Discord!