Prerequisites for Windows

  • Windows 10 (version 2004+) or Windows 11
  • Docker Desktop for Windows installed with Linux containers mode (default)
  • WSL2 enabled (recommended backend) or Hyper-V
  • Docker Desktop running in the system tray
⚠️
Linux containers mode only: Right-click the Docker Desktop system tray icon. If it shows "Switch to Linux containers", you're currently in Windows containers mode — click it to switch. Watchtower requires Linux containers mode to function.

Quick Install on Windows

Open PowerShell, Command Prompt, or Windows Terminal and run:

# PowerShell or Command Prompt — identical to Linux:
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=86400 `
  containrrr/watchtower

# Verify it's running:
docker ps
docker logs watchtower
ℹ️
In PowerShell, use a backtick ` for line continuation (not backslash). In WSL2 terminal (bash), use backslash \ as normal. The /var/run/docker.sock path works in both — Docker Desktop creates this path inside its Linux VM.

Docker Compose on Windows

# docker-compose.yml (works in any directory on Windows)
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=86400
      - WATCHTOWER_ROLLING_RESTART=true

# Run from PowerShell or Windows Terminal:
# docker compose up -d

Save this file as docker-compose.yml in any folder on your Windows machine, then run docker compose up -d from that directory.

Running Watchtower Inside WSL2

If you primarily work inside WSL2 (Ubuntu, Debian, etc.), you can run Watchtower from within WSL2 — Docker Desktop integrates the Docker CLI into WSL2 distributions:

# Inside WSL2 terminal (Ubuntu/Debian):
docker run -d \
  --name watchtower \
  --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_CLEANUP=true \
  -e WATCHTOWER_SCHEDULE="0 0 4 * * *" \
  containrrr/watchtower

# The container will appear in Docker Desktop GUI as well

Auto-Start Watchtower on Windows Boot

Docker Desktop must be running for Watchtower to work. Configure Docker Desktop to start on Windows login:

  1. Docker Desktop → Settings (gear icon)
  2. General → Start Docker Desktop when you sign in to your computer → Enable
  3. Optionally: Open Docker Dashboard at startup → Disable (to hide the UI on startup)

With --restart unless-stopped, Watchtower starts automatically when Docker Desktop starts.

Understanding the Docker Socket on Windows

Docker Desktop for Windows creates a named pipe and a Linux socket path:

# Windows named pipe (for Windows-native tools):
npipe:////./pipe/docker_engine

# Linux socket path (inside Docker Desktop VM):
/var/run/docker.sock   ← This is what Watchtower uses

# Docker Desktop also exposes the socket via:
# C:\Users\username\.docker\run\docker.sock  (Windows path to socket file)

# For Watchtower, always use:
-v /var/run/docker.sock:/var/run/docker.sock
# This works on Windows, macOS, and Linux identically

Performance Considerations on Windows

Docker Desktop on Windows runs containers inside a Linux VM (via WSL2 or Hyper-V). Container performance is slightly lower than native Linux, but Watchtower's resource usage is minimal:

# Watchtower resource usage is very low:
# - CPU: ~0% idle, brief spike during update checks
# - RAM: 15-30 MB
# - Disk I/O: minimal (only during image pulls)

# For Windows development machines, set a longer poll interval
# to avoid Docker activity interfering with development workflows:
- WATCHTOWER_SCHEDULE=0 0 3 * * *   # Update at 3 AM, not during work hours

Docker Hub Credentials on Windows

# Log into Docker Hub from any terminal on Windows:
docker login

# Docker Desktop stores credentials using Windows Credential Manager
# (not ~/.docker/config.json directly)

# To pass credentials to Watchtower:
# Method 1: Mount Docker config (may use credential store reference, not actual credentials)
-v C:\Users\username\.docker\config.json:/config.json:ro

# Method 2: Use environment variables (more reliable on Windows)
-e REPO_USER=yourusername
-e REPO_PASS=yourpassword

Viewing Logs on Windows

# In PowerShell or Windows Terminal:
docker logs watchtower
docker logs watchtower --follow
docker logs watchtower --tail 50

# In Docker Desktop GUI:
# Dashboard → watchtower container → Logs tab
# This provides a live log view with search functionality

Frequently Asked Questions

Does Watchtower work on Docker Desktop for Windows?

Yes. Watchtower works on Docker Desktop for Windows with the WSL2 backend. The Docker socket path /var/run/docker.sock is the same as Linux (Docker Desktop handles the Windows-to-Linux mapping internally). Use the same docker run command as you would on Linux.

Can Watchtower update Windows containers?

No. Watchtower is a Linux container and only monitors other Linux containers. Docker Desktop must be in Linux containers mode for Watchtower to work. Windows-native containers (nanoserver, windowsservercore) cannot be managed by Watchtower. Switch to Linux containers mode in Docker Desktop settings.

How do I run Watchtower on Docker Desktop for Windows?

Open PowerShell and run: docker run -d --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -e WATCHTOWER_CLEANUP=true containrrr/watchtower. The command is identical to Linux. Ensure Docker Desktop is running in Linux containers mode (right-click system tray icon to verify).

Will Watchtower keep running when I close Docker Desktop on Windows?

No. All containers stop when Docker Desktop quits. Enable "Start Docker Desktop when you sign in" in Docker Desktop Settings → General, and use --restart unless-stopped on your Watchtower container. This ensures Watchtower starts automatically every time Docker Desktop starts.

AC
Alex Chen
Docker Infrastructure Engineer
Alex uses Docker Desktop for Windows daily for development and has documented the differences between Docker on Windows vs Linux environments. All configurations in this guide are tested on Docker Desktop 4.30+ with WSL2 backend on Windows 11.