12 Synology DSM Installation Guide
niXta1 edited this page 2019-06-07 15:16:47 +02:00

UPDATE 2019-06-07: Synology has updated Docker (quite some time ago) and if you use the latest version, you don't need to follow this guide. Just use the CLI (via ssh for example) to start watchtower and you are good to go.

WARNING: These instructions will lead to a watchtower install that nukes all your Environment settings. This will break PlexMediaServer and many other apps. Use at your own risk. [Tested on DSM 1517+ on 2017-09-03]

The Docker version installed on Synology DSM 6/6.1 is older than the one supported by Watchtower.

Steps:

  1. Create a shared folder called docker.

  2. We need to Symlink /var/run/docker.sock to /volume1/docker/docker.sock because Synology Docker GUI will not be able to run it when it's pointed directly to /var/run/docker.sock. Also, the symlink needs to persist after reboot. To make it do so, you will need to create an automated task in your Synology DSM via "Task Scheduler".

    1. Go to "Control Panel" > "Task Scheduler".
    2. Click "Create" > "Scheduled Task" > "User-defined Script".
    3. On the "Create Task: Window, make sure "User:" is selected as "root" and rename the "Task:" to whatever you like.
    4. Click "Schedule" tab. Under "Date - Run on the following days", select "Daily". Under "Time - Frequency", select "Every 1 hour(s)" (just to be on the safe side).
    5. Click "Task Settings" tab. Under "Run command - User-defined script", paste sudo ln -s /var/run/docker.sock /volume1/docker/docker.sock into the text box and press "OK".
    6. The newly created task will be listed there. Click to highlight it and then click "Run" to run it once, immediately.
  3. Next, we need to download/pull and install the docker container. We can do all this with a single "docker run" command via shell.

    1. First, SSH into Synology.
    2. Then, run the following docker run command as sudo: sudo docker run -d --name watchtower -v /volume1/docker/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 82800 --cleanup
  4. You will now be able to run Watchtower via the Synology Docker GUI. You may also set it to restart automatically within the container settings.

Note: You can do step 3 without using the shell (i.e. SSH) by scheduling a task like in Step 1 and deleting it after running it once. Feel free to try out any changes you like.