Open-source project
anasty17/mirror-leech-telegram-bot avatar
anasty17/mirror-leech-telegram-bot

Mirror Leecher Telegram Bot: torrents, sites and clouds through one queue

Official Repository: Telegram bot which can download direct links, torrents, nzb, google drive, telegram document, any file/folder from rclone supported clouds, all yt-dlp supported sites and jdownloader supported sites, then upload them to google drive, telegram cloud or to one of rclone supported clouds

4,365 stars5,135 forksPythonGPL-3.0

At a glance

What is it?
Mirror Leecher Telegram Bot puts qBittorrent, aria2c, Sabnzbd, yt-dlp, gallery-dl, JDownloader, Google Drive and rclone behind Telegram messages. Its option model, not its feature list, is the part worth reading closely.
Who is it for?
Mirror Leecher Telegram Bot fits an operator who already runs qBittorrent, aria2c or JDownloader, already owns the cloud accounts, and wants one Telegram surface over all of them. The option scoping is the real design: global defaults, per user overrides, per task overrides, applied to split size, upload type and destination chat alike.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 10 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • anasty17/mirror-leech-telegram-bot4,365 ★ · +56
Star history
Repository2026-09-232026-11-15
anasty17/mirror-leech-telegram-bot4.3k4.4k

56 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The bot queues work for aria2c, qBittorrent and Sabnzbd

The service wraps torrent clients, site downloaders and cloud transfer tools behind Telegram messages, and 3 backends handle torrents and usenet. qBittorrent and aria2c each accept a per task file selection, and both of those selectors need a Base URL before the buttons work. Both can seed to a chosen ratio and for a chosen length of time. qBittorrent exposes its webui so files can be removed and settings edited, then pushed into the bot database with the sync button inside bsetting. aria2c reaches the same ground a different way: netrc support as a global option, plus direct link authentication entered per task that still works when only the username or only the password is supplied. Sabnzbd manages usenet through its own servers menu, removes files from a job before and during the download, and syncs its web interface settings the same way qBittorrent does. All three accept global option edits from bot settings while the process keeps running, so a ratio or a path can change without a restart.

Telegram transfers are scoped global, user and task

The Telegram side is where option scope becomes visible, because the same control is written down at 3 levels for several features. Split size is the clearest case, present globally, per user and per task, and the same triple applies to uploading as a document or as media, and to the destination chat. That destination can be a supergroup, a channel, a private chat or a topic, which is why topics support gets its own line in the list. A leech filename prefix is a user option only. Equal split size, and the option to leech split file parts inside a single media group, stop at global and user level. Two controls depend on a premium plan: choosing whether the bot session or a user session moves the file, and mixing the two by file size so small and large files travel different routes. Downloads can reach restricted messages by private, public or super link, and an upload can carry a custom layout with multiple thumbnails.

Google Drive work needs token.pickle, a service account, or both

Google Drive works as both source and destination: download, upload, clone, delete and count, with a separate count of files and folders. Search reaches several Drive folders and TeamDrives at once. Credentials come in 2 shapes, and the fallback between them is stated plainly. When a Service Account cannot see a file, Token.pickle is used for every Drive function. A Service Account can also be chosen at random for each task, so one account does not carry every transfer. Duplicates can be stopped at global and user level, and upload destinations can be picked from a list with or without buttons. Recursive search is the sharpest constraint in this block: it runs only against root or a TeamDrive ID, and a folder ID is listed the non recursive way instead. Index links work for one named implementation only, Bhadoo.

rclone remotes turn the bot into a remote copy tool

rclone covers download, upload and server side clone, and each of the three can run with or without random service accounts. The bot can pick the config, the remote and the path from a list, and rclone flags can be set per task or globally. Files and folders can be selected for a download or a copy with buttons. Rclone.conf is a global and user option, and one global option uses rclone serve to combine remotes so they can be used as an index from all remotes. The repository layout says how much lives next to the bot code: top level directories named bot, web, myjd, sabnzbd and qBittorrent sit beside standalone scripts such as update.py, driveid.py and gen_sa_accounts.py.

The Dockerfile inherits a prebuilt image and installs again

The build does not start from a clean Python base. The first line pulls a published image and pins nothing, so everything below runs on top of whatever that tag currently holds. The container creates a virtual environment under /app, copies requirements.txt into /app, installs it into the virtual environment with --no-cache-dir, then copies the entire context over the top. The shell scripts are rewritten to drop carriage returns and the entry point is start.sh.

code
FROM anasty17/mltb:latest

WORKDIR /app
RUN chmod 777 /app

RUN python3 -m venv mltbenv

COPY requirements.txt .
RUN mltbenv/bin/pip install --no-cache-dir -r requirements.txt

COPY . .

RUN sed -i 's/\r$//' *.sh

CMD ["bash", "start.sh"]

Two details deserve a second look. /app is made world writable with chmod 777 before anything is copied. And the compose file, shorter than the Dockerfile, declares 1 service on host networking with a restart policy, yet no database, no volume and no environment section, even though pymongo sits in requirements.txt and every setting, user file and feed record is meant to live in Mongo. You supply that database yourself.

Status pages split by transfer type past thirty tasks

Each transfer type carries its own status: download, upload, extract, archive, seed and clone. Pages hold an unlimited number of tasks, but how many appear in one message is a global option, so the ceiling is your choice rather than a hard limit. Interval message updates refresh rows on a timer, and next and previous buttons walk between pages. Once a given status holds more than 30 tasks, status buttons appear and filter by transfer type, which is the point where a flat list stops being readable. Steps buttons set how far those next and previous buttons jump. The whole arrangement is available globally and per user, and per user status carries no auto refresh. That last detail decides how you watch a long queue, because the text stays still until somebody presses something.

Options load from config.py first and from Mongo afterwards

Configuration follows a two source rule that is easy to misread. On the first build, and again whenever config.py changes, the bot stores that file, and on the next build it defines its variables from config.py instead of the database. The file therefore wins after an edit, and the database carries state in between. The tree provides the entry points for preparing credentials first: generate_string_session.py, generate_drive_token.py, gen_sa_accounts.py, add_to_team_drive.py and driveid.py. Alongside them sit update.py, start.sh, a pytest.ini, a tests directory and separate requirements-dev.txt and requirements-cli.txt files next to the main requirements.txt. That main list leans on protocol clients rather than build tooling: aioaria2, aioqbt, cloudscraper, dnspython, feedparser, pymongo, uvloop, xattr and gallery-dl, with yt-dlp pulled in with its default and curl-cffi extras. The repository is not archived, has no GitHub releases, and its last push landed on 2026-10-28 under a GPL-3.0 licence.

yt-dlp, gallery-dl and JDownloader inherit the option scopes

The site downloaders plug into the same 3 levels as everything else. yt-dlp gets quality buttons per task, a specific yt-dlp option at global, user and task level, netrc and cookies support, the original thumbnail embedded into the leech, and every supported audio format. gallery-dl takes custom options at the same three levels plus cookies and config files for authenticated downloads. JDownloader adds a settings sync, a waiting step that lets you enable or disable files or change variants before the download starts, DLC file support, and remote control through the web interface, the Android app, the iPhone app or browser extensions. Archives handle the output side, extracting splits with or without a password, zipping a file or folder with or without a password, and splitting during a leech, while a 7z package covers passworded extraction for every supported type. Torrent search has two paths, a Torrent Search API and variable plugins through the qBittorrent search engine. Feeds come from a separate rss-chan project with a feed per user and title filters per feed, and feeds can be paused, resumed and edited while running.

Editorial conclusion

Mirror Leecher Telegram Bot fits an operator who already runs qBittorrent, aria2c or JDownloader, already owns the cloud accounts, and wants one Telegram surface over all of them. The option scoping is the real design: global defaults, per user overrides, per task overrides, applied to split size, upload type and destination chat alike. It is the wrong tool if you do not want to supply your own Mongo database, service accounts and Drive credentials yourself. Read the build before you deploy it, because the container sits on a published base image tagged latest.

Frequently asked questions

What is a mirror leech bot?

In mirror-leech-telegram-bot it is a Python service, built with asynchronous programming, that takes links in Telegram and moves the resulting files elsewhere. It handles torrents, direct links, nzb, Google Drive documents, yt-dlp and gallery-dl sites and JDownloader jobs, and delivers to Google Drive, Telegram or any rclone supported cloud.

Is using a Telegram bot safe?

Mirror Leecher Telegram Bot is code you run yourself, and it keeps bot settings, user settings including thumbnails and private files, RSS data and JDownloader settings in your own Mongo database.

What does the Docker build of mirror-leech-telegram-bot start from?

Not from a clean Python base. The Dockerfile starts with FROM anasty17/mltb:latest, a published image tagged latest, makes /app world writable with chmod 777, creates a virtual environment, installs requirements.txt into it with --no-cache-dir and ends on bash start.sh.

Where does mirror-leech-telegram-bot keep its settings?

In Mongo, with one exception. config.py is stored on the first build and whenever it changes, and on the next build the bot defines its variables from that file instead of the database. The compose file declares only the app service, so the database is yours to provide.

Which Google Drive search modes does mirror-leech-telegram-bot support?

Recursive search works only against root or a TeamDrive ID. A folder ID is listed with a non recursive method instead. Search also covers multiple Drive folders and TeamDrives at once, and Token.pickle is used whenever a Service Account cannot find the file.

Official sources

  1. anasty17/mirror-leech-telegram-bot on GitHub
  2. Issues
  3. License: GPL-3.0
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/anasty17-mirror-leech-telegram-bot.svg)](https://hysenlabs.com/projects/anasty17-mirror-leech-telegram-bot)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/anasty17-mirror-leech-telegram-bot.svg)](https://hysenlabs.com/projects/anasty17-mirror-leech-telegram-bot)

Was this useful?