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
dockergroup or havesudoaccess
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)"
First-Time Configuration
After a successful docker watchtower setup, configure these options based on your needs:
| Use Case | Environment Variable | Value |
|---|---|---|
| Free up disk after updates | WATCHTOWER_CLEANUP | true |
| Check every 6 hours | WATCHTOWER_POLL_INTERVAL | 21600 |
| Update at 4 AM only | WATCHTOWER_SCHEDULE | 0 0 4 * * * |
| Slack alerts | WATCHTOWER_NOTIFICATIONS | slack |
| Only update labeled containers | WATCHTOWER_LABEL_ENABLE | true |
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
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.
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.
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.
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.
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