Rcmltb
An rclone telegram bot to mirror-leech and copy between many cloud servers
Install / Use
/learn @Sam-Max/RcmltbREADME
An Rclone Mirror-Leech Telegram Bot to transfer to and from many clouds. Based on mirror-leech-telegram-bot with rclone support added, and other features and changes from base code.
NOTE: Base repository added recently its own rclone implementation.
Features:
Rclone
- Copy file/folder from cloud to cloud
- Leech file/folder from cloud to Telegram
- Mirror Link/Torrent/Magnets/Mega/Telegram-Files to cloud
- Mirror from Telegram to multiple clouds at the same time
- Telegram Navigation Button Menus to interact with cloud
- File Manager: size, mkdir, delete, dedupe and rename
- Service Accounts support with automatic switching
- Create cloud index as http or webdav webserver
- Sync between clouds (not folders)
- Search files on cloud
- Clean cloud trash
- View cloud storage info
Others
- Send rclone config file from bot
- Renaming menu for Telegram files
- Index support (rclone index for all remotes)
- Search tmdb titles
- Mirror and Leech files in batch from Telegram private/restricted channels
- Mirror and Leech links in batch from .txt file
- Extract and zip link/file from Telegram to cloud
- Extract and zip folder/file from cloud to Telegram
- Mirror to local host (no cloud upload)
- Queue system for all Tasks.
- Debrid Manager (only real debrid support)
- Refactor of the whole code to use only pyrogram with asyncio
- Docker based image based on ubuntu
- Compatible with linux
amd64, arm64/v8, arm/v7
Commands for bot(set through @BotFather)
mirror - or /m Mirror to selected cloud
mirror_batch - or /mb Mirror Telegram files/links in batch to cloud
mirror_select - or /ms Select a fixed cloud/folder for mirror
leech - or /l Leech from cloud/link to Telegram
leech_batch - or /lb Leech Telegram files/links in batch to Telegram
ytdl - or /y Mirror ytdlp supported link
ytdl_leech - or /yl Leech yt-dlp supported link
files - or /bf Bot configuration files
debrid - Debrid Manager
rcfm - Rclone File Manager
copy - Copy from cloud to cloud
clone - Clone gdrive link file/folder
count - count file/folder fom gdrive link
user_setting - User settings
own_setting - Owner settings
rss - Rss feed
tmdb - Search titles
cleanup - Clean cloud trash
cancel_all - Cancel all tasks
storage - Cloud details
serve - Serve cloud as web index
sync - Sync two clouds
torrsch - Search for torrents
status - Status message of tasks
stats - Bot stats
shell - Run cmds in shell
log - Bot log
ip - show ip
ping - Ping bot
restart - Restart bot
How to deploy?
- Installing requirements
- Clone repo:
git clone https://github.com/Sam-Max/rcmltb rcmltb/ && cd rcmltb
- For Debian based distros
sudo apt install python3 python3-pip
Install Docker by following the official Docker docs
- For Arch and it's derivatives:
sudo pacman -S docker python
- Install dependencies for running setup scripts:
pip3 install -r requirements-cli.txt
- Set up config file
-
cp config_sample.env config.env
-
Fill up the fields on the config.env: NOTE: All values must be filled between quotes, even if it's
Int,BoolorList.
1. Mandatory Fields
API_ID: get this from https://my.telegram.org.IntAPI_HASH: get this from https://my.telegram.org.StrBOT_TOKEN: The Telegram Bot Token (get from @BotFather).StrOWNER_ID: your Telegram User ID (not username) of the owner of the bot.Int
2. Optional Fields
DOWNLOAD_DIR: The path to the local folder where the downloads will go.StrSUDO_USERS: Fill user_id of users whom you want to give sudo permission separated by spaces.StrALLOWED_CHATS: list of IDs of allowed chats who can use this bot separated by spacesStrAUTO_MIRROR: For auto mirroring files sent to the bot. NOTE: If you add bot to group(not channel), you can also use this feature. Default isFalse.BoolDATABASE_URL: Your Mongo Database URL (Connection string). Data will be saved in Database (auth and sudo users, owner and user setting, etc). NOTE: You can always edit all settings saved in database from mongodb site -> (browse collections).StrCMD_INDEX: index number that will be added at the end of all commands.StrGD_INDEX_URL: Refer to https://gitlab.com/ParveenBhadooOfficial/Google-Drive-Index.StrVIEW_LINK: View Link button to open file Google Drive Index Link in browser instead of direct download link, you can figure out if it's compatible with your Index code or not, open any video from you Index and check if its URL ends with?a=view. Compatible with BhadooIndex Code. Default isFalse.BoolSTATUS_LIMIT: No. of tasks shown in status message with buttons.IntLOCAL_MIRROR= set toTruefor enabling files to remain on host. Default to False.TORRENT_TIMEOUT: Timeout of dead torrents downloading with qBittorrentAUTO_DELETE_MESSAGE_DURATION: Interval of time (in seconds), after which the bot deletes it's message and command message. Set to-1to disable auto message deletion.IntTMDB_API_KEY: your tmdb API key. Click hereTMDB_LANGUAGE: tmdb search language. Defaulten.PARALLEL_TASKS: Number of parallel tasks for queue system.Int
Update
UPSTREAM_REPO: Your github repository link. If your repo is private, add your github repo link with format:https://username:{githubtoken}@github.com/{username}/{reponame}: get token from Github settings.Str. With this field you can update your bot from public/private repository on each restart.UPSTREAM_BRANCH: Upstream branch for update. Default ismaster.StrNOTE: If any change in docker or requirements you will need to deploy/build again with updated repo for changes to apply. DON'T delete .gitignore file.
Rclone
DEFAULT_OWNER_REMOTE: to set default remote from your rclone config for mirroring. (only for owner).StrDEFAULT_GLOBAL_REMOTE: to set default remote from global rclone config for mirroring. Use this whenMULTI_RCLONE_CONFIGisFalse.StrMULTI_RCLONE_CONFIG: set toTruefor allowing each user to use their own rclone config. Default to False.BoolREMOTE_SELECTION: set toTrueto activate selection of cloud server each time using mirror command. Default toFalse.BoolMULTI_REMOTE_UP= set toTruefor allowing upload to multiple clouds servers at the same time.Bool. (only for owner)USE_SERVICE_ACCOUNTS: set toTruefor enabling SA for rclone copy. Default to False.Bool.SERVICE_ACCOUNTS_REMOTE= name of the shared drive remote from your rclone config file.Str. Note: remote must haveteam_drivefield withidin order to work.StrSERVER_SIDE= set toTruefor enabling rclone server side copy. Default to False. NOTE: if you get errors while copy set this toFalse.BoolRCLONE_COPY_FLAGS= key:value,key. All Flags: RcloneFlags.StrRCLONE_UPLOAD_FLAGS= key:value,key.StrRCLONE_DOWNLOAD_FLAGS= key:value,key.StrRC_INDEX_URL: Public IP/domain where bot is running. Format of URL must be: http://myip, where myip is the Public IP/Domain.StrRC_INDEX_PORT: Port to use. Default to8080.StrRC_INDEX_USER: Custom user. Default toadmin.StrRC_INDEX_PASS: Custom password. Default toadmin.Str
GDrive Tools
GDRIVE_FOLDER_ID: Folder/TeamDrive ID of the Google Drive Folder orrootto which you want to clone. Required forGoogle Drive.IntIS_TEAM_DRIVE: SetTrueif TeamDrive. Default isFalse.BoolEXTENSION_FILTER: File extensions that won't clone. Separate them by space.StrNotes: Must add token.pickle file directly to root for cloning to work. You can use /files command to add from bot.
Leech
LEECH_SPLIT_SIZE: Telegram upload limit in bytes, to automatically slice the file bigger that this size into small parts to upload to Telegram. Default is2GBfor non premium account or4GBif your account is premium.IntEQUAL_SPLITS: Split files larger than LEECH_SPLIT_SIZE into equal parts size (not working with zip cmd). Default isFalse.BoolUSER_SESSION_STRING: Pyrogram session string for batch commands and for telegram premium upload. To generate string session use this commandpython3 session_generator.pyon command line on your pc from repository folder. NOTE: When using string session, you have to use withLEECH_LOG. You can also use batch commands without string session, but you can't save messages from private/restricted telegram channels.StrLEECH_LOG: Chat ID. Upload files to specific chat/chats. Add chats separated by spaces.StrNOTE: Only available for superGroup/channel. Add-100before channel/supergroup id. Add bot in that channel/group as admin if using without string session.BOT_PM: set toTrueif you want to send leeched files in user's PM. Default to False.Bool
MEGA
MEGA_EMAIL: E-Mail used to sign up on mega.nz for using premium account.StrMEGA_PASSWORD: Password for mega.nz account.Str
RSS
RSS_DELAY: Time in seconds for rss refresh interval. Default is900in sec.IntRSS_CHAT_ID: Chat ID where rss links will be sent. If you want message to be sent to the channel then add channel id. Add-100before channel id.Int- RSS NOTE:
RSS_CHAT_IDis required, otherwise monitor will not work. You must useUSER_STRING_SESSION--OR-- CHANNEL. If using channel then bot should be added in both channel and group(linked to channel) andRSS_CHAT_IDis the channel id, so message
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
96.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
344.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
