A high-performance, automated daemon for Linux that turns a Telegram Group into unlimited, organized cloud storage.
Unlike standard bots, this tool uses a real User Client (MTProto) with Custom Parallel Uploading, allowing it to maximize your internet bandwidth (tested: 12MB file in 6 seconds).
- ⚡ Turbo Speed: Uses custom multi-threaded workers (4 parallel connections) to bypass single-thread speed limits.
- 📂 Folder-to-Topic Mapping: Drops a file in
~/Storage/Personal-> Uploads to the "Personal" Topic in Telegram. - 🛡️ Smart Stability: Waits for file copying to finish before touching the file.
- 🔄 Auto-Retry: Handles internet dropouts and Telegram "FloodWait" errors automatically.
- 🧹 Zero-Trace: Deletes the local file immediately after a successful upload to save disk space.
- 📝 Robust Logging: Keeps a detailed log of all transfers in
telegram_upload.log.
To enable the high-speed cryptographic engine (cryptg) and fast event loop (uvloop), you must install system build tools before installing the Python libraries.
Ubuntu / Debian / Linux Mint / Kali / Pop!_OS:
sudo apt update
sudo apt install python3-pip python3-dev build-essentialFedora / RHEL / CentOS:
sudo dnf groupinstall "Development Tools"
sudo dnf install python3-devel gccArch Linux / Manjaro:
sudo pacman -S base-devel python-pipRun this command on all systems:
pip3 install telethon watchdog hachoir cryptg uvlooptelethon: The Telegram client.watchdog: To monitor folders for new files.cryptg: (Critical) C-accelerated encryption for speed.uvloop: (Critical) Ultra-fast event loop replacement.
- Open
telegram_sync.pyin your text editor. - Edit the CONFIGURATION section at the top:
API_ID = 12345678 # From my.telegram.org
API_HASH = 'your_hash_here' # From my.telegram.org
TARGET_GROUP_ID = -100xxxxxxxx # Your Private Group ID
BASE_STORAGE_DIR = "/home/user/Storage" # Absolute path to monitorThe script uses a simple dictionary to map Folder Names to Topic IDs.
- Create the folder on your computer inside your storage directory (e.g.,
Movies). - Go to your Telegram Group, right-click the Topic you want to link, and copy its link (e.g.,
https://t.me/c/123456789/55). - The number at the end (
55) is your Topic ID. - Add it to the
TOPIC_MAPPINGlist in the script:
TOPIC_MAPPING = {
"Personal": 2, # Existing Topic
"Development": 44, # Existing Topic
"Movies": 55, # <--- NEW ADDITION
"Backups": 102 # <--- NEW ADDITION
}Note: Folder names are case-sensitive!
Run the script manually once to authenticate with Telegram.
python3 telegram_sync.py- Enter your phone number and OTP code.
- Check the output: It should say
🚀 SPEED BOOST: ACTIVE. If it says "Warning", check your prerequisites. - Press
Ctrl+Cto stop it.
To make it run automatically on boot:
-
Create the service file:
sudo nano /etc/systemd/system/telegram-uploader.service
-
Paste this configuration (Change
Userandpathsto match your system):[Unit] Description=Telegram Turbo Uploader After=network-online.target [Service] User=yourusername Group=yourusername WorkingDirectory=/home/yourusername/scripts/ ExecStart=/usr/bin/python3 /home/yourusername/scripts/telegram_sync.py Restart=always RestartSec=10 Environment=PYTHONUNBUFFERED=1 [Install] WantedBy=multi-user.target
-
Enable and Start:
sudo systemctl daemon-reload sudo systemctl enable telegram-uploader.service sudo systemctl start telegram-uploader.service
How do I check if it's running?
sudo systemctl status telegram-uploader.serviceHow do I see the logs?
tail -f ~/scripts/telegram_upload.logIt says "Unit telegram-uploader.service not found"
This means you skipped Step 2 above. You must create the .service file in /etc/systemd/system/ before you can start it.