← Tutte le guide
Watchtower
A free, open-source tool that watches your running Docker containers and automatically pulls + restarts them when a new image version is published -- keeps self-hosted apps patched without manual `docker pull` runs.
Questa guida è redatta a partire dalla documentazione ufficiale di Watchtower, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
1Run Watchtower
docker run -d \ --name watchtower \ --restart unless-stopped \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtowerWith no extra flags, Watchtower checks every running container every 24 hours and updates all of them -- see the next step to scope this down.
2Limit it to specific containers (recommended)
Pass container names as arguments so only those get auto-updated -- safer than blanket-updating everything, especially anything with a database that needs a manual migration step on major version bumps.
docker run -d \ --name watchtower \ --restart unless-stopped \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower \ uptime-kuma portainer3Set a custom check interval
In seconds -- 3600 checks hourly instead of the 24-hour default.
docker run -d ... containrrr/watchtower --interval 3600