Category
Capabilities
๐ Auth
Each user links their own UptimeRobot API key โ securely stored per-user in MongoDB
๐ Status Dashboard
Paginated monitor cards (5/page) with live โธ๏ธ Pause / โถ๏ธ Resume / ๐ Delete buttons per monitor
๐ Stats
Visual progress bar uptime display (โโโโโโโโโโ) with ๐ข๐ก๐ด color grading for 7d / 30d / 90d
๐ Alerts
Unified timeline feed (newest first), filter by ๐ All or ๐ด Down only
๐ค Account
Monitor usage progress bar, plan badge (Free/Pro), email, check interval
๐ Alert Contacts
List, add (Email / Telegram / Webhook / Slack), delete
๐ช Maintenance Windows
List, create (Once / Daily / Weekly / Monthly), delete
๐ Public Status Pages
List, create, delete
๐ Inline Search
Type @bot <query> in any chat to instantly share monitor status
๐ Security
Per-user API key isolation, confirmation prompt on all destructive actions
๐ Multi-user
Unlimited users, each with their own UptimeRobot account
๐ฎ Admin Panel
Broadcast, ban/unban, live bot stats (memory + uptime), force-subscribe, restart
Command
Description
/setkey <api_key>
Link your UptimeRobot API key
/mykey
Check whether an API key is currently set
/deletekey
Remove your stored API key
Command
Description
/status
Paginated monitor cards with quick Pause / Resume / Delete buttons
/stats
Visual uptime % bars and average response times
/alerts
Unified alert timeline โ filter by All or Down only
/add
Guided 3-step monitor creation
/pause <id>
Pause a monitor
/resume <id>
Resume a paused monitor
/delete <id>
Delete a monitor (confirmation required)
Command
Description
/account
Account details with monitor usage progress bar
/contacts
List all alert contacts
/addcontact
Add a new contact (guided)
/delcontact <id>
Delete a contact
๐ช Maintenance & Status Pages
Command
Description
/mwindow
List maintenance windows
/addmwindow
Create a new maintenance window
/delmwindow <id>
Delete a maintenance window
/psp
List public status pages
/addpsp
Create a new status page
/delpsp <id>
Delete a status page
Command
Description
/start
Welcome screen with live monitor summary (returning users)
/menu
Interactive control panel with live account summary
/cancel
Cancel any in-progress multi-step operation
Command
Description
/botstats
Users count, memory usage, uptime, force-sub status
/broadcast
Reply to any message with this to send it to all users
/ban <id> [reason]
Ban a user from using the bot
/unban <id>
Unban a user
/bannedlist
List all banned users
/setfsub <@channel>
Enable force-subscribe for a channel
/delfsub
Disable force-subscribe
/restart
Restart the bot process
๐ก Use /status to find monitor IDs needed for pause / resume / delete.
๐ฎ Admin commands only work for user IDs listed in the ADMINS env variable.
Type @yourbotusername in any Telegram chat to search your monitors without opening the bot.
Query
Result
@bot
Overview summary + all monitors
@bot mysite
Search by name or URL
@bot down
Only down monitors
@bot up
Only up monitors
@bot paused
Only paused monitors
Each result shows monitor name, status, URL, uptime %, response time, and ID.
Tap a result to share it directly into the chat.
โ ๏ธ Enable inline mode first: BotFather โ your bot โ Bot Settings โ Inline Mode โ Enable
UptimeRobot-main/
โ
โโโ app/
โ โโโ main.py # Module entrypoint (`python -m app.main`)
โ โโโ core/
โ โ โโโ db.py # MongoDB layer (users/config/indexes)
โ โ โโโ api_cache.py # get_api_for() per-user API cache
โ โ โโโ uptime_robot.py # UptimeRobot REST API wrapper (aiohttp)
โ โโโ handlers/
โ โโโ middleware.py # check_banned ยท check_force_sub ยท check_all
โ โโโ monitors.py # /status /stats /alerts /add /pause /resume /delete + UI builders
โ โโโ account.py # /account with usage progress bar
โ โโโ contacts.py # /contacts /addcontact /delcontact
โ โโโ mwindow.py # /mwindow /addmwindow /delmwindow
โ โโโ psp.py # /psp /addpsp /delpsp
โ โโโ callbacks.py # Inline keyboard callbacks + main_keyboard()
โ โโโ admin.py # /botstats /broadcast /ban /unban /bannedlist /setfsub /delfsub /restart
โ โโโ inline.py # Inline mode โ @bot <query> monitor search
โ
โโโ .env.example # Environment variable template
โโโ requirements.txt # Python dependencies
โโโ Procfile # worker: python -m app.main
โโโ railway.toml # Railway deploy config
โโโ README.md # This file
โโโ LICENSE # MIT License
Step 1 โ Gather Credentials
Each user's UptimeRobot API key is stored in MongoDB โ it is not an env variable.
Step 2 โ MongoDB Atlas (Free Tier)
Sign up at cloud.mongodb.com
Create a free M0 cluster
Database Access โ add a user with a password
Network Access โ allow 0.0.0.0/0
Connect โ Drivers โ copy your connection string:
mongodb+srv://<user>:<password>@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority
Step 3 โ Install & Run Locally
# Clone
git clone https://github.com/muhammedadnank/UptimeRobot.git
cd UptimeRobot
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env โ fill in API_ID, API_HASH, BOT_TOKEN, MONGODB_URI, ADMINS, PORT
# Start
python -m app.main
render.com โ New โ Background Worker
Connect your GitHub repo
Set:
Build Command: pip install -r requirements.txt
Start Command: python -m app.main
Add all environment variables (set PORT=10000)
Create Background Worker โ Deploy โ
Push your code to GitHub
railway.app โ New Project โ Deploy from GitHub repo
Select your repo
Variables tab โ add all env vars
Done โ Railway auto-deploys on every push โ
โ๏ธ Environment Variables
# Telegram MTProto credentials โ my.telegram.org
API_ID = 12345678
API_HASH = your_api_hash_here
# Bot token โ @BotFather
BOT_TOKEN = your_bot_token_here
# MongoDB Atlas connection string
MONGODB_URI = mongodb+srv://<user>:<password>@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority
# Admin user IDs โ space or comma separated
# Get your ID from @userinfobot on Telegram
ADMINS = 123456789
# HTTP port for health check (Render uses 10000 by default)
PORT = 10000
Package
Purpose
kurigram
Telegram MTProto โ actively maintained Pyrogram fork
motor
Async MongoDB driver
aiohttp
Async HTTP client for UptimeRobot API
tgcrypto
Fast Telegram encryption (speeds up MTProto)
psutil
System stats for /botstats (memory, uptime)
Collection: users
Field
Type
Description
telegram_id
int
Unique index โ Telegram user ID
api_key
str
UptimeRobot API key (ur_โฆ or u0000000-โฆ)
banned
bool
Whether the user is banned
ban_reason
str
Reason for ban
banned_at
datetime
When the user was banned
created_at
datetime
When the user first ran /setkey
updated_at
datetime
Last API key update
last_active
datetime
Last API call timestamp
Collection: config
Field
Type
Description
key
str
Unique index โ config key (e.g. force_sub)
value
str
Config value (e.g. @yourchannel or -1001234567890)
Symptom
Fix
Bot doesn't respond
Check BOT_TOKEN is correct and bot is not blocked
api_key not found error
Regenerate key at dashboard.uptimerobot.com โ My Settings โ API Settings
MongoDB connection error
Whitelist your server IP in Atlas โ Network Access
API_ID / API_HASH errors
These come from my.telegram.org , not BotFather
/setkey says invalid key
Key must start with ur_ or match u1234567-xxxxโฆ format
Multi-step flow stuck
Send /cancel to reset state
Admin commands not working
Add your Telegram user ID to ADMINS env variable
Force-sub not working
Bot must be admin in the channel. Use @username or channel ID โ not a phone number
Inline mode not working
BotFather โ Bot Settings โ Inline Mode โ Enable
Render deploy times out
Ensure PORT env var is set โ health server must bind a port
Private chats only โ group chats are not supported
Multi-step flows auto-expire after 10 minutes of inactivity โ send /cancel to reset manually
UptimeRobot Free plan: 50 monitors , 5-minute check interval
Alert timestamps displayed in IST (UTC+5:30)
Weekly maintenance windows: day-of-week (1 = Mon โฆ 7 = Sun)
Monthly maintenance windows: day-of-month (1 โ 28)
Status page displays 5 monitors per page โ use โ๏ธ / โถ๏ธ to navigate
API keys stored as plaintext โ enable Atlas Encryption at Rest for production security
Fork the repo
Create a branch: git checkout -b feature/your-feature
Commit: git commit -m "Add your feature"
Push: git push origin feature/your-feature
Open a Pull Request
Please keep PRs focused โ one feature or fix per PR.
MIT License โ free to use, modify, and distribute. See LICENSE for details.