Prerequisites

  • Docker Engine 20.10 or later installed
  • Access to Docker Hub (or your container registry)
  • Linux or macOS host (Windows WSL2 supported)
  • User must be in the docker group or have sudo access

Method 1: Install Watchtower with Docker Run

The fastest way to install watchtower docker is a single docker run command pulling the official containrrr/watchtower image from Docker Hub:

# Minimal install
docker run -d \
  --name watchtower \
  --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  containrrr/watchtower

# Recommended: with cleanup and 6-hour interval
docker run -d \
  --name watchtower \
  --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_CLEANUP=true \
  -e WATCHTOWER_POLL_INTERVAL=21600 \
  containrrr/watchtower

Method 2: Setup Watchtower Docker Compose

For persistent, version-controlled deployments, add Watchtower to your docker-compose.yml:

version: "3.8"
services:
  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_POLL_INTERVAL=21600

# Then start with:
# docker compose up -d

See the full Docker Compose setup guide for production configuration including notifications and scheduling.

Method 3: Docker Watchtower Install on Swarm

# Deploy as a global service on every Swarm node
docker service create \
  --name watchtower \
  --mode global \
  --constraint 'node.role == worker' \
  --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
  --env WATCHTOWER_CLEANUP=true \
  containrrr/watchtower

For full Swarm configuration, see the Docker Swarm guide.

Verify the Installation

# Check container is running
docker ps | grep watchtower

# View startup logs
docker logs watchtower

# Expected output:
# time="..." level=info msg="Starting Watchtower and scheduling first run: 2026-05-26 04:00:00 +0000 UTC"
# time="..." level=info msg="Checking all containers (except explicitly disabled ones)"
If you see "Starting Watchtower and scheduling first run" in the logs, installation is complete and successful.

First-Time Configuration

After a successful docker watchtower setup, configure these options based on your needs:

Use CaseEnvironment VariableValue
Free up disk after updatesWATCHTOWER_CLEANUPtrue
Check every 6 hoursWATCHTOWER_POLL_INTERVAL21600
Update at 4 AM onlyWATCHTOWER_SCHEDULE0 0 4 * * *
Slack alertsWATCHTOWER_NOTIFICATIONSslack
Only update labeled containersWATCHTOWER_LABEL_ENABLEtrue

Private Registry Authentication

To install watchtower docker against a private registry (AWS ECR, GHCR, GitLab), mount your Docker credentials:

docker run -d \
  --name watchtower \
  --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v $HOME/.docker/config.json:/config.json:ro \
  -e DOCKER_CONFIG=/config.json \
  containrrr/watchtower

First run docker login registry.example.com on your host to populate ~/.docker/config.json with credentials.

Uninstall Watchtower Docker

# Stop and remove the container
docker stop watchtower && docker rm watchtower

# Remove the image
docker rmi containrrr/watchtower

Frequently Asked Questions

How do I know Watchtower is working after install?

Run docker logs watchtower. You should see "Starting Watchtower and scheduling first run" followed by log entries showing Watchtower checking your containers. After the first update cycle, you'll see messages for each container it checked or updated.

Does docker watchtower install require root?

No. You need access to the Docker socket (/var/run/docker.sock). Add your user to the docker group with sudo usermod -aG docker $USER and then you can run docker run without sudo. On rootless Docker, use the user-specific socket path instead.

What is the watchtower docker image size?

The containrrr/watchtower image is approximately 12–15 MB compressed. It is built on Alpine Linux to minimize footprint. The initial pull is fast even on slow connections.

Can I install Watchtower on Windows Docker?

Yes, via WSL2 (Windows Subsystem for Linux). Run Docker Desktop on Windows with WSL2 backend, then use the same Linux docker run command. Watchtower runs inside WSL2 Linux and has access to the Docker daemon. Native Windows containers are not supported.

AC
Alex Chen
Docker Infrastructure Engineer · containrrr contributor
Alex has installed and configured Watchtower on hundreds of production and homelab systems. All commands in this article are verified against Docker Engine 26.x on Ubuntu 22.04 LTS and macOS Sequoia.

Installed Watchtower? Monitor updates with our dashboard

See every container update in real time — free for up to 5 hosts, no credit card required.

Start Free Monitoring