Watchtower Setup Guide - ajgillis04/GillisDockerDepot GitHub Wiki

Watchtower Setup Guide

Introduction

Watchtower is a Docker container that automatically updates running containers to the latest version of their images. It's useful for keeping your containers up-to-date without manual intervention.

Prerequisites

  • Docker installed
  • Watchtower container running in your Docker stack

Configuration Steps

Step 1: Accessing the Watchtower UI

  1. Open your browser and navigate to http://<your-ip-address>:<port>.
  2. Log in with your Watchtower credentials.

Step 2: Initial Setup Wizard

  1. Follow the initial setup wizard to configure basic settings.
  2. Choose your preferred language for the Watchtower interface.

Step 3: Configuring Environment Variables

  1. Navigate to the Settings tab.
  2. Go to the Environment Variables section.
  3. Set the WATCHTOWER_CLEANUP to true to remove old images after updating.
  4. Optionally, set other environment variables such as WATCHTOWER_SCHEDULE to specify the update schedule (e.g., 0 0 2 * * * for 2 AM daily updates).
  5. Click Save.

Step 4: Running Watchtower

  1. Open your terminal and run the following command:
    docker run -d --name watchtower \
      -v /var/run/docker.sock:/var/run/docker.sock \
      containrrr/watchtower
⚠️ **GitHub.com Fallback** ⚠️