How to Update Docker Containers on a Synology NAS

  • Post author:
  • Post last modified:April 27, 2023
  • Post category:Synology
  • Reading time:7 mins read

Today we are going to look at two different ways on how to update Docker containers on a Synology NAS.

Last week, we looked at how to install Docker containers on a Synology NAS. I excluded this portion as I felt it deserved its own tutorial. I will preface this by saying there are various methods online on how you can update containers on a Synology NAS and that this is my preferred approach.

This approach gives me a full rollback plan if I experience any issues with the new version, which a lot of other “update” solutions do not provide.

I normally install the new container, let it run for a few days to ensure that everything works as expected, and then delete the old container.

If I run into any issues (I have run into issues with new versions of containers before), I delete the new container, rename my old container, and then I’m back to using the old container without any issues.

Before you get started with an update, always back up the docker folder on your Synology NAS.

How to Update Docker Containers on a Synology NAS

We will look at two different ways to update docker containers on a Synology NAS below.

Updating Docker Containers on a Synology NAS Using the Docker Application

1. I will be displaying how to do this using Nginx Proxy Manager since the version number is directly on the login page. My container is currently using v2.5.0.

update docker containers synology - nginx proxy manager login page

2. Open the registry, search for the container that you’d like to update, and double-click it to download the latest version. The latest version will overwrite your existing version. Make sure you give it a little while to finish the download.

How to Update Docker Containers on a Synology NAS - registry of containers

3. Stop the old container, Edit it, and rename the container. I normally leave it as-is and add -Backup to the name.

update docker containers synology - general settings of container

4. When the container is renamed, select the container, then select Settings, and then Duplicate Settings. Give the new container a name (I normally use the old name), select Apply and then the container will install! When you run the new container, you will be using the latest version!

update docker containers synology - duplicate settings of container

5. The container is now setup! If you run into any issues, delete the new container, rename the old one back (by removing -Backup) and you will be fully rolled back to the old version of the Docker container.

nginx proxy manager login page showing updated version

Updating Docker Containers on a Synology NAS Using Docker Compose

Updating a container using Docker Compose is slightly different than running Synology’s GUI. When we use Synology’s GUI and duplicate the settings, we are technically creating an entirely new container and keeping our old one as well.

Since Docker Compose uses our configuration file to create the container, it’s not easy to do that.

For that reason, it’s almost easier to update the container and fix it (update the Docker Compose file to use an old version) if there’s a problem, rather than preemptively plan for it.

This is only my personal opinion of course! If you’d prefer to take a backup of the container, rename the container’s folder on your Synology NAS, copy it to a new location, and then create the new container as shown in our last tutorial.

1. Get a list of running containers.

sudo docker container ls

2. Stop the container that you’d like to update by running the command below and substituting the correct container ID.

sudo docker stop [CONTAINER_ID]
stopping a docker container via terminal

3. Navigate to the folder where the Docker Compose file exists.

cd /volume[#]/docker/[CONTAINER_FOLDER]
navigating to a container folder via terminal

4. Run the commands below. The first command will pull the latest image and the second will install the package.

sudo docker-compose pull
sudo docker-compose up --force-recreate --build --detach

5. The container will now be updated and running!

Conclusion – How to Update Docker Containers on a Synology NAS

This tutorial showed how to update Docker containers on a Synology NAS. Like I said initially, this is only my preferred approach and doesn’t mean it’s the only way of doing it.

Thank you for checking out the tutorial on how to update Docker Containers on a Synology NAS. As always, if you have any questions on how to update Docker Containers on a Synology NAS, please leave them in the comments!

Please share if this helped you!


Frank is an IT professional with over 13 years experience and is the creator of WunderTech. He started his home lab in 2018 and is passionate about educating people on NAS, Docker, virtualization, firewalls, and self-hosted apps through his experiences as an avid home lab enthusiast. Frank holds a Bachelor's of Science degree in Computer Information Systems and a Master of Business Administration (MBA).

This Post Has 6 Comments

  1. btwdnewbie

    Thank you for your tutorial! Following the given steps I ran into problems updating the bitwarden-docker container. Because the respective port was assigned to the old (backed-up) container I need to “free” the port to assign it to the new one.

    1. WunderTech

      Did you stop the container before creating the new one? If you didn’t, that should solve the problem!

  2. Fulg

    Hi guys,

    On my side, to update a container using Synology docker GUI, I just first download the new container image as you did (Through the registry), then stop my container to update, then Actions > Clear. And finally just start the container / done ! this trick do not delete my config and data and upgrade “in place” my container

    Hope this helps

    1. WunderTech

      Thank you for sharing! This method unfortunately doesn’t work for me (it says the container won’t start), but I know that this works for other people. Either way, thanks for sharing!

  3. TK Ham

    I had the same issue as btwdnewbie. Container was stopped and still my ports had to be edited on the old container to allow my custom ports to be configured on the new one. Probably would have worked if I had them set to Auto.
    Thanks for the tutorial.

    1. WunderTech

      Glad you got it working. Thanks for the feedback! Hopefully it can help someone else.

Comments are closed.