Watchtower Not Updating Containers? Fix Docker Auto-Updates That Seem Stuck
When the container list gets long, manual updates start slipping
Picture a VPS running a dozen containers: a reverse proxy, a monitoring dashboard, a notes app, a media server, and several small utilities. Each service ships on its own rhythm. Some push security patches every week, others sit quiet for months and then jump two major versions at once.
The manual routine for that setup looks like this: you check each image, pull the new version, stop the old container, and restart it with the same configuration. None of that is hard, but all of it is easy to postpone. One busy week is enough for a security patch to sit untouched.
Watchtower takes over the repetitive part. It runs as a container of its own, checks registries on a schedule, and swaps any container whose image has changed for the new version while keeping the original container options. You stay in charge of which containers it may touch, when the checks happen, and what to do when an update goes wrong.
This guide uses Docker Compose, since most self-hosted stacks already live in that format. Every command below traces back to Watchtower's official documentation, and the closing section covers the way back when a fresh release turns out to be broken.
A short list of prerequisites
You need a machine already running Docker and Docker Compose, plus shell access with permission to run Docker commands. You should also know which compose file manages the services you plan to automate, because Watchtower replaces running containers rather than editing your compose files.
One warning belongs up front: Watchtower works through the Docker socket, and that access amounts to full control over Docker on the host. Run it only on machines you manage yourself, and never expose the Docker socket to the network.
Step 1: Install Watchtower in monitor-only mode first
The safest start changes nothing. In monitor-only mode, Watchtower reports new images without restarting anything. You can watch its behavior for a few days, then switch on real updates once the pattern looks right.
Create a working directory, for example ~/watchtower, and place a docker-compose.yml file inside it:
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- TZ=Asia/Jakarta
- WATCHTOWER_CLEANUP=false
- WATCHTOWER_MONITOR_ONLY=true
- WATCHTOWER_POLL_INTERVAL=86400Launch it from that directory:
docker compose up -d
docker psThe expected result: a container named watchtower shows up as Up, and no other container restarts in the process.
Check its first logs:
docker logs --tail 100 watchtowerHealthy first logs mention the Watchtower version and the time of the next check. If the logs show a socket connection error, stop here and work through the troubleshooting section at the end before moving on.
WATCHTOWER_POLL_INTERVAL=86400 means one check every 86,400 seconds, which is once a day. The official documentation lists 86,400 as the default. A shorter interval such as 3600 for hourly checks is perfectly valid, but a daily check suits most self-hosted services and keeps registry traffic low.
Step 2: Narrow the scope with the enable label
Left to its defaults, Watchtower watches every running container. On a server with sensitive services, that default reaches too far. Switch to opt-in mode, so only containers you explicitly label get touched.
Update the environment block in the same docker-compose.yml:
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- TZ=Asia/Jakarta
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_MONITOR_ONLY=true
- WATCHTOWER_POLL_INTERVAL=86400Then add the label to a service that is safe to update automatically. A dashboard service, for instance:
services:
dashboard:
image: lscr.io/linuxserver/heimdall:latest
container_name: dashboard
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"Apply the changes in both compose files:
docker compose -f ~/watchtower/docker-compose.yml up -d
docker compose -f /path/to/your-service-compose/docker-compose.yml up -dReplace the second path with the real location of your service's compose file. Run docker logs --tail 100 watchtower once more and confirm there are no label errors.
This gives you two layers of control: Watchtower ignores unlabeled containers, and you can add labels gradually, one service at a time, while observing the result of each update.
Step 3: Pick a schedule that lands in quiet hours
A daily interval works well as a start, but you may prefer checks at a specific hour, such as the early morning when traffic is low. Watchtower supports a six-field cron expression, where the first field holds seconds. The following example checks every day at 04:00:
environment:
- TZ=Asia/Jakarta
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_MONITOR_ONLY=true
- WATCHTOWER_SCHEDULE=0 0 4 * * *One rule matters here: interval and schedule cannot be used together. The official documentation states you must pick one. If your compose file still contains WATCHTOWER_POLL_INTERVAL, remove that line before adding WATCHTOWER_SCHEDULE.
The TZ=Asia/Jakarta variable sets the timezone used by logs and schedules. Without it, Watchtower defaults to UTC, so 04:00 in the configuration means 11:00 WIB. That small slip is a classic way for updates to land in the middle of a busy period when the intent was the small hours.
After changing the schedule, relaunch and check the logs:
docker compose -f ~/watchtower/docker-compose.yml up -d
docker logs --tail 50 watchtowerThe logs show the next scheduled check. Compare that time with the hour you intended before moving on to notifications.
Step 4: Turn on notifications so updates never happen in silence
An automated update that nobody sees is only half a system. Watchtower reports through Shoutrrr, a library that lets one environment variable point to Discord, Slack, Telegram, email, and many other services. The general pattern looks like this:
environment:
- WATCHTOWER_NOTIFICATION_URL=discord://token@channel
- WATCHTOWER_NOTIFICATIONS_LEVEL=infoReplace the placeholder with your own channel and token. Two common patterns:
discord://token@channel
slack://watchtower@token-a/token-b/token-cFor Telegram, the official documentation gives the following shape, where token is the bot token and the parameter is the chat or user ID:
telegram://token@telegram?channels=chat-idTake one warning seriously: notification URLs contain tokens. Never commit a real token to a public repository, and treat a compose file holding one like a credential file rather than a shareable example.
Also set WATCHTOWER_NOTIFICATIONS_LEVEL to control verbosity. Start with info so you can see every run while the system is new, then switch to warn if the message stream becomes noisy.
Restart Watchtower with the new variable and confirm a notification arrives for the next run. If nothing arrives, check the token, the channel ID, and that the variable sits in the Watchtower service block, not in another container's block.
Step 5: Exclude containers that must never update on their own
Enable labels already exclude unlabeled services, but there are containers that deserve an explicit ban. A production database, a legacy app that relies on a pinned image, or any service where a surprise upgrade could break data handling belongs on the exclusion list:
environment:
- WATCHTOWER_DISABLE_CONTAINERS=main-database,legacy-appThe official documentation states that containers in the exclusion list remain excluded even if they carry the enable label. That rule makes the exclusion list a genuine safety net rather than a suggestion: you can label a service for future automation and still keep it frozen while you verify the new version.
A practical division looks like this: label stateless services such as dashboards, note apps, and media front ends, where a failed update is easy to roll back. Leave databases and core services unlabeled or explicitly excluded until you have a tested upgrade path for each one.
Step 6: Switch on real updates once the trial period ends
Once you trust the labels, the schedule, and the notifications, flip the switch. Change the monitor-only variable to false and add a rolling restart, a generous timeout, and your notification URL:
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- TZ=Asia/Jakarta
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_MONITOR_ONLY=false
- WATCHTOWER_ROLLING_RESTART=true
- WATCHTOWER_TIMEOUT=30s
- WATCHTOWER_NOTIFICATION_URL=discord://token@channel
- WATCHTOWER_SCHEDULE=0 0 4 * * *Restart Watchtower and follow the logs:
docker compose -f ~/watchtower/docker-compose.yml up -d
docker logs -f watchtowerPress Ctrl+C to leave the log stream. That keystroke stops following the logs, not the container, so Watchtower keeps running in the background.
During a run with real updates, the log sequence tells the story: a new image is found, the old container stops, a new container is created with the same options, and the session ends. Watch for that sequence on the first night, and read the notification that arrives with it.
Step 7: Prepare the rollback path before you actually need it
Watchtower has no automatic rollback button. If a new image breaks a service, you restore the previous version yourself. The cleanest way to keep that option open is to keep old images during the trial period, which is exactly what WATCHTOWER_CLEANUP=false does. Once a service has updated cleanly a few times, you can turn cleanup back on.
The rollback steps are straightforward:
- Check the running containers and the available images with
docker psanddocker images. - Change the image tag in the service's compose file to the last good version, for example
someapp:2.4.1. - Relaunch that service:
docker compose -f /path/to/your-service-compose/docker-compose.yml up -d service-name - Remove the enable label from the service, or add it to WATCHTOWER_DISABLE_CONTAINERS, so Watchtower does not immediately re-apply the broken version.
- Verify the service endpoint responds, then check its logs with
docker logs --tail 100 service-name.
One more detail about tags: the latest tag always points to the newest release, so there is no such thing as going back to an old latest. If you expect to roll back often, pin explicit tags in your compose files. A frozen tag such as postgres:15.2 will not jump to postgres:16, and Watchtower compares digests for the same tag, so it still notices a rebuilt image under that tag.
For services that need preparation before an update or cleanup after one, Watchtower supports lifecycle hooks. Set WATCHTOWER_LIFECYCLE_HOOKS=true and add a label such as com.centurylinklabs.watchtower.lifecycle.pre-update with the command to run. Hook commands run with sh inside the container, and the default timeout is 60 seconds. Use hooks sparingly, only for services where a pre-update step is genuinely required.
The log and status commands worth memorizing
Most Watchtower troubleshooting comes down to a handful of commands. Keep them close, and check them in this order when something looks off.
| Command | What to check |
|---|---|
docker ps | Is the Watchtower container running, and did any service restart unexpectedly? |
docker logs --tail 100 watchtower | Did the last check run, and did it find or apply any updates? |
docker logs -f watchtower | What happens live during a scheduled run? |
docker images | Which image versions are present for a rollback? |
docker logs --tail 100 service-name | Did the updated service itself start cleanly after the swap? |
Make a habit of reading the Watchtower logs the morning after a scheduled update. A one-minute glance catches a failed update before it becomes a support ticket.
Watchtower not updating your containers? Check these first
Note, November 2026: the Watchtower project (containrrr/watchtower) is no longer maintained — its GitHub repository is archived and its README states "This project is no longer maintained". The diagnostic steps below still apply to an existing Watchtower install, but if you are setting it up for the first time today, consider a maintained alternative before following this guide.
One morning you open the dashboard and find the app still running the old version, even though a new release was announced yesterday. Watchtower sent no notification, and its logs show no obvious error. Before concluding Watchtower is broken, work through the checks below in order — most cases stop at the first two.
1. Make sure a check cycle has actually happened. Watchtower doesn't poll every minute: the default interval is 24 hours, and with a cron schedule checks only happen at the hour in that six-field expression. Open the logs and find the next scheduled check:
docker logs --tail 100 watchtower
If the next check is hours away, nothing is broken — you simply arrived before its turn. Impatient? Skip to step 8.
2. Check whether monitor-only mode is still on. The most common cause — and the easiest to overlook. While WATCHTOWER_MONITOR_ONLY=true is set, Watchtower deliberately replaces nothing; it only observes and sends notifications. The same can be set per container with the label com.centurylinklabs.watchtower.monitor-only=true. Open Watchtower's docker-compose.yml, set it to false or remove the line, then relaunch:
docker compose -f ~/watchtower/docker-compose.yml up -d
3. Check the enable label on the target container. With WATCHTOWER_LABEL_ENABLE=true, Watchtower only touches containers carrying the label com.centurylinklabs.watchtower.enable=true. A container without the label is skipped silently, with no error. Inspect the labels on the container:
docker inspect container-name | grep -i watchtower
If no label line appears, add the label to that service's compose file and relaunch just that service.
4. Check the exclusion list. A name listed in WATCHTOWER_DISABLE_CONTAINERS stays excluded even if the container carries the enable label — one leftover name leaves a service untouched forever.
5. Check the image tag. Watchtower compares digests for the same tag, so a container pinned to a specific version such as postgres:15.2 will not jump to postgres:16 on its own — that tag genuinely has not changed. To follow major releases, change the tag deliberately — don't hope Watchtower guesses your intent.
6. Check whether the container is stopped. By default Watchtower only watches running containers; exited or created ones are skipped. To include stopped containers, enable WATCHTOWER_INCLUDE_STOPPED=true. To start an updated stopped container again, add WATCHTOWER_REVIVE_STOPPED=true — it only works when the first is also active.
7. Check whether no-pull is on. While WATCHTOWER_NO_PULL=true is set, Watchtower never pulls a new image from the registry; it only looks at the local image cache. Sensible when you build images on the host yourself, but registry updates then never arrive.
8. Force a single cycle to be sure. If the seven checks above found nothing, run one update attempt directly:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once container-name
This runs one update attempt for the named container, then exits. It also turns on debug logging, so you can see exactly what was checked and decided. If the container updates here, your registry and images are fine — the daemon's configuration is the problem. If the regular logs are too quiet, enable verbose logging with WATCHTOWER_DEBUG=true.
| Cause | What to check | Fix |
|---|---|---|
| Check cycle hasn't run yet | docker logs --tail 100 watchtower — next scheduled check | Wait, or force one cycle with --run-once |
| Monitor-only mode is on | WATCHTOWER_MONITOR_ONLY, or the monitor-only label | Set it to false or remove the line, then relaunch Watchtower |
| Enable label missing | docker inspect container-name | grep -i watchtower | Add the com.centurylinklabs.watchtower.enable=true label |
| Name on the exclusion list | WATCHTOWER_DISABLE_CONTAINERS | Remove the container name from the list |
| Pinned image tag | Tag in the service's compose file | Change the tag deliberately to follow new releases |
| Container is stopped | Container status in docker ps -a | Enable WATCHTOWER_INCLUDE_STOPPED=true (+ WATCHTOWER_REVIVE_STOPPED=true to restart it) |
| No-pull is on | WATCHTOWER_NO_PULL | Turn it off so registry images get pulled |
After one successful cycle, check the logs the morning after. A line saying a new image was found and a container recreated proves the update ran — without it, you were only guessing.
Read also: a good service to test this pattern on is a personal Git server — how to run Gitea as a lightweight self-hosted Git server on a VPS. Label the Gitea container, watch one update cycle, then expand to other services.
Watchtower skipping images from a private registry? Give it credentials
The eight steps above found nothing, yet one container never updates — and that container's image comes from a private repository, either a private Docker Hub repository or GHCR. This is the quietest cause of all: Watchtower cannot pull an image it cannot authenticate to, and it skips it without a clear error in the log. The schedule is not wrong, the labels are not wrong — the credentials simply never reached Watchtower.
The fix takes two steps. First, log in to that registry from the host, so Docker stores the credentials:
docker login ghcr.ioThat command asks for a username and password — for GHCR, the password is a Personal Access Token (PAT) with package read permission, not your GitHub account password. The login result is stored in ~/.docker/config.json.
Second, hand that file to the Watchtower container. Add one volume line to your Watchtower compose file:
services:
watchtower:
image: containrrr/watchtower:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/.docker/config.json:/config.jsonThen relaunch Watchtower:
docker compose -f ~/watchtower/docker-compose.yml up -dIf you would rather not use docker login, create config.json yourself in the same format — auth holds the username and password joined together and base64-encoded:
echo -n 'username:password' | base64{
"auths": {
"<REGISTRY_NAME>": {
"auth": "XXXXXXX"
}
}
}Replace <REGISTRY_NAME> with your registry's name. Two special names that are easy to get wrong: private repositories on Docker Hub use https://index.docker.io/v1/, while GHCR uses ghcr.io with a PAT as the password. A wrong name leaves Watchtower unable to log in — and still silent.
Two things to remember. First, config.json holds real credentials: run chmod 600 ~/.docker/config.json and never commit that file to Git or paste it into a support ticket. Second, if your config file changes while Watchtower is running, the change is not picked up when the file itself is mounted — the official documentation recommends pointing at a config directory with the DOCKER_CONFIG: /config variable and mounting the directory instead of the file.
To confirm the fix works: force one cycle for the affected container (--run-once container-name, step 8 above) and read the log. If that private image is now checked and updated, the credentials arrived — and other containers from the same registry are covered too.
Common mistakes and their fixes
Socket error on startup. If Watchtower cannot connect to Docker, the mount is usually the cause. Check that the volume line reads exactly /var/run/docker.sock:/var/run/docker.sock and that the user running Docker can access the socket.
Nothing ever updates. Check three things in order: the WATCHTOWER_LABEL_ENABLE variable is set to true and the target service carries the enable label, the image tag is not frozen in a way that hides new releases, and the interval or schedule has actually passed. Monitor-only mode still being on is the most common silent cause.
Updates happen at the wrong hour. The schedule uses a six-field cron expression, and the timezone comes from TZ. The pattern 0 0 4 * * * means exactly 04:00, not 00:04, and a missing TZ variable shifts the hour to UTC.
Notifications never arrive. Verify the Shoutrrr URL, the token, and the channel ID, and confirm the variable sits in the Watchtower service block. The startup message in the logs is the fastest test: if Watchtower reports a notification error on launch, the URL itself is wrong.
Disk usage keeps growing. That is the expected side effect of WATCHTOWER_CLEANUP=false, which keeps every old image. Turn cleanup on once updates are stable, then run docker image prune once to clear the backlog.
A service breaks after an update. Roll back first, remove the label, and study the application logs before re-enabling automation. Fixing the app comes before re-automating it.
Final checklist before leaving Watchtower to run on its own
- Watchtower runs in monitor-only mode and reports new images without restarting anything.
- Label-enable mode is on, and only services you chose carry the enable label.
- Checks run on a schedule that lands in quiet hours, with TZ set correctly.
- Notifications arrive for every run, and you have seen at least one test message.
- Databases and core services are excluded or unlabeled.
- Old images are kept until updates prove stable, then cleanup is switched on.
- You know the rollback steps and have tested them on a non-critical service.
- Private registry credentials are mounted when any image comes from a private Docker Hub repository or GHCR.
With those pieces in place, container updates stop being a chore you postpone. Watchtower handles the routine, you handle the exceptions, and the server stays current without surprise restarts in the middle of the day.
Which service on your server falls behind on updates most often, and does it deserve a place on your first enable-label list? Start with one service, watch it through two update cycles, and expand the list only when the pattern feels boring.
Read also: Docker Compose Profiles and Override Trick: One Compose File for Multiple Environments for Compose services that only run under certain conditions, and How to Back Up Your VPS to S3 with Encrypted Restic Backups for automatic backups before major updates.
Official documentation references: https://containrrr.dev/watchtower/arguments/, https://containrrr.dev/watchtower/notifications/, https://containrrr.dev/watchtower/lifecycle-hooks/


Diskusi
Ada pertanyaan atau pengalaman yang ingin dibagikan?
Komentar ditinjau sebelum ditampilkan. Mari berdiskusi dengan sopan dan sesuai topik.
Tulis komentar