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:
SMTP Migration Walkthrough¶
Example Legacy Configuration:
-
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.sockdocker 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/watchtowerdocker 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] -
The following converted Shoutrrr URL should be produced:
smtp://[email protected]:[email protected]:587/[email protected]&[email protected]&encryption=ExplicitTLS&usestarttls=yes -
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.sockdocker 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/watchtowerdocker 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
encryptionandusestarttlsURL parameters in thesmtp://URL to control TLS behavior rather than deprecated flags.