Skip to content
Projects

About

自托管的 Telegram 文件转存工具,支持 Linux 一键部署,通过 rclone 和 CloudDrive2/OpenList WebDAV 将文件保存到自有云存储。

Developer Tools

How these counts are measured

Measured star growth

in 24h
+1
in 7 days
+2
in 15 days
+2
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original

TG2Cloud — From Telegram to Your Cloud

Telegram file transfer · CloudDrive2 / OpenList · Linux one-line deployment

Latest release Tests MIT License

Installation · Repository docs · Releases · Documentation website · 简体中文

TG2Cloud is a self-hosted personal file transfer tool. Send or forward files to your own Telegram Bot; your Linux host queues, downloads and writes them to cloud storage mounted by you.

Telegram → TG2Cloud → rclone → CloudDrive2 / OpenList WebDAV → your cloud storage

Optional administrator monitoring and transfer plans are disabled by default, with per-source filters, naming, directories, approvals and recovery.

Features

  • Two editions share one Bot core while keeping separate configuration, databases and Sessions.
  • Persistent queues, deduplication, confirmed cancellation recovery, retained failed files and caption-based naming.
  • Regular downloads and large-file streaming with adaptive concurrency and disk protection.
  • Public HTTPS / trusted LAN deployment, storage recommendations and configuration-preserving upgrades.

Current stable version: v1.6.5, for Linux. See the release and compatibility record.

Stable maintenance and documentation consolidation. The script source, shared image and both Compose bundles have been published and verified.

Getting started

  1. Prepare your Telegram Bot, API information and server using the information checklist. Never put real credentials in public documents.
  2. Choose CloudDrive2 or OpenList and either the public VPS or trusted LAN entry. Review the wizard's installation plan before confirming.
  3. Mount cloud storage in your own gateway, then configure and verify WebDAV as described in the installation guide. You manage cloud-account authorization yourself.
  4. Send or forward files to the Bot and check its receipt. See task usage and recovery for commands, failed tasks and verification levels.

Both editions share transfer capabilities but have different gateway configuration and independent instance data. Upgrade an existing instance through its matching entry, preserving configuration; do not uninstall first.

Quick start

The public/LAN entries offer setup for a missing Edition or its maintenance menu for an existing instance. After confirming manager installation, run tg2cloud locally. Uninstall stays Edition-scoped; the v1.4.7 source retires the standalone Shell entries and retains the unified menu and CLI preview. Menu, update and cleanup boundaries are in the operations guide.

v1.4.7 provides unified management. External WebDAV provides read-only mobile access. The unified entry, tg2cloud → 15. 外部 WebDAV, handles installation and maintenance in its submenu without a separate installation command. Update existing local managers; use option 8 in the WebDAV submenu to upgrade that add-on.

Requires Debian / Ubuntu with native 64-bit userspace, root, Python 3.10+, curl and an interactive terminal, with access to GitHub, Telegram, container registries and the destination. CloudDrive2 also requires /dev/fuse.

Linux system requirements, public NAT prerequisites and platform limits are covered in the installation guide and architecture guide.

Public VPS

Prepare a domain pointing to the VPS and allow inbound TCP 80/443. Select CloudDrive2 or OpenList in the wizard:

bash <(curl -fsSL https://raw.githubusercontent.com/LuoPoJunZi/TG2Cloud/main/install.sh)

The wizard collects information, checks the environment and asks for confirmation. Business code comes only from official stable Releases. For an existing instance, first append --edition clouddrive2 --check (use openlist for OpenList). This check does not upgrade. Then rerun the entry without arguments, choose the Edition and installation/upgrade, and confirm to also install the offline manager. Explicit flags remain compatible. See the VPS guide.

Trusted LAN / NAS

Without a public domain, use the separate LAN entry and enter the host's private IPv4. The Linux requirements above still apply; not every NAS OS is supported:

bash <(curl -fsSL https://raw.githubusercontent.com/LuoPoJunZi/TG2Cloud/main/install-lan.sh)

LAN HTTP is unencrypted: do not expose it through public port forwarding or use it to bypass public HTTPS. See the LAN guide.

Uninstall preview

tg2cloud uninstall --edition all --check

The tg2cloud menu also provides removal for the selected Edition. This command only previews; it does not uninstall. Actual complete removal deletes the selected instance's data and recognized backups. To preserve data, use --keep-data; save independent backups outside the removal paths first. See the uninstall guide.

Documentation

Browse repository guides by topic; see the full index and release notes.

Topic Repository documents
Installation and configuration Public VPS installation / upgrade · LAN / NAS installation · Information checklist
Docker Compose Step-by-step deployment, setup and backups · Optional HTTPS wizard
Gateway and first transfer CloudDrive2 / OpenList configuration and verification · Bot usage, menus and commands
Naming and common questions Video, caption and album naming · FAQ
Configuration and backups Configuration fields and runtime paths · Backup scope and restore preflight
Family and mobile reading Bot family grants · Read-only external WebDAV
Optional features Classification, notifications and quotas · Existing Nginx reuse
Operation and troubleshooting Management commands, logs and HTTPS maintenance · Task recovery, verification and backup
Current maintenance v1.6.5 release and compatibility · published version history
Uninstall Uninstall guide
Development and tests Contributing · Repository structure · Linux development and tests
Versions and releases Complete version history · Current release notes
Branding and components Brand guide · Third-party components

Boundaries

  • Transfer only content you are authorized to save. Monitoring requires explicit administrator authorization; content protection is respected. 115 is an example, not the only destination.
  • Cloud authentication stays in your own CloudDrive2 / OpenList instance. TG2Cloud has no telemetry or credential callback.
  • WebDAV size verification is not a content hash or an official cloud-provider completion result. Verify important files independently.
  • Never publish tokens, passwords, Sessions, databases, configuration or backups. Back up before upgrading; do not overwrite an instance with an unknown identity. See Security.

Acknowledgements and Project Origin

LuoPoJunZi
LuoPoJunZi

TG2Cloud maintainer
whyhhh20
whyhhh20

Original author of upstream TG115

Thanks to whyhhh20 for creating and publishing the upstream TG115 project.

TG2Cloud evolved from that project, retains the MIT license, original copyright, and required attribution, and continues to improve the reliability, deployment safety, and operational experience of the Telegram → rclone → CloudDrive2/OpenList → user-owned-cloud path.

Thanks also to Telethon, rclone, Docker, and the other open-source projects involved, and to CloudDrive2 for its WebDAV and cloud-mount features. Each third-party component remains subject to its own license and terms.

License and Disclaimer

This project is licensed under the MIT License.

TG2Cloud is not affiliated with, authorized by, or officially partnered with Telegram, CloudDrive2, OpenList, any cloud-storage provider, or their operators. Users are responsible for evaluating account, data, network, VPS privilege, and third-party closed-source component risks.

Explore related projects

Loading…