Penyimpanan cloud pribadi tanpa batas yang memanfaatkan Telegram sebagai backend storage. Kelola file, folder, sinkronisasi Google Drive, dan akses semuanya dari satu dashboard web modern.
- Upload & Download file langsung ke Telegram (mendukung file hingga 2GB)
- Folder Hierarchy β buat, navigasi, dan kelola folder seperti file manager biasa
- Multi-Upload β upload banyak file sekaligus dengan progress bar real-time
- Search & Pagination β cari file dengan cepat, navigasi antar halaman
- File Preview β preview gambar, video, audio, PDF, teks, dan dokumen Office langsung di browser
- Favorites β tandai file favorit untuk akses cepat
- Trash & Permanent Delete β hapus file ke trash, atau hapus permanen dari Telegram
- Connect Google Drive β hubungkan akun Google Drive via OAuth2
- Browse & Copy β telusuri file Google Drive dan salin ke Telegram Storage
- Bi-directional Sync β sinkronisasi file dari Google Drive ke Telegram secara otomatis
- Sync Progress β pantau progress sinkronisasi real-time dengan retry mechanism
- Disconnect β putuskan koneksi Google Drive kapan saja
- Browse Photos β akses Google Photos langsung dari sidebar
- Embed Panel β tampilan Google Photos terintegrasi di dalam dashboard
- User Profile β atur nama, email, telepon, bio, dan foto profil
- Auto-Populate dari Google β profil otomatis terisi dari data Google OAuth
- Multi-Account Isolation β setiap akun Google memiliki penyimpanan terisolasi
- Admin Panel β panel pengaturan untuk admin (Google Client ID/Secret)
- API Settings β atur API ID, API Hash, Bot Token, dan Channel ID
- Channel Target Normalization β otomatis menormalkan format Channel ID Telegram
- Connection Test β uji koneksi ke Telegram langsung dari dashboard
- Multi-Account Support β dukungan multiple Telegram bot accounts
- Dark Mode β tema gelap modern dengan aksen ungu
- Responsive Design β tampilan optimal di desktop, tablet, dan mobile
- Mobile Bottom Navigation β navigasi mudah di perangkat mobile
- Inline Settings Panel β pengaturan terpadu tanpa pindah halaman
- Toast Notifications β notifikasi status upload/download/sync
telegram-cloud-storage/
βββ web.py # Main Flask app + Telegram integration (29 routes)
βββ web_drive.py # Google Drive/Photos + Profile features (37 routes)
βββ telegram_accounts.py # Multi-account Telegram management
βββ storage.db # SQLite database (auto-created)
βββ config.env # Environment configuration
βββ profiles/ # User profile photos
βββ icons/ # SVG icon set
β βββ cloud-storage-icons/
β βββ cloud-storage-svg-complete/
βββ test_*.py # Unit & integration tests (15 test files)
| Komponen | Teknologi |
|---|---|
| Backend | Python 3.8+, Flask 3.x |
| Database | SQLite3 (file-based) |
| Telegram | Telethon (MTProto API) |
| Google API | Google Drive API v3, Google Photos API |
| Frontend | Vanilla JavaScript (ES5), HTML5, CSS3 |
| Icons | Custom SVG icon set |
| Deployment | systemd service, Cloudflare Tunnel |
- Python 3.8 atau lebih baru
- Telegram API credentials (dari my.telegram.org)
- Google Cloud Project (untuk fitur Google Drive/Photos)
git clone https://github.com/sigit4715/telegram-cloud-storage.git
cd telegram-cloud-storagepython3 -m venv venv
source venv/bin/activate
pip install flask telethon pillow google-api-python-client google-auth-oauthlibBuat file config.env:
# Telegram Settings
TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHANNEL_ID=-100xxxxxxxxxx
# Google OAuth (opsional)
GDRIVE_CLIENT_ID=your_client_id.apps.googleusercontent.com
GDRIVE_CLIENT_SECRET=GOCSPX-your_secret
PHOTOS_CLIENT_ID=your_client_id.apps.googleusercontent.com
PHOTOS_CLIENT_SECRET=GOCSPX-your_secret
# Admin (opsional)
ADMIN_IDS=your_google_email@gmail.compython3 web.pyServer akan berjalan di http://localhost:8050
sudo tee /etc/systemd/system/telegram-cloud-web.service << 'EOF'
[Unit]
Description=Telegram Cloud Storage Web
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/data/telegram-cloud
ExecStart=/opt/data/.venv-scrapling/bin/python3 web.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable telegram-cloud-web
sudo systemctl start telegram-cloud-webUntuk akses publik tanpa port forwarding:
cloudflared tunnel --url http://localhost:8050Jalankan semua unit test:
python3 -m unittest discover -p "test_*.py" -v| Test File | Deskripsi |
|---|---|
test_login_redirect.py |
Login & redirect behavior |
test_telegram_settings_page.py |
Settings page rendering |
test_telegram_channel_target.py |
Channel ID normalization |
test_telegram_account_config.py |
Multi-account configuration |
test_multi_account_isolation.py |
Data isolation per account |
test_web_drive_host_binding.py |
Drive blueprint registration |
test_web_main_alias.py |
Module import safety |
test_file_preview.py |
Preview functionality |
| + 7 UI tests | Pagination, stat cards, file types, etc. |
- Statistik penyimpanan (File, Ukuran, Folder, Foto, Video)
- Daftar file terbaru dengan pagination
- Sidebar navigasi dengan mode gelap
- Tab Profil β atur data personal & foto profil
- Tab Telegram β konfigurasi API & Channel
- Tab Google β kredensial OAuth (admin only)
- Tab Tutorial β panduan setup Telegram
- Status koneksi (Terhubung / Tidak terhubung)
- Browser file Google Drive
- Tombol Copy to Telegram & Sync
- Session-based Authentication β login via ID atau Google OAuth
- Multi-Tenant Isolation β data per akun terisolasi di database
- CSRF Protection β session token untuk semua request
- No Secrets in Code β credentials disimpan di
config.env(tidak di-commit) - HTTPS via Cloudflare β enkripsi data saat transit
| Method | Endpoint | Deskripsi |
|---|---|---|
| POST | /api/login |
Login dengan User ID |
| POST | /api/logout |
Logout |
| GET | /api/me |
Info user saat ini |
| GET | /api/files |
List files dengan pagination |
| POST | /api/upload |
Upload file ke Telegram |
| GET | /api/download/<id> |
Download file |
| GET | /api/stream/<id> |
Stream file (preview) |
| DELETE | /api/delete/<id> |
Hapus file |
| GET | /api/stats |
Statistik penyimpanan |
| GET | /api/folders |
List folders |
| Method | Endpoint | Deskripsi |
|---|---|---|
| GET/POST | /api/profile |
Get/update profil |
| POST | /api/profile/photo |
Upload foto profil |
| GET | /api/gdrive/status |
Status koneksi Google Drive |
| GET | /api/gdrive/auth |
Mulai OAuth Google Drive |
| GET | /api/gdrive/files |
Browse file Google Drive |
| POST | /api/gdrive/copy |
Copy file dari GDrive ke Telegram |
| POST | /api/gdrive/sync |
Mulai sinkronisasi |
| GET | /api/settings |
Get settings (admin) |
| POST | /api/settings |
Update settings (admin) |
| POST | /api/settings/restart |
Restart service (admin) |
- Fork repository
- Buat branch baru (
git checkout -b feature/amazing-feature) - Commit perubahan (
git commit -m 'Add amazing feature') - Push ke branch (
git push origin feature/amazing-feature) - Buka Pull Request
- β Settings panel terpadu (Profil, Telegram, Google, Tutorial)
- β Auto-populate profil dari Google OAuth
- β Fixed Google Drive & Settings panel overlap
- β ES5 JavaScript untuk kompatibilitas maksimal
- β 15 unit test baru
- β Google Drive & Photos integration
- β Multi-account isolation
- β File preview (image, video, PDF, Office)
- β Sync progress & retry mechanism
- β Initial release β Telegram Cloud Storage
MIT License - Silakan gunakan untuk keperluan pribadi maupun komersial.
sigit4715 - GitHub
Built with β€οΈ for unlimited cloud storage using Telegram as backend.
- GitHub: sigit4715/telegram-cloud-storage
- Issues: GitHub Issues
- Telegram API: my.telegram.org
- Google Cloud Console: console.cloud.google.com
β Star this repo if you find it useful!