π€ Telegram bot untuk remote control laptop Windows via webhook
Secure dashboard + Bot commands untuk:
- Power control (lock, sleep, shutdown, restart)
- System monitoring (CPU, RAM, disk, battery)
- Audio control (volume, mute)
- Screenshot capture
- Web dashboard dengan login authentication
pip install -r requirements.txt# Copy template
copy .env.example .env
# Edit .env dengan:
# - Bot token dari @BotFather
# - User ID dari @userinfobot
# - Cloudflare domain
# - Dashboard credentials# Simple double-click:
start.bat
# Or manual:
python main.pywBot runs in background, no window!
http://localhost:8443/
Login dengan credentials dari .env
/start- Info bot dan authorized user/status- System stats (CPU, RAM, disk, battery, uptime)/screenshot- Capture & send screenshot/lock- Lock screen/sleep- Sleep mode/shutdown- Shutdown (dengan konfirmasi)/restart- Restart (dengan konfirmasi)/volume <0-100>- Set volume level/mute- Mute audio/unmute- Unmute audio
- β Secure login (bcrypt password hashing)
- β Real-time system stats (CPU, RAM, Disk, Uptime)
- β Live logs viewer (auto-refresh)
- β Bot status monitoring
- β Mobile responsive
- β Session management (24hr timeout)
- β Rate limiting (5 login attempts / 15min)
- User ID whitelist
- Webhook secret token
- Rate limiting (30 cmds/min)
- Bcrypt password hashing
- Signed session cookies (HttpOnly, SameSite)
- CSRF protection ready
- All secrets in
.env(gitignored)
Bot runs completely hidden (no console window):
start.bat # Recommended
# or
python main.pyw # Direct launchstop.bat# Run as Administrator:
enable_autostart.bat
# To disable:
disable_autostart.batWhy it works:
- Uses
main.pyw(Windows background app) - Logger auto-detects pythonw (skips console)
- Writes to
logs/remo.logonly
remo/
βββ main.py # Main app (with console)
βββ main.pyw # Background mode (no console)
βββ start.bat # Start background
βββ stop.bat # Stop bot
βββ enable_autostart.bat # Setup auto-start
βββ disable_autostart.bat # Remove auto-start
βββ config.py # Configuration
βββ .env # Secrets (NOT committed)
βββ .env.example # Template
βββ bot/
β βββ handlers.py # Telegram command handlers
β βββ middleware.py # Auth & rate limiting
βββ system/
β βββ power.py # Power control
β βββ audio.py # Volume control
β βββ display.py # Screenshot & brightness
β βββ status.py # System monitoring
βββ dashboard/
β βββ auth.py # Authentication system
β βββ routes.py # Web routes & API
β βββ templates/ # HTML templates
βββ utils/
β βββ logger.py # Logging (file + console)
βββ logs/
βββ remo.log # Application logs
All config in .env file:
# Bot
REMO_BOT_TOKEN=your_bot_token
REMO_USER_ID=your_telegram_user_id
# Webhook
REMO_WEBHOOK_DOMAIN=your.domain.com
REMO_WEBHOOK_PORT=8443
# Dashboard
REMO_DASHBOARD_USERNAME=admin
REMO_DASHBOARD_PASSWORD=SecurePassword123!
REMO_DASHBOARD_SECRET_KEY=auto_generated
# Device (optional)
REMO_DEVICE_NAME=Main Laptop
REMO_DEVICE_ID=main-laptop-
Install cloudflared
choco install cloudflared
-
Configure tunnel (see
cloudflared-config.yml) -
Run tunnel
cloudflared tunnel run remo-bot
-
Set webhook
python set_webhook.py set
All logs in logs/remo.log:
- Rotation: 10 MB per file
- Retention: 7 days
- Compression: zip
View live logs dalam dashboard atau check file.
β Done:
- All secrets in
.env(gitignored) - Bcrypt password hashing
- Session security (signed cookies)
- Rate limiting (bot & dashboard)
- User ID whitelist
- Webhook secret validation
- Use strong dashboard password
- Keep Cloudflare Tunnel running
- Update dependencies regularly
- Review
SECURITY.mdfor audit details
QUICKSTART.md- Simple start/stop guideHOW_TO_RUN.md- Detailed webhook setupSECURITY.md- Security audit & best practicesTROUBLESHOOTING.md- Common issuesSERVICE_INSTALL.md- Windows Service setup (optional)
PRODUCTION READY!
β
Bot working
β
Dashboard secure & responsive
β
Background mode stable
β
Auto-start ready
β
Open-source safe (no hardcoded secrets)
MIT - Free to use & modify
Made with β€οΈ for remote laptop control