-
Unlimited Cloud Storage: Uses Telegram Channels as a storage backend to host files of unlimited quantity.
-
Zero Disk Usage: Files are streamed chunk-by-chunk from the user → RAM → Telegram. Nothing is ever saved to the server's disk.
-
Streaming Download: Watch videos or download files instantly without waiting for them to "buffer" on the server first.
-
Async Core: Built on Django Async and Telethon to handle multiple concurrent uploads/downloads without blocking.
-
User-Friendly UI: Simple, clean web interface for uploading and managing files.
You need Python 3.9+.
sudo apt update
sudo apt install python3 python3-pip -y
git clone https://github.com/AmirAzade/GhostStorage.git
cd GhostStorage
pip install -r requirements.txt
Create a .env file in the root directory and fill in your details:
nano .env
# Django Settings
DEBUG=True
# Telegram Credentials (get from my.telegram.org)
TG_API_ID=12345678
TG_API_HASH=your_api_hash_here
TG_SESSION_NAME=mysession
# Your Private Channel ID (e.g., -100xxxxxxx)
TG_CHANNEL_ID=-1001234567890
Since Telegram requires an initial OTP login, you must generate a session file once before running the server.
python scripts/create_session.py
Follow the on-screen prompts to log in. This will create mysession.session in your root folder.
To enable streaming capabilities, you must run the application using Uvicorn (ASGI), not the standard Django runserver.
uvicorn GhostStorage.asgi:application --host 0.0.0.0 --port 8000
Open your browser and visit: http://localhost:8000 (or your VPS IP).
- Upload: Select a file and click upload. Watch the progress bar as it pipes data to Telegram.
- Download: Click the download link to stream the file back from Telegram instantly.
📂 GhostStorage/
├── 📄 manage.py # Django CLI
├── 📄 requirements.txt # Dependencies
├── 🔒 .env # API Keys (Ignored by Git)
├── 🔐 mysession.session # Auth File (Ignored by Git)
│
├── 📂 GhostStorage/ # Project Settings
│ ├── 📄 asgi.py # ASGI Entry point (for Uvicorn)
│ ├── 📄 settings.py # Configuration
│ └── 📄 urls.py # URL Routing
│
├── 📂 core/ # Main Application Logic
│ ├── 📄 client.py # Telethon Client Singleton
│ ├── 📄 views.py # Streaming Views (Upload/Download)
│ └── 📄 apps.py # App Configuration
│
└── 📂 scripts/ # Utility Scripts
└── 📄 create_session.py # Session Generator
This project is for educational purposes. Please use it responsibly and ensure you comply with Telegram's Terms of Service regarding file storage and API usage.
