sangketkit01 / telegram-drive
git clone https://github.com/sangketkit01/telegram-drive.git
β
β
stars, 24h
+33
stars, 7 days Β· #1,229
+33
stars, 30 days Β· #8,314
33
β
total Β· +33% this week
11
forks Β· 0 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageVue
Licenseβ
Created2026-10-15 (5d ago)
Last push5d ago
Watchers0
OwnerUser
Links
README excerpt
# π¦ Telegram Cloud Drive > **High-performance, self-hosted personal cloud storage backed by Telegram's unlimited MTProto infrastructure, featuring a Google Drive-parity web UI.** --- ## π Key Features * **π¨ Google Drive UI Parity:** Complete folder tree navigation, breadcrumbs with context actions, drag-and-drop file organization, starred items, and soft-delete trash. * **β‘ Persistent Telegram MTProto Engine:** Direct binary document streaming via Telethon with a persistent warm connection (no Bot API 50MB file size limits). * **π§© Chunk Size Optimization:** Tune chunk sizes (`4 MB` to `32 MB+`) directly via `.env` according to your server RAM and network speed, strictly constrained within Telegram MTProto policy (up to 2,000 MB per chunk). * **β© RFC 9110 HTTP 206 Range Streaming:** Instant seeking and scrubbing for video, audio, and PDF preview without storing intermediate chunks on server disk. * **π Sharing & Permissions:** Granular Viewer/Editor roles, shareable links with optional password protection and expiration dates. * **π Global Instant Search:** Fast recursive search across folders with file path location metadata. --- ## β οΈ Important Disclaimer This project is **100% self-hosted open-source software**. * We do **NOT** operate, host, or provide a free public cloud service. * Users must supply their own Telegram account credentials (`api_id`, `api_hash`, `session_string`) and host their own instance. * Please abide by Telegram's Terms of Service. --- ## π Quick Start (Docker Compose) Deploy a complete stack (PostgreSQL + Django API + Vue 3 Frontend) in under 3 minutes: ### 1. Prerequisites * Docker & Docker Compose * A Telegram Account * `TELEGRAM_API_ID` & `TELEGRAM_API_HASH` from my.telegram.org ### 2. Generate Telegram Session String Run the interactive helper script to obtain your `TELEGRAM_SESSION_STRING`: [code] Follow the prompt to enter your phone number and Telegram verification code. Copy the generated session string. ### 3. Configure Environment Variables Copy `.env.example` to `.env`: [code] Open `.env` and fill in: * `TELEGRAM_API_ID` & `TELEGRAM_API_HASH` * `TELEGRAM_SESSION_STRING` (from Step 2) * `DJANGO_SECRET_KEY` & `JWT_SECRET_KEY` (generate random keys) * `DB_PASSWORD` (set a secure database password) ### 4. Start the Application Launch the entire stack with Docker Compose: [code] Open your browser at: [code] --- ## βοΈ Environment Configuration Reference | Variable | Description | Default | | :--- | :--- | :--- | | `PORT` | Host port exposed for web frontend | `8080` | | `DJANGO_SECRET_KEY` | Django cryptographic signing key | *(Required)* | | `JWT_SECRET_KEY` | JWT secret key (min 32 characters) | *(Required)* | | `STORAGE_BACKEND` | Storage provider (`mtproto` or `mock`) | `mtproto` | | `TELEGRAM_API_ID` | Telegram App API ID from my.telegram.org | *(Required)* | | `TELEGRAM_API_HASH` | Telegram App API Hash | *(Required)* | | `TELEGRAM_SESSION_STRING` | Telethon persistent StringSession | *(Required)* | |