使用前须自行到 my.telegram.org/apps 申请 TELEGRAM_API_ID 和 TELEGRAM_API_HASH;首次启动需在 15 分钟内用一次性 bootstrap 码从本机或同一内网创建首个管理员,之后才能暴露服务;默认映射端口为 6543,反向代理需保留 X-Real-IP、X-Forwarded-Host、X-Forwarded-Proto 头。
telegram-files
jarvis2fMIT活跃维护自托管的 Telegram 文件下载器,支持持续、稳定、无人值守地批量下载文件,适合在 Docker 或 Unraid 上长期挂机运行。
A self-hosted Telegram file downloader for continuous, stable, and unattended downloads.
curl -fsSL https://raw.githubusercontent.com/jarvis2f/telegram-files/main/scripts/deploy.sh | bashREADME 未说明具体硬件要求,仅要求 Docker 容器运行时;官方部署脚本支持 Linux amd64/arm64。
自托管 Telegram 文件下载器,支持持续稳定无人值守地批量下载频道和群组文件
自托管的 Telegram 文件下载器,支持持续、稳定、无人值守地批量下载文件,适合在 Docker 或 Unraid 上长期挂机运行。
核心能力
- 支持多 Telegram 账号同时管理与下载文件
- 下载可随时暂停恢复并自动转存到指定目标
- 支持从 Telegram 分享链接直接抓取文件
- 提供视频图片即时预览与 PWA 离线访问
- 按设定规则自动下载并生成下载统计报告
容易踩的坑
- 0.4.0最新正式版2026-08-26 · 2026-08-26 14:41 UTC
What's Changed
- Added the new Tele-Seed sharing integration, allowing Telegram Files to publish resources to the Tele-Seed network: https://tele-seed.com/
- Added private torrent publishing, Seed node identity, heartbeat, task polling, resource publication policy, qBittorrent control, and sharing statistics reporting.
- Added the
telegram-seed-v1contract artifacts for coordinator integration, including OpenAPI, JSON Schema, fixtures, state machines, and error codes. - Added Docker deployment and management scripts, plus updated multi-architecture image publishing.
- Upgraded TDLib to
1.8.66and refreshed Linux amd64, Linux arm64, and macOS Apple Silicon native libraries. - Improved the file drawer, tag editing, mobile file details, delete confirmation flow, and Telegram client idle resource handling.
Notes
- Back up your database and data directory before upgrading, especially if you plan to enable Tele-Seed sharing.
- Full release record: https://tele-seed.com/versions
Full Changelog: https://github.com/jarvis2f/telegram-files/compare/0.3.1...0.4.0
- 0.3.12026-06-16 · 2026-06-16 02:53 UTC
查看更新说明
What's Changed
- Fixed passkey-enabled Telegram account login and tightened the authorization lifecycle handling.
- Added crisp eager thumbnail previews before full media download.
- Prevented internal thumbnail files from entering the transfer queue.
- Added an optional transfer setting to append post captions to destination file names.
- Added TDLib connection-state reporting and more resilient WebSocket reconnect behavior.
Notes
- The caption-based file name option is opt-in and existing transfer behavior is unchanged by default.
- Docker images are published from this release as
0.3.1andlatest.
Full Changelog: https://github.com/jarvis2f/telegram-files/compare/0.3.0...0.3.1
- 0.3.02025-12-26 · 2025-12-26 08:05 UTC
查看更新说明
Release 0.3.0 Green Lezard
🎉 New Features & Improvements
Before using, you need to set your
OPENAI_API_KEYas an environment variable.- Drawer Component Enhancements – background scaling & scroll restoration (9db06a0)
- Filter Expressions for better filtering of files that need to be downloaded (df5044d)
- Download Speed Units Setting (4fc15ef)
- Improved Chat Message Handling & Logging (001a37b)
- Bug fixes: Telegram deletion logic, Drawer repositioning, GetMessageThread parameter, log levels (700501e, 55733db, 6758aee, c0e0a44)
- CI & Docker updates: JDK 23, Alpine 3.18.12, tdlib 1.8.58 (9f975b4, 4c01d4c, 7e289e7)
Full Changelog: https://github.com/jarvis2f/telegram-files/compare/0.2.5...0.3.0
- 0.2.52025-11-28 · 2025-11-28 09:31 UTC
查看更新说明
What's Changed
- fix: selection of files to add to transfer queue by @aniro in https://github.com/jarvis2f/telegram-files/pull/104
- Fix multiple files remove by @vldF in https://github.com/jarvis2f/telegram-files/pull/109
New Contributors
- @aniro made their first contribution in https://github.com/jarvis2f/telegram-files/pull/104
- @vldF made their first contribution in https://github.com/jarvis2f/telegram-files/pull/109
Full Changelog: https://github.com/jarvis2f/telegram-files/compare/0.2.4...0.2.5
- 0.2.42025-07-22 · 2025-07-22 02:00 UTC
查看更新说明
📦 Changelog
🚀 Features
-
Support for MTProto Proxy Type Added support for MTProto proxy in TelegramVerticle and UI components.
9ce9aea -
Reaction Count for File Records Added a reaction count display for files and updated related logic.
90f44aa -
Safe Bottom Wrapper for Mobile Introduced
SafeBottomWrappercomponent to provide safe-area padding on mobile devices.6a74784 -
Batch Update Tags in File Management Implemented batch tag update functionality in the file management module.
d376715 -
Accordion UI for File Info Introduced accordion-style UI for file info display and adjusted related styles.
4fee2c4 -
Video Playback Enhancements Added loading indicators and error handling for video playback.
017bdd6
🐛 Bug Fixes
-
Size Filter Enhancements Improved
SizeFilterto supportsizeUnitprop and handle unit changes correctly.df13fe4 -
File Deletion and Retrieval Logic Fixes Used
uniqueIdfor identifying files and improved file deletion handling.27761d7 -
Media Count Accuracy Fixed incorrect media count calculation for photos and videos in repository logic.
d5c0f0c
Full Changelog: https://github.com/jarvis2f/telegram-files/compare/0.2.3...0.2.4
-
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
🔗 Table of Contents
- 📍 Overview
- 🧩 Screenshots
- 🚀 Getting Started
- ⌨️ Development
- 📌 Project Roadmap
- 🔰 Contributing
- 🎗 License
- 🆗 FAQs
📍 Overview
- Seamless file downloads from Telegram channels and groups
- Support for multiple Telegram accounts to manage and download files simultaneously
- Pause and resume downloads anytime, with automatic file transfer to designated destinations
- Instant preview of downloaded videos and images
- Fully responsive design with mobile-friendly access, Progressive Web App (PWA) support, and offline capabilities
- Easily fetch files from Telegram shared links
🧩 Screenshots
🚀 Getting Started
Before getting started with telegram-files, you should apply a telegram api id and hash. You can apply for it on the Telegram API page.
⚡ Docker Script (Recommended)
Run the interactive script to install, configure, stop, or update telegram-files (Supported OS: Linux amd64/arm64):
curl -fsSL https://raw.githubusercontent.com/jarvis2f/telegram-files/main/scripts/deploy.sh | bash
You can also run subcommands directly:
./scripts/deploy.sh start # Install & start service
./scripts/deploy.sh stop # Stop service
./scripts/deploy.sh update # Pull latest image & restart
./scripts/deploy.sh restart # Restart service
./scripts/deploy.sh status # Check container status
./scripts/deploy.sh logs # View live logs
./scripts/deploy.sh config # Modify environment configuration
docker run -d \
--name telegram-files \
--restart always \
-e APP_ENV=${APP_ENV:-prod} \
-e APP_ROOT=${APP_ROOT:-/app/data} \
-e HTTP_SECURE_COOKIES=${HTTP_SECURE_COOKIES:-false} \
-e TELEGRAM_API_ID=${TELEGRAM_API_ID} \
-e TELEGRAM_API_HASH=${TELEGRAM_API_HASH} \
-p 6543:80 \
-v ./data:/app/data \
ghcr.io/jarvis2f/telegram-files:latest
Using docker-compose
Copy docker-compose.yaml and .env.example to your project directory and run the following command:
docker-compose up -d
Install on unRaid
On unRaid, install from the Community Repositories by searching for telegram-files.
Security note: Management APIs, file previews, and WebSockets require an administrator session. Use HTTPS, configure
HTTP_ALLOWED_ORIGINS, and complete the first-administrator bootstrap before exposing the service.
On the first start, the API prints a 15-minute one-time bootstrap code. Open the UI from loopback or the same private
LAN and create the first administrator before exposing the service. A reverse proxy must preserve
X-Real-IP, X-Forwarded-Host, and X-Forwarded-Proto; the bundled Nginx configuration already does this.
Password recovery is local-only and revokes every active session:
java -cp api/build/libs/telegram-files.jar telegram.files.Maintain admin reset-password owner
java -cp api/build/libs/telegram-files.jar telegram.files.Maintain admin apply-reset owner
⌨️ Development
☑️ Prerequisites
Before getting started with telegram-files, ensure your runtime environment meets the following requirements:
- Programming Language: JDK23,TypeScript
- Package Manager: Gradle,Npm
- Container Runtime: Docker
⚙️ Installation
Install telegram-files using one of the following methods:
Build from source:
- Clone the telegram-files repository:
git clone https://github.com/jarvis2f/telegram-files
- Navigate to the project directory:
cd telegram-files
- Install the project dependencies:
cd web
npm install
cd api
gradle build
docker build -t jarvis2f/telegram-files .
📌 Project Roadmap
- ✅
Task 1: Automatically download files based on set rules. - ✅
Task 2: Download statistics and reports. - ✅
Task 3: Improve Telegram’s login functionality. - ✅
Task 4: Support auto transfer files to other destinations. - ✅
Task 5: File table is optimized using virtual lists. - ✅
Task 6: Preload file information to support responsible searches.
🔰 Contributing
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests
for the
telegram-filesproject. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/jarvis2f/telegram-files - Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x - Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.' - Push to github: Push the changes to your forked repository.
git push origin new-feature-x - Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
🎗 License
This project is protected under the MIT License. For more details, refer to the LICENSE file.
🆗 FAQs
Q. Web's spoiler is static, how to solve it?
A. 1. Because CSS Houdini Paint API is not supported by all browsers. 2. It is only supported on https.
Open the chrome://flags page, search for Insecure origins treated as secure, and add the address of the web page to
the list.
Q. How to use the telegram-files maintenance tool?
A. You can use the following command to run the maintenance tool(before running the command, you should stop telegram-files container):
docker run --rm \
--entrypoint tfm \
-v $(pwd)/data:/app/data \
-e APP_ROOT=${APP_ROOT:-/app/data} \
-e TELEGRAM_API_ID=${TELEGRAM_API_ID} \
-e TELEGRAM_API_HASH=${TELEGRAM_API_HASH} \
ghcr.io/jarvis2f/telegram-files:latest ${Maintenance Command}
Maintenance Command:
album-caption: Fixed issue with missing caption for album messages before0.1.15.thumbnail: Fixed issue with missing clear thumbnail.admin reset-password <username>: Issue a one-time local administrator recovery code and revoke active sessions.admin apply-reset <username>: Apply the recovery code and set a new administrator password interactively.