Skip to content

A simple write-up on how to receive Telegram notifications from Watchtower whenever an image is updated.

License

Notifications You must be signed in to change notification settings

Pyenb/Watchtower-telegram-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Watchtower telegram notifications

This repo is just a simple write-up on how to get telegram notifications from Watchtower, when a container is updated. This version is mostly focused on docker-compose, but should also work with docker run.

Contents

  1. Installation
  2. Complete docker-compose file
  3. Contributing
  4. Disclaimer

Installation

It's pretty easy to get telegram notifications from Watchtower. You just need to follow these steps:

1. Telegram Bot

Firstly, we need to create a new telegram bot. For that open a new chat with BotFather, type in the command /newbot and follow the instructions. In the end you should see a message like this:

success

2. Get your chat id

After creating your bot, you need to get your chat id. For that, open a new chat with your bot, start it and tag @get_id_bot in the chat. You should get a message like this:

chat id

3. Setup Watchtower

Now we need to setup Watchtower. For that, you need to add the following environment variables to your docker-compose file:

environment:
    - WATCHTOWER_NOTIFICATIONS=shoutrrr
    - WATCHTOWER_NOTIFICATION_URL=telegram://HTTP_API_TOKEN@telegram?chats=CHAT_ID

Replace HTTP_API_TOKEN with the token you got from BotFather in step 1. and CHAT_ID with the chat id you got from @get_id_bot in step 2.

4. (Re)start Watchtower

Now you can (re)start Watchtower:

sudo docker-compose up -d --force-recreate

and you should get a message from your bot, that Watchtower is running. The message should look like this:

watchtower running

You will also get a message, when a container is updated. It should look like this:

updated

Complete docker-compose file

If you are still unsure, how your docker-compose file should look like, check out the docker-compose.yml file in this repo. Most optional settings are commented, so everything is more understandable. Just remember to replace HTTP_API_TOKEN with the token you got from BotFather in step 1. and CHAT_ID with the chat id you got from @get_id_bot in step 2.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License: GPL v3

Disclaimer

This repository is for research purposes only, the use of this code is your responsibility.

I take NO responsibility and/or liability for how you choose to use any of the source code available here. By using any of the files available in this repository, you understand that you are AGREEING TO USE AT YOUR OWN RISK. Once again, ALL files available here are for EDUCATION and/or RESEARCH purposes ONLY.

About

A simple write-up on how to receive Telegram notifications from Watchtower whenever an image is updated.

Topics

Resources

License

Stars

Watchers

Forks