Skip to content
Projects

About

Telegram 转存、媒体归档与多存储源私有云系统

Design & Media

How these counts are measured

Measured star growth

in 24h
+1
in 7 days
+9
in 15 days
+24
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
TG Vault Logo

TG Vault

Self-Hosted Telegram Multi-Account File Transfer, Channel Subscription & Multi-Cloud Archiving Platform

Release Documentation Docker MCP Ready License

简体中文 · English

Documentation · Quick Start · Storage Backends · Bot Commands · Changelog · Releases

✨ Key Features

Module Capabilities
👥 Multi‑Account Connect multiple Telegram user accounts via QR code or phone login; automatically routes downloads based on source access, cooldown status, and weighted least-connections scheduling.
📡 Channel Sync Batch download channel/group history by date range or hashtag, or set up recurring subscriptions for new media with built-in file type and ad filtering.
🤖 Bot & Tasks Forward files or media groups directly to your Bot; monitor live progress, speed, and failure details across Web and Bot with pause, resume, and retry controls.
🗂️ Web Manager Resumable chunked uploads, full-text search, favorites, folder organization, streaming audio/video playback, and inline image previews.
☁️ 7 Storages Native support for Local Disk, OneDrive, Google Drive, S3 / Cloudflare R2, Aliyun OSS, WebDAV, and OpenList, with multi-account management and per-task target routing.
🔌 MCP & BT Built-in MCP Server (Streamable HTTP & stdio) for AI agents (Claude, Codex, Rikka) to search, read, and archive files; optional qBittorrent integration for post-download cloud transfers.
🔐 Security & i18n Admin password, TOTP 2FA, Bot user allowlist, encrypted credential storage, and full UI/Bot localization in Simplified Chinese, English, and Russian.

🧩 Workflow Architecture

Stage Pipeline
1. Ingress Telegram: Bot private forwards · Channel batch download by date/tag · Recurring subscriptions
Web & Extensions: Chunked web uploads · MCP AI Agent tool calls · qBittorrent magnet/torrent sync
2. Core Engine Multi-Account Scheduler: Source access check → Cooldown avoidance → Idle priority → Weighted least-connections
Persistent Task Queue: PostgreSQL state tracking · Media group aggregation · File/ad filtering · Resumable transfers
3. Storage 7 Storage Targets: Local Disk · OneDrive · Google Drive · S3 / R2 · Aliyun OSS · WebDAV · OpenList
Unified File Index: Cross-storage search · Streaming media preview · Folder organization · MCP text reading

🚀 Quick Start

Run the one-line command to install or update interactively:

curl -fsSL https://raw.githubusercontent.com/hicocos/tg-vault/main/install.sh | bash

The wizard automatically generates configuration, runs database migrations, and starts the services. See the deployment guide for details.

📦 Storage Backends

Add multiple storage accounts under Settings → Storage and assign targets globally, per Bot session, or per channel subscription:

Provider Protocol / Auth Highlights Guide
Local Disk Host Volume Mount Zero external dependencies, fast local I/O and direct media streaming Local Storage
OneDrive Microsoft OAuth 2.0 Personal & business accounts, resumable chunked uploads, multi-account OneDrive Guide
Google Drive Google OAuth 2.0 My Drive & Shared Drives, resumable upload sessions, trash management Google Drive Guide
S3 / Cloudflare R2 S3-Compatible API Multipart uploads for AWS S3, Cloudflare R2, MinIO, and compatible object stores S3 / R2 Guide
Aliyun OSS Aliyun OSS API Scoped RAM credentials and high-speed multipart transfers Aliyun OSS Guide
WebDAV / NAS Basic / Digest Auth Connects to Synology, QNAP, Nextcloud, and standard DAV servers WebDAV Guide
OpenList Native OpenList API Direct integration with mounted OpenList storage paths OpenList Guide

🤖 Bot Commands

Command Description
/start Authenticate and link your Telegram account
/tg_download Launch interactive channel/group history download wizard (by date or tag)
/tg_sub / /tg_subs Create a channel subscription, or inspect, pause, and resume subscriptions
/tasks View active transfers and pause, resume, cancel, or retry tasks
/target Switch the default target storage account and directory for Bot transfers
/status Check instance health, queue summary, and storage connectivity

🔌 Extensions

  • MCP for AI Agents: Exposes file search, UTF-8 text reading, chunked uploads, subscription management, and channel archiving over Streamable HTTP or local stdio with scoped Bearer tokens. See MCP Guide.
  • qBittorrent Integration: Connects to a local qBittorrent WebUI to add magnet links or .torrent files, select files, and automatically transfer completed downloads to cloud storage while optionally keeping torrents seeding. See qBittorrent Guide.

📚 Documentation

Resource Description
Online Documentation Full user guides, multi-account scheduling, storage setup, and troubleshooting
Deployment Guide Installer options, Nginx HTTPS reverse proxy, database migrations, and maintenance
Configuration Reference Environment variables, Telegram credentials, storage setup, and security settings
MCP & AI Agents Permission scopes, client setup (Codex / Rikka), and tool call examples
Local Storage Volume mounts, path verification, and data persistence
Development Guide Local development setup, database CLI, and build verification

📄 License

Released under the MIT License · hicocos/tg-vault

Explore related projects

Loading…