Files
tg-vault/README_EN.md
T

6.8 KiB

简体中文 | English

TG Vault Logo

TG Vault

Telegram File Transfer & Archive

A Telegram-based file transfer, media archiving and multi-storage file management system for individuals and small teams.

Quick Start · Features · Bot Commands · Deployment Guide

Latest Release License Stars Forks

Telegram Bot Docker Compose React TypeScript PostgreSQL 16

Save files from Telegram private chats, channels or groups, then browse and manage them in the web UI. Supports local disk, OneDrive, Google Drive, OSS, S3 and WebDAV.


✨ Features

  • File management: Upload, preview and organize folders; manage archives right in the browser.
  • Telegram transfer: Send files to the Bot, or batch-save media from channels and groups.
  • Subscription sync: Subscribe to channels and automatically save future updates.
  • Multiple storage backends: Local disk, OneDrive, Google Drive, OSS, S3 and WebDAV.
  • Automatic archiving: Organize files by source, channel and file type.
  • Access protection: Admin login, Bot user permissions and two-factor authentication.

🚀 Quick Start (Docker Compose)

You will need a Linux server and two domain names — one for the web UI and one for the API.

1. Clone the project

git clone https://github.com/hicocos/tg-vault.git
cd tg-vault

2. Run the one-click script

./deploy/install.sh

Follow the prompts to check the environment and fill in the web and API addresses, then confirm to start the installation.

3. Get started

Set up HTTPS for both domains as described in the deployment guide, then open the web page and create your admin account.

Go to Settings → Telegram to connect a Bot. If you need channel transfers or subscription sync, also log in with your Telegram account. Other storage backends can be added under Settings → Storage.

View the full deployment guide · Telegram configuration guide

Note: The deployment and configuration docs are currently available in Chinese only.


🧭 Telegram Bot Commands

After connecting the Bot, send /start to begin and /help to view the help message.

Command Purpose
/list View recent files
/tasks View and manage tasks
/storage View storage status
/path_rules Set the save location
/tg_download Open the channel/group download wizard
/tg_sub Add a channel subscription
/tg_subs View subscriptions

Channel downloads and subscriptions require logging in with a Telegram account that has access to them.

More commands
  • File management: /delete <ID prefix of at least 8 characters> deletes a file; /setup_2fa sets up two-factor authentication.
  • Task control: /task_pause [task ID], /task_resume [task ID], /task_cancel <task ID or all>, /stop_tasks.
  • Save directory: /p <directory> applies to the next download only; /ps <directory> applies to the current session; /pc clears the custom directory.
  • Batch downloads: /tg_download date <channel> <start date> <end date>, /tg_download tag <channel> <#tag>.
  • Subscriptions & retries: /tg_unsub <channel or subscription ID prefix> cancels a subscription; /tg_retry [count] [task ID] retries failed tasks.
  • Download settings: /download_workers, /file_concurrency, /duplicate_mode, /cleanup_settings.

🔄 Maintenance & Updates

Go to your TG Vault project directory and run the one-click upgrade script:

./deploy/install.sh

📚 Documentation


📂 Project Structure

TG Vault/
├── frontend/           # React web frontend
├── backend/            # Node.js API and Telegram service
├── init.sql            # Database initialization script
├── docker-compose.yml  # Docker Compose deployment configuration
├── .env.example        # Environment variable template
└── LICENSE             # MIT License

📄 License

Open-sourced under the MIT License.

Author: hicocos · Repository: hicocos/tg-vault


📊 Project Data