A simple Bash script that checks your current external IP address and sends it to your Telegram chat.
Perfect for monitoring VPN connections, dynamic IPs, or just keeping an eye on what your server is exposing. 🔍
- 📤 Sends your IP address to Telegram automatically
- 🔁 Easy to schedule via
cron
- 🔐 Keeps your IP monitoring private (no web UI or third-party dashboards)
- 🐧 Designed for Linux (Debian/Ubuntu tested)
Download the script from GitHub:
wget https://raw.githubusercontent.com/Angrido/IP-Notifier-Telegram/main/ip-notifier-telegram.sh
chmod +x ip-notifier-telegram.sh
- Open Telegram and search for @BotFather
- Type
/newbot
and follow the instructions - Copy the bot token (it looks like
123456789:ABCDefGhiJkLmNOpQrStUvWxYz
)
- Open Telegram and search for @userinfobot
- Send
/start
- Note your User ID (a number like
123456789
)
Open the downloaded script and replace the placeholder values:
BOT_TOKEN="your_bot_token_here"
CHAT_ID="your_user_id_here"
Run the script manually to test:
./ip-notifier-telegram.sh
You should receive a Telegram message with your current IP. 🎉
To run the script every hour, open your crontab:
crontab -e
Add this line (adjust the path if needed):
0 * * * * /root/ip-notifier-telegram.sh
🌐 Current external IP: 123.123.123.0