Skip to content

Migration Tool

Overview

Watchtower includes a notify-upgrade command to help convert legacy notification configurations to Shoutrrr URLs for use with the NOTIFICATION URL.

The output is written to a temporary file, which you can copy using:

docker cp <CONTAINER>:<FILE_PATH> ./watchtower-notifications.env

SMTP Migration Walkthrough

Example Legacy Configuration:

  1. Run the following Docker Compose configuration / Docker CLI command:

    services:
        watchtower:
            image: nickfedor/watchtower:latest
            environment:
                WATCHTOWER_NOTIFICATIONS: email
                WATCHTOWER_NOTIFICATION_EMAIL_SERVER: smtp.example.com
                WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT: 587
                WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER: [email protected]
                WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD: secret
                WATCHTOWER_NOTIFICATION_EMAIL_FROM: [email protected]
                WATCHTOWER_NOTIFICATION_EMAIL_TO: [email protected]
            volumes:
               - /var/run/docker.sock:/var/run/docker.sock
    
    docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e WATCHTOWER_NOTIFICATIONS=email \
    -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.example.com \
    -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587 \
    -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=[email protected] \
    -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=secret \
    -e WATCHTOWER_NOTIFICATION_EMAIL_FROM=[email protected] \
    -e WATCHTOWER_NOTIFICATION_EMAIL_TO=[email protected] \
    nickfedor/watchtower
    
    docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    nickfedor/watchtower \
    --notifications email \
    --notification-email-server smtp.example.com \
    --notification-email-server-port 587 \
    --notification-email-server-user [email protected] \
    --notification-email-server-password secret \
    --notification-email-from [email protected] \
    --notification-email-to [email protected]
    
  2. The following converted Shoutrrr URL should be produced:

    smtp://[email protected]:[email protected]:587/[email protected]&[email protected]&encryption=ExplicitTLS&usestarttls=yes
    
  3. Replace the deprecated configuration with the coverted Shoutrrr URL:

    services:
        watchtower:
            image: nickfedor/watchtower:latest
            environment:
                WATCHTOWER_NOTIFICATION_URL: smtp://[email protected]:[email protected]:587/[email protected]&[email protected]&encryption=ExplicitTLS&usestarttls=yes
                WATCHTOWER_NOTIFICATIONS_DELAY: "10"
                WATCHTOWER_NOTIFICATION_TITLE_TAG: Watchtower
            volumes:
               - /var/run/docker.sock:/var/run/docker.sock
    
    docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e WATCHTOWER_NOTIFICATION_URL=smtp://[email protected]:[email protected]:587/?fromaddress=[email protected]&toaddresses=[email protected]&encryption=ExplicitTLS&usestarttls=yes \
    -e WATCHTOWER_NOTIFICATIONS_DELAY=10 \
    -e WATCHTOWER_NOTIFICATION_TITLE_TAG=Watchtower \
    nickfedor/watchtower
    
    docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    nickfedor/watchtower \
    --notification-url "smtp://[email protected]:[email protected]:587/[email protected]&[email protected]&encryption=ExplicitTLS&usestarttls=yes" \
    --notifications-delay 10 \
    --notification-title-tag Watchtower
    

Note

  • Avoid using unrecognized flags like WATCHTOWER_NOTIFICATION_EMAIL_SERVER_SSL, as they are ignored and may cause confusion.
  • Use the encryption and usestarttls URL parameters in the smtp:// URL to control TLS behavior rather than deprecated flags.