Setting up a Docker Container on a Synology NAS

This guide will walk you through the process of setting up a Docker container on your Synology NAS.

Prerequisites

  • A Synology NAS with Docker support
  • Access to the Synology Web UI

Steps

  1. Install Container Manager

    • Log into the Synology Web UI
    • Install the Container Manager package
    • This will create a 'docker' folder visible in the File Station, located at /volume1/docker/ on the filesystem
  2. Enable SSH Service

    • In the Synology Web UI, navigate to Control Panel > Terminal & SNPM
    • Enable the SSH Service
  3. SSH into the Synology NAS

    • Open a terminal on your local machine
    • SSH into the Synology NAS using the appropriate credentials
  4. Elevate to the Root Account

    • Once connected via SSH, elevate to the root account using the command:

      sudo -i
      
  5. Set up and Run the Container

    • Follow the documentation of the container you want to set up and run
    • Ensure that you substitute folder paths to use the NAS's location of the docker folder on disk (/volume1/docker/)
  6. Turn off SSH (Optional)

    • If you don't plan to use SSH further, it's recommended to turn it off to keep your device secure

Example: Setting up iSponsorBlockTV

Here's an example of setting up the iSponsorBlockTV container from https://github.com/dmunozv04/iSponsorBlockTV/wiki/Installation:

  1. Initial Configuration

    docker run --rm -it -v /volume1/docker/iSponsorBlockTV/app:/app/data --net=host -e TERM=$TERM -e COLORTERM=$COLORTERM ghcr.io/dmunozv04/isponsorblocktv --setup
    
  2. Run the Container

    docker run -d --name iSponsorBlockTV --restart=unless-stopped -v /volume1/docker/iSponsorBlockTV/app:/app/data ghcr.io/dmunozv04/isponsorblocktv
    
  3. Manage the Container

    • Once the container is running, you can stop it using the 'Container Manager' in the Synology NAS Web UI.
    • Enable 'Auto-restart' to ensure the container is always kept running.

Alternative Method Alternatively, you can try setting up a container without using the terminal by following the steps in this video: