← all posts

Watchtower is archived: auto-update Docker Compose containers with a cron job instead

containrrr/watchtower was archived in December 2025, and 1.7.1 panics on Docker 29. A tested cron script that pulls and restarts your compose stacks, and the traps it avoids.

8 min read

Watchtower was the container you added once and forgot: every night it pulled new images and restarted whatever had changed. In December 2025 its maintainers archived the repository. The last release, 1.7.1, is from November 2023, and on a current Docker Engine it doesn’t start.

We ran it against Docker 29, then built the replacement most people end up with, a cron job that runs docker compose pull and docker compose up -d, and pushed new images to a local registry to watch what it did.

docker 29.10.1 · compose 5.8 · debian 13 cron · local registry

  • watchtower 1.7.1API 1.25 refused, then a nil pointer panic
  • API pinned 1.44watchtower ran again
  • compose from cronno configuration file provided, exit 1
  • pull then up -donly the changed container recreated
  • registry downpull exit 1, cron told nobody
  • ignore failuressame outage, exit 0
  • up -d everywherestarted a stack we had stopped
  • runwispfailed pull went red, nothing restarted

Short answer

Watchtower is archived, and its last image fails on Docker 29 unless you pin DOCKER_API_VERSION. To replace it with plain tools, put a script in root’s crontab that runs docker compose -f <file> pull && docker compose -f <file> up -d for each running stack, then docker image prune -f. The -f matters, because cron starts jobs in the home directory where Compose finds no file, and the && keeps a failed pull from restarting anything. The script below does that and exits 1 if any stack failed. If you want each update in a history you can look back on and a notification when one fails, RunWisp, an open-source cron replacement that ships as a single binary, runs the same commands as a task per stack, as tested below.

Watchtower on Docker 29

The archive notice is a discussion titled “Goodbye containrrr/watchtower!” from December 17, 2025. The maintainers wrote that they no longer use Docker much and that they couldn’t vouch for any fork. The image is still on Docker Hub, so docker compose up keeps pulling it. On Docker Engine 29.10.1 this is what it printed:

level=info msg="Watchtower 1.7.1"
level=info msg="Running a one time update."
level=error msg="Error response from daemon: client version 1.25 is too old. Minimum supported API version is 1.40, please upgrade your client to a newer version"
panic: runtime error: invalid memory address or nil pointer dereference

Watchtower asks the daemon for API version 1.25, and Docker 29 no longer accepts anything that old. With -e DOCKER_API_VERSION=1.44 on the Watchtower container, the same run scanned our three containers and finished normally. That keeps an existing setup alive, on code nobody maintains.

Watchtower does a few things a cron job won’t. It finds every container on the host by itself, including ones started with docker run, and it has notifications built in. If you want exactly that, nicholas-fedor/watchtower is the most active fork and had a release on November 30, 2026. If your containers live in compose files anyway, the rest of this post needs nothing but cron and Compose, and the update runs your compose file the same way you do by hand.

The two commands

docker compose pull
docker compose up -d

pull fetches a new image for every service that has an image:. up -d then compares each running container with its service and recreates only the ones whose image or config changed. We pushed a new web image and ran both:

 Container media-custom-1 Running
 Container media-worker-1 Running
 Container media-web-1 Recreate
 Container media-web-1 Recreated
 Container media-web-1 Started

worker had no new image and kept running. custom has build: instead of image:, so pull printed custom Skipped No image to be pulled and left it alone. A service you build yourself needs docker compose build --pull before up -d if you want its base image refreshed too.

From cron, Compose can’t find the file

The first crontab line we tried was the two commands as you’d type them:

0 4 * * * docker compose pull && docker compose up -d

It failed every time:

no configuration file provided: not found

Cron runs the job in the user’s home directory, /root here, and Compose looks for compose.yaml in the current directory. Name the file with -f, or cd first:

0 4 * * * cd /srv/media && docker compose pull && docker compose up -d

That one worked. The output still goes to cron’s mail, which on most Docker hosts goes nowhere (the MAILTO post covers why). Also check command -v docker: if it prints /snap/bin/docker, cron won’t find it, because cron’s PATH is only /usr/bin:/bin.

A pull that fails says nothing

With the registry stopped, docker compose pull printed the error and exited 1:

 Image localhost:5000/web:stable Error failed to resolve reference "localhost:5000/web:stable": ...
 dial tcp 127.0.0.1:5000: connect: connection refused

With &&, up -d never ran and the old containers kept going, which is the right outcome. Many snippets join the two with ; instead, and then up -d runs anyway and the line exits 0. --ignore-pull-failures also exited 0 in the same outage. Either way a Docker Hub rate limit or a deleted tag looks the same as “no updates tonight” until you notice an image is months old. If the job’s output goes to a log file, nobody reads it; if it goes to mail, the failure alerts post has ways to get it to you.

A cron script that updates every stack

Most homelabs have one directory per stack, /srv/media, /srv/tools and so on. Our first version looped over all of them, and up -d brought back a stack we had stopped with docker compose down on purpose. This version skips stacks with no running containers, and exits 1 at the end if any stack failed:

#!/bin/sh
# /usr/local/bin/update-stacks
# Pull and restart every running stack under /srv. Exits 1 if any stack failed.
status=0
for f in /srv/*/compose.yaml; do
    [ -n "$(docker compose -f "$f" ps -q)" ] || continue   # stopped on purpose
    echo "== $f"
    docker compose -f "$f" pull && docker compose -f "$f" up -d || status=1
done
docker image prune -f
exit $status
0 4 * * * /usr/local/bin/update-stacks >> /var/log/update-stacks.log 2>&1

With the registry down for /srv/media, the script still updated /srv/tools and exited 1. Put it in root’s crontab, or the crontab of a user in the docker group.

docker image prune -f removes the images that updates replaced. On the classic overlay2 storage, which hosts upgraded from older Docker versions keep, every update leaves the previous image behind untagged. The prune only removes untagged images that no container uses.

If the update runs from inside a container, such as a cron container with the Docker CLI and the socket mounted, use the same Compose version as the host. A stack started by Compose 5.8 had all three containers recreated by Compose 2.36, though nothing had changed, and the next run with 5.8 recreated them again.

Pin what shouldn’t move

An unattended update installs whatever the tag points at. image: jellyfin/jellyfin:latest is fine to follow. image: postgres:latest is not: when the tag moves to a new major version, the new server refuses to start on the old data directory, and you find out at 04:01. Pin databases to a major version (postgres:17) and update those by hand. A service you never want touched can have its own compose file outside /srv/*, or you can list the services to pull and restart: docker compose pull web worker && docker compose up -d web worker.

Updating stacks with RunWisp

RunWisp is an open-source cron replacement that ships as a single binary. It runs the same commands, but each stack gets its own task with its own run history, and a failed update turns the run red and sends a notification instead of disappearing into a log. On the Docker host:

curl -fsSL https://get.runwisp.com | sh
sudo runwisp service install

The system service runs as root and reads /etc/runwisp/runwisp.toml:

[notifiers.phone]
type  = "ntfy"
topic = "homelab-updates-7f3k"

[tasks.update-media]
cron        = "0 4 * * *"
working_dir = "/srv/media"
timeout     = "30m"
on_overlap  = "skip"
notify      = ["phone"]
run = """
docker compose pull
docker compose up -d
docker image prune -f
"""

[tasks.update-tools]
cron        = "15 4 * * *"
working_dir = "/srv/tools"
timeout     = "30m"
on_overlap  = "skip"
notify      = ["phone"]
run = """
docker compose pull
docker compose up -d
docker image prune -f
"""

working_dir puts the task in the project directory, so there’s no -f to forget. RunWisp runs a multi-line run with sh -e, so the script stops at the first command that fails, with no && to get wrong.

We ran RunWisp 1.11.0 against the same stacks. After a new web image, the run log for update-media showed media-web-1 recreated and the other two still running, and the run succeeded in 544 ms. With the registry stopped, the next run printed the connection refused error, ended as failed with exit 1, and never got to up -d:

$ sudo runwisp run update-media
 Image localhost:5000/worker:stable Error failed to resolve reference "localhost:5000/worker:stable": ...
[ERROR] Task failed name=update-media reason=failed duration=110ms exit=1

That failed run is what sends the ntfy notification. Every run’s output stays in the history, so when Jellyfin starts acting up on a Thursday, the web UI shows which night media-jellyfin-1 was last recreated, and Ctrl+F in a run’s log finds the line. “Run now” on a task updates a stack right away, and on_overlap = "skip" keeps a slow pull from overlapping the next run.

The Docker tasks recipe covers running RunWisp itself in a container next to your stacks, and Docker Compose cron jobs with a web UI compares it with the other ways to schedule jobs in a compose stack.

Common questions

Is Watchtower still maintained?
No. containrrr/watchtower was archived on December 17, 2025, and its last release is 1.7.1 from November 2023. On Docker Engine 29.10.1 that image stops with client version 1.25 is too old and then panics. Setting DOCKER_API_VERSION=1.44 on the Watchtower container made it run again in our test. The maintainers didn't vouch for any fork; nicholas-fedor/watchtower is the most active one and had a release on November 30, 2026.
How do I auto-update Docker Compose containers without Watchtower?
Run docker compose pull and then docker compose up -d on a schedule, from a script in root's crontab. Point each command at the stack with -f /srv/app/compose.yaml, because cron starts jobs in the home directory, where Compose finds no compose file. up -d recreates only the containers whose image changed. Finish with docker image prune -f to remove the images that were replaced.
Why does docker compose fail in a cron job?
Cron runs the job in the user's home directory, so a bare docker compose pull finds no compose file and exits 1 with no configuration file provided: not found. Pass the file with -f /srv/app/compose.yaml, or cd into the project directory first. If docker is installed as a snap, its /snap/bin directory isn't on cron's PATH either.
What happens if docker compose pull fails during an automatic update?
docker compose pull exits 1 when a registry can't be reached or an image is missing, so pull && up -d keeps the old containers running, which is what you want. Written with a semicolon, up -d runs anyway and the line exits 0. --ignore-pull-failures also exits 0. In both cases the failure only shows in a log file, if you kept one.
Is there a Watchtower alternative with a web UI and alerts?
RunWisp, an open-source cron replacement that ships as a single binary, runs the docker compose pull and up -d script as a scheduled task, one per stack. Each run's output is kept, so the run log shows which containers were recreated on which night, and a failed pull turns the run red and sends a notification, for example to ntfy. In our test a registry outage stopped the task at the pull with exit 1, before anything was restarted.
  1. Cron in Docker runs in UTC: setting the container timezone with TZ and tzdata

    TZ in a cron container did nothing on Ubuntu and Alpine images, which lack tzdata. On Debian the schedule moved while its jobs kept UTC. A fix that works on both.

  2. ZFS scrub schedule on Ubuntu and Proxmox: the monthly cron job skips degraded pools

    Debian-based distros, Proxmox VE included, scrub ZFS pools from /etc/cron.d on the second Sunday. We broke a mirror in a VM to see what that job reports, and how to get an alert when a scrub finds errors.

Get started
GPL 3.0 · no accounts · free to self-host

Start in 30 seconds. Ship on your terms.

A single Go binary. If it doesn't earn the disk space, rm it. No account, no signup, no catch.

Install in 30 seconds
curl -fsSL https://get.runwisp.com | sh