932 words
5 minutes

How I Built My Own Unlimited Cloud Storage with Telegram (And Fixed the Folder Problem)

The Illusion of “Unlimited” in Today’s Web#

In today’s digital world, the word “unlimited” has practically become a myth.

Every major cloud provider follows the exact same playbook: they lure you in with a modest 5GB or 15GB free tier, and before you know it, photos from your phone and backup files fill it up. Suddenly, you’re hit with recurring monthly subscription fees, storage quotas, and relentless warning banners.

Frustrated by this endless cycle of cloud rent, I went down the rabbit hole. I scoured GitHub, combed through developer forums, and tested dozens of open-source repositories promising “unlimited free cloud storage” using platforms like Telegram.

On paper, Telegram is an engineer’s dream for storage:

  • It offers unlimited file uploads.
  • Standard bots can handle files up to 2.0 GB each.
  • User accounts (via MTProto sessions) can upload single files up to 4.0 GB.
  • Files uploaded to private channels stay there permanently, backed by Telegram’s global CDN.

Yet, despite finding several working proofs-of-concept, almost every single existing tool had one deal-breaking flaw that made it unusable as a real daily driver:

There was no folder structure.


The Fatal Flaw: The “Flat Dump” Problem#

Every project I tested treated Telegram like an unorganized timeline.

Files were dumped into a single linear feed or a flat database table. If you uploaded 500 files, you got an endless, paginated wall of filenames. Want to organize your project assets into Work/2026/Q1/Assets? Impossible. Want to move a file from one category to another? Out of luck. Want to drag a folder to nest it inside another? Not a chance.

Storage without hierarchy isn’t a cloud drive it’s just a digital junk drawer.

If I wanted a personal cloud that could legitimately replace Google Drive or Dropbox, I had to build it myself. And that’s how Telegram Unlimited Drive (TG Drive) was born.

:::tip Repo on GitHub You can check out the full open-source project and deploy your own instance here:
👉 shishir0x/Telegram-Unlimited-Cloud :::


Designing a Virtual Filesystem on Top of Telegram#

The foundational engineering challenge was straightforward: Telegram has no concept of directories; it only knows messages and file IDs.

To solve this, I decoupled file storage from filesystem metadata:

  1. Storage Layer: Files are uploaded directly to a private Telegram storage channel. Telegram acts strictly as the raw object store (like an S3 bucket). Each file receives a unique Telegram message_id and file_id.
  2. Virtual Filesystem (VFS) Layer: A lightweight in-memory tree represents the nested directory hierarchy. Every folder is a node containing children (files and subfolders), timestamps, tags, and path pointers.
  3. Persistent Sync Layer: The entire filesystem state (drive.data) is serialized and periodically committed back to the same private Telegram storage channel as a pinned backup message.
Frontend: Glassmorphic SPA(Drag-and-Drop, Breadcrumbs, Grid/List Views)REST API & HTTP Stream RequestsPython Backend EngineVirtual Filesystem Tree • In-Memory Pyrogram CoreStream & File TransfersMetadata Sync BackupsTelegram Cloud InfrastructurePrivate Storage Channel (Unlimited Object Store)

This means the application requires zero local disk footprint. If you deploy it on a free container service like Render, Railway, or a minimal VPS, it boots up, pulls the latest metadata snapshot directly from your Telegram channel, reconstitutes the directory tree in memory, and is ready in seconds.


Core Features That Make It a Real “Drive”#

I didn’t want a toy script; I wanted a production-ready application that felt snappy and reliable.

1. Google Drive Style Hierarchical Management#

  • True Nested Folders: Create directories with recursive path resolution (mkdir -p).
  • Interactive Breadcrumbs: Seamlessly navigate back up the tree.
  • Drag & Drop Organization: Drag files from your computer to upload directly into the active folder, or drag items into folders/breadcrumbs to move them instantly.
  • Multi-Select & Bulk Actions: Lasso-select or Ctrl/Shift click to download as a dynamic ZIP, move, or soft-delete.

TG Drive Web UI - Complete nested directory tree, categories, breadcrumbs, search, and live storage statistics powered by Telegram

TG Drive Web UI: Complete nested directory tree, categories, breadcrumbs, search, and live storage statistics powered by Telegram.

2. In-Browser Media Streaming & Previews#

Telegram bots normally force you to download the whole file before viewing it. That’s a terrible experience for 2GB video files.

TG Drive implements HTTP 206 Partial Content (Range Requests):

  • Stream 4K/1080p MP4, MKV, and WebM videos with instant scrubbing.
  • Listen to lossless audio files (FLAC, WAV, MP3) with real-time seeking.
  • Read PDFs and view markdown/code files in 30+ languages with full syntax highlighting directly in the browser.

3. Concurrency via Multi-Bot Worker Pools#

Telegram enforces rate limits on individual bots when performing continuous high-speed transfers. To maximize bandwidth, TG Drive supports a Multi-Bot Pool:

  • Workloads are automatically distributed across multiple bot tokens in parallel.
  • Transfers queue gracefully with live speed graphs, estimated time remaining, and automatic retry on packet drop.
  • Support for MTProto STRING_SESSIONS raises the single-file ceiling from 2.0 GB to 4.0 GB.

4. Enterprise Security & Deduplication#

  • Two-Factor Authentication (2FA): Protected with PBKDF2 password hashing plus 6-digit email OTPs.
  • SHA-256 Duplicate Detector: Scans across your entire drive to find redundant copies and reclaim clean organization.
  • Scoped Sharing: Create public or password-protected share links for individual files or entire folders without exposing the rest of your drive.

Reflections & What’s Next#

Building this project proved that having access to vast infrastructure is only half the battle. The real magic lies in the abstractions you construct around it.

Telegram provided the storage pipes, but the virtual filesystem, hierarchical directory tree, and streaming layer transformed it from a raw message log into a truly capable, sovereign cloud drive.

If you’re tired of paying monthly subscriptions for cloud storage or simply want to self-host your own private, unlimited drive with a clean UI and real folder organization:

Check out the source code, star the project, or contribute on GitHub:
👉 https://github.com/shishir0x/Telegram-Unlimited-Cloud

How I Built My Own Unlimited Cloud Storage with Telegram (And Fixed the Folder Problem)
https://github.com/shishir0x/Telegram-Unlimited-Cloud
Author
Shishir Pandey
Published at
2026-08-30
License
CC BY-NC-SA 4.0
Last updated on 2026-08-30

Comments

Table of Contents