Now that we can update our LXC containers easilt in our Proxmox Homelab, we need to turn our focus to our Docker containers. As part of our Build your own homelab series, we have installed quite a few Docker containers in two separate instances – our main Docker LXC container and a separate Docker LXC container just for Immich. We also have Portainer installed for easy management of both Docker instances in one central place. And this is exactly what we are going to utilise to make our updates easier. That, and the help of Watchtower: a tool to automatically check (and update) our running Docker Containers.
Create a new once-off Watchtower instance
To use Watchtower to check for updates to Docker containers, and also update them, there is a lot of functionalities that Watchtower can provide. Before we continue, however, something to remember:
This is according to the creators of Watchtower themselves and should be heeded. But for our homelab, it is perfect. We are going to create an instance that will only update our docker containers when we say so. Although Watchtower can run on a schedule, checking and updating containers every so often, personally we feel it is better to be in control as to when it runs. For this reason, we are going to create it to run once, then stop. Should we ever want to check for updates again, we can just start the container again.
To start the process, access your Portainer WebUI and log in.
Optional: Download the image
As an optional step, you can download the image for Watchtower first, before creating a container instance of it. To do this, first select the instance you want to update the containers for. Then click on images. In the top section of the page will be a grouping called Pull Image. In the Image field, type
containrrr/watchtower
and select Pull the image. This will download the image, ready to be used.
Create the container to update containers
Now we can create a Watchtower container that will update all our other running containers. For this to work, the Watchtower container needs access to our main Docker Instance API Socket. This is why it is not recommended to run Watchtower in a production environment. For today, we will create a new container that will only run once and then exits. If you are not in Portainer yet, access your Portainer web interface, log in and select the Docker instance where you want to update your containers.
From the dashboard, or from the left navigation pane, select containers. Click on the
button in the main window. From the top of the window that opens:
Fill in the Name field by giving this container a name, like Watchtower_RunOnce.
In the Image field, type containrrr/watchtower again.
Scroll all the way down, past the Deploy the container button (do not click it yet!). In the Advanced container settings section, go to the Commands & Logging tab. In the Command field, change from Default to Override and then add the value
--run-once
Next go to the Volumes tab and click
. In the container field, add the value
/var/run/docker.sock
Change from Volume to Bind in the button after the container field. The field below will change to host. Add the value
/var/run/docker.sock
to the host field as well. Make sure to keep the access as Writable, otherwise Watchtower might not work as intended.
That’s it, now we can go up again and click the
button. The container will deploy AND start up immediately after. Once started, it will check for container images that can be updated and update them. In our case, Portainer itself was updated, so we were logged out.
Clean up images
Once the update completes, it is a good idea to check unused images as they are taking up disk space and not being used. In our case, Portainer was updated, so the old Portainer image is still on disk, but the newer one is being used. Portainer once again makes this easy for us. In the left navigation pane, go to Images again. Any unused images will have a tag
. These can be safely deleted.

Select unused images by clicking in the checkbox to their left, then click the Remove button
Conclusion
We now have another container in our Docker instance. This one, however, will not be running. Whenever we want to update all our containers, we can just start up this one container and all our containers will be updated to the latest. In a future instalment, we will use Watchtower again to periodically check for updates, but not install them. For now, remember to check for updates to your running containers periodically as it is always a good idea to keep your services up to date with the latest versions.













