watchtower icon indicating copy to clipboard operation
watchtower copied to clipboard

Reg. Synology Support

Open simskij opened this issue 4 years ago • 14 comments

None of us, the maintainers of this project, currently have access to any Synology devices. We've tried using the demo Synology provides, but it's just not cutting it.

If anyone in the community, or the companies using Watchtower in their stack, would like to contribute a Synology device - Please let us know! This would definitely make troubleshooting and helping you out more reasonable for us. Until then, the support for Synology will stay on a best effort-basis.

simskij avatar Apr 23 '21 07:04 simskij

And just to clarify why Synology devices are singled out; they run their own version of the Docker daemon and it doesn't always behave as expected, giving incorrect or partial information of containers. This makes it hard for watchtower to function correctly on them and we have yet to find a reason for why this is happening.

piksel avatar Apr 23 '21 08:04 piksel

You could also run DSM in a virtualbox using xpenology.com!

juliansteenbakker avatar May 03 '21 06:05 juliansteenbakker

Yeah, I couldn't get xpenology working last time I tried it. It also doesn't seem strictly... legal?

piksel avatar May 03 '21 15:05 piksel

It's a grey area.. from the FAQ:

Disk Station Manager (DSM) is based on Open Source code and XPE/DSM takes advantage of Open Source sharing and use. You should always use your own jugement and read before installing and using DSM with XPEnology. We cannot be held responsible for your actions.

I think if you don't use any of the services that need a license you'd be fine since it's open source. The Synology source can be found here.

juliansteenbakker avatar May 03 '21 15:05 juliansteenbakker

@simskij @piksel I actually own a DS218+ (it's where I run my watchtower instance), so if there's any specific troubleshooting to do I'd be happy to do it

tammert avatar Sep 04 '21 13:09 tammert

Running on Synology worked fine when starting manually through SSH (as there is no way to bind the docker socket from the UI):

sudo docker run --name="watchtower" -d --restart=always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower

After starting manually through SSH, it does show up in the Synology Docker UI.

Sadly, because labels cannot be set from the Synology UI, there is some functionality that I cannot use (like tagging containers to exclude), but alas.

For some reason, each restart done by Watchtower causes a "Docker container stopped unexpectedly. Go to Docker for more information" notification in Synology, but I don't mind that very much.

Screenshot 2021-11-18 at 13 48 27

Edit: #968 happens for me for one container (Home Assistant) but not for others. I do not know why.

Edit 2: I stopped using Synology and migrated to a new device running OpenMediaVault. No issues anymore since.

TheLastProject avatar Nov 18 '21 12:11 TheLastProject

So is this the way to start the watchtower on Synology?

Running on Synology worked fine when starting manually through SSH (as there is no way to bind the docker socket from the UI):

sudo docker run --name="watchtower" -d --restart=always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower

After starting manually through SSH, it does show up in the Synology Docker UI.

Sadly, because labels cannot be set from the Synology UI, there is some functionality that I cannot use (like tagging containers to exclude), but alas.

For some reason, each restart done by Watchtower causes a "Docker container stopped unexpectedly. Go to Docker for more information" notification in Synology, but I don't mind that very much.

Screenshot 2021-11-18 at 13 48 27

Edit: #968 happens for me for one container (Home Assistant) but not for others. I do not know why.

halteach avatar Jan 27 '22 13:01 halteach

@halteach Yes, this would be one way. Another way would be to use docker-compose, but this still requires a terminal via SSH. I use the following docker-compose.yml

version: "3.8"
services:
  watchtower:
    image: containrrr/watchtower:latest
    container_name: watchtower
    environment:
      - TZ=Europe/Berlin
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_INCLUDE_STOPPED=true
      - WATCHTOWER_REVIVE_STOPPED=false
      - WATCHTOWER_SCHEDULE=0 0 2 * * *
      - WATCHTOWER_MONITOR_ONLY=false
      - WATCHTOWER_DEBUG=true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: unless-stopped

This file should be saved into an own folder (e.g. watchtower) within your docker directory (e.g. /volume1/docker). Then go to your new directoy within your terminal session and use the following commands:

# create and start container
docker-compose up -d
# stop and remove container
docker-compose down

lazou avatar Mar 09 '22 18:03 lazou

I get the error too every time watchtower runs Screen Shot 2022-03-27 at 8 33 03 PM

newadventure079 avatar Mar 28 '22 02:03 newadventure079

@newadventure079 have you checked what the "more information" says? We have nothing to go on here.

piksel avatar Mar 28 '22 11:03 piksel

I think this is due to the fact that the synology docker implementation is not familiar with managing the docker containers from the outside. I had the same experience for containers which were created with docker compose via terminal.

lazou avatar Mar 28 '22 11:03 lazou

@piksel Here is all the info it gives in the log Screen Shot 2022-03-28 at 12 10 20 PM

FYI - This didn't used to happen, and it started happening a couple weeks ago or so. I dont think there's been a watchtower update recently so I think it must be from one of the Synology updates. I'm on DSM 7 btw.

newadventure079 avatar Mar 28 '22 18:03 newadventure079

Hello, I'm using a DS920+ with watchtower to update my containers. I also use Portainer to create and deply my stacks.

If I can be some help, just ask 😃

MilesTEG1 avatar Jul 31 '22 21:07 MilesTEG1

Yes, this is a new problem that appeared recently. Maybe because of a watchtower change and/or a Synology Docker update.

mtoensing avatar Aug 26 '22 08:08 mtoensing

I would like to install Watchtower on my Synology to update Home Assistant automatically. Can everyone helps me how to set it up?

feron81 avatar Oct 31 '22 16:10 feron81

whats your prblem? You can easily install the container via: Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script als root:

docker run -d --name=watchtower
-v /var/run/docker.sock:/var/run/docker.sock
-v /etc/localtime:/etc/localtime:ro
-e TZ=Europe/Berlin
-e WATCHTOWER_INCLUDE_STOPPED=true
-e WATCHTOWER_SCHEDULE="0 0 4 * * *"
--restart always
containrrr/watchtower:latest --cleanup

CamelT0E avatar Nov 15 '22 21:11 CamelT0E

I also successfully use watchtower on Synology, and there's currently one major caveat - there are some containers that Synology DSM itself creates, and those obviously fail to update:

2023-02-16 07:54:32 (info): Unable to update container /synology_docviewer_2, err='Error response from daemon: manifest for synology/docviewer:1.3.0.0125 not found: manifest unknown: manifest unknown'. Proceeding to next. 2023-02-16 07:54:34 (info): Unable to update container /synology_docviewer_1, err='Error response from daemon: manifest for synology/docviewer:1.3.0.0125 not found: manifest unknown: manifest unknown'. Proceeding to next.

Since they create it, and docker gives no way to update labels after container creation to exclude them the normal way, this means I get error messages for those every time - I'll file a separate request for having another way to exclude those.

rdamazio avatar Feb 16 '23 17:02 rdamazio

I am running Watchtower on my Synology without issue. I got around the issue @halteach was having with the /var/run/docker.sock by deploying/configuring it via Portainer.

The only thing I notice is that I occasionally get the same <container> stopped unexpectedly message. I can live with it

My-Random-Thoughts avatar Jul 06 '23 19:07 My-Random-Thoughts