A powerful, fully automated, and secure background bot that syncs your local device files to Telegram Topics. It comes with a beautiful Web Dashboard for easy control and monitoring!
- 🌐 Web Control Panel: Manage everything from a beautiful, responsive web dashboard.
- 🗂️ Smart Routing: Automatically send Images to one topic and Videos to another topic from the same folder.
- 🗑️ Auto-Delete (Danger Zone): Automatically delete files from local storage after a successful upload to save phone memory.
- 🖥️ Live Console: Watch live terminal logs directly from your browser.
- 🔍 Full History & Search: Infinite scroll history with instant search functionality.
- 🔒 Secure Access: PIN-protected dashboard to ensure privacy on your network.
Before starting, you need your API credentials from Telegram:
- Go to my.telegram.org and log in with your phone number.
- Click on "API development tools".
- Fill in the basic details (App title, short name) and click "Create application".
- Save your App api_id and App api_hash safely.
Open Termux and run the following commands:
pkg update && pkg upgrade -y
pkg install python git rust binutils clang make libffi openssl -y
git clone [https://github.com/ambakhtiar/Telegram-File-Uploading-Bot](https://github.com/ambakhtiar/Telegram-File-Uploading-Bot)
cd Telegram-File-Uploading-Bot
pip install telethon fastapi uvicorn pydantic python-dotenv
# To boost upload speed, install cryptg (Takes a few minutes):
pip install cryptg
Create a .env file and add your credentials:
nano .env
Paste the following and replace with your data:
API_ID=your_api_id_here
API_HASH=your_api_hash_here
GROUP_ID=-100xxxxxxxxxx
DASHBOARD_PIN=1234
(Press CTRL + O, Enter to save, and CTRL + X to exit.)
You need to run two processes. You can do this by opening two separate sessions (tabs) in Termux.
python bot.py
(The first time you run this, it will ask for your Telegram phone number and OTP to authenticate).
uvicorn api:app --host 0.0.0.0 --port 8000
- Open your browser and go to http://localhost:8000 (or your phone's local IP, e.g., http://192.168.0.x:8000).
- Enter the PIN you set in the .env file.
- In the "Smart Folders" section:
- Enter a folder path (e.g., /sdcard/DCIM/Camera).
- Select the file type (e.g., Images Only).
- Enter the Telegram Topic ID.
- Click Add Rule and watch the magic happen! The bot will instantly queue the files and start uploading.
This project is for personal use and educational purposes. Use it responsibly.