Synology Install Watchtower with Portainer

Synology Install Watchtower with Portainer

My previous guide for Watchtower involved the use of Task Scheduler. Today I’m offering a recommended and excellent alternative for installing the latest Watchtower version via Portainer. Watchtower is a Docker application that monitors your running containers for changes to the image. When an update is available in the Docker registry, Watchtower detects the changes and pulls down the new copy of the image. It will then restart the container using the new image and the same start options of the original, without you losing any data. In this step by step guide I will show you how to install Watchtower on your Synology NAS using Docker & Portainer.⚠️Warning: Watchtower will do upgrades of your docker containers automatically. This means that, if a docker image has a bug, it might destroy some containers you already have installed. For this reason, it is vital that you make Backups of your Docker folders using Hyper Backup.

💡Note: This guide works perfectly with the latest Watchtower v1.7.1 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 4

In the Name field type in watchtower. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
  watchtower:
    image: containrrr/watchtower:latest
    container_name: WATCHTOWER
    hostname: watchtower
    mem_limit: 512m
    mem_reservation: 128m
    cpu_shares: 512
    security_opt:
      - no-new-privileges=true
    read_only: true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      TZ: Europe/Bucharest
      WATCHTOWER_CLEANUP: true # Remove old images after updating
      WATCHTOWER_REMOVE_VOLUMES: false # Remove attached volumes after updating
      DOCKER_API_VERSION: 1.41 # SSH docker version 1.41 for Docker engine version 20.10 - 1.43 for Docker engine version 24 - 1.45 for Docker engine version 26.1
      WATCHTOWER_INCLUDE_RESTARTING: true # Restart containers after update
      WATCHTOWER_INCLUDE_STOPPED: false # Update stopped containers
      WATCHTOWER_SCHEDULE: "0 0 */2 * * *" # Update & Scan containers every 2 hours
      WATCHTOWER_LABEL_ENABLE: false
      WATCHTOWER_ROLLING_RESTART: true
      WATCHTOWER_TIMEOUT: 30s
      WATCHTOWER_LOG_FORMAT: pretty
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value for TZ (Select your current Time Zone from this list).
Note: Before you paste the code above in the Web editor area below, change the value for DOCKER_API_VERSION. 1.41 is for Docker engine 20.10 – 1.43 is for Docker engine 24 – 1.45 for Docker engine 26.1. Check the exact version on the official Docker engine API website or check the following screenshot to find it in Portainer.
Note: If you want, you can change some parameters in the code above such as the frequency with which your containers get scanned and updated.

Watchtower Synology NAS Portainer Set up 1 new 2025

  • STEP 5

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Watchtower Synology NAS Portainer Set up 2 new 2025

  • STEP 6

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

Watchtower Synology NAS Portainer Set up 3

Enjoy Watchtower!

💡Note: Watchtower does not have a graphical interface. To see which container was updated, you can check the logs for the Watchtower container. On the Portainer left sidebar, click Containers, then click the little log icon on the WATCHTOWER container.

NAS Check Watchtower logs 1

After you click on the little log icon, you can see which container has been updated.

NAS Check Watchtower logs 2

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the Watchtower container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Saturday / November 23rd, 2024 at 11:41 AM