Skip to content

HYDRA-TERMUX/hydra-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Turn your Android phone into a high-speed personal cloud server β€” no internet required.

License: MIT Platform: Termux Python: 3.x Flask Android


What is HYDRA?

HYDRA Cloud Server runs entirely on your Android phone via Termux. It spins up a beautiful web UI accessible from any browser on your local WiFi network β€” laptop, tablet, or another phone. No cloud accounts. No subscriptions. No data leaving your home.

Upload, download, stream videos & music, and monitor your phone's health β€” all from a slick dark-themed web interface.


Features

Feature Description
πŸ“€ Fast Upload Drag-and-drop with 8MB chunk streaming & real-time speed meter
πŸ“₯ Download One-click download with HTTP range request support
🎬 Media Streaming In-browser video & audio player, image viewer
πŸ“Š Device Health Live battery, RAM, storage, WiFi, CPU temp dashboard
🌐 LAN Access Any device on the same WiFi can connect instantly
πŸ”’ 100% Private No internet required, no data leaves your network
πŸ“± Mobile-First UI Responsive dark UI, works on any screen size
⚑ High Performance Threaded Flask, 8MB chunks, up to 32GB file support

Repository Structure

hydra-cloud/
β”œβ”€β”€ hydra_server.py               # Flask web server β€” the core engine
β”œβ”€β”€ hydra.sh                      # Termux launcher & setup menu
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ INSTALL.md                # Detailed installation guide
β”‚   β”œβ”€β”€ USAGE.md                  # Full usage reference
β”‚   └── TROUBLESHOOTING.md        # Common issues & fixes
β”œβ”€β”€ screenshots/
β”‚   β”œβ”€β”€ architecture.svg          # System architecture diagram
β”‚   β”œβ”€β”€ menu.png                  # Terminal menu
β”‚   β”œβ”€β”€ files.png                 # Files tab UI
β”‚   β”œβ”€β”€ upload.png                # Upload tab UI
β”‚   └── health.png                # Device health dashboard
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/
β”‚   β”‚   β”œβ”€β”€ bug_report.md
β”‚   β”‚   └── feature_request.md
β”‚   └── CONTRIBUTING.md
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

Quick Start

1 β€” Install Termux

Download Termux from F-Droid β€” do not use the Play Store version.

2 β€” Clone & run

pkg install git -y
git clone https://github.com/YOUR_USERNAME/hydra-cloud
cd hydra-cloud
chmod +x hydra.sh
bash hydra.sh

3 β€” First-time setup (option 1)

The setup installs Python, Flask, and all dependencies automatically.

4 β€” Start the server (option 2)

  HYDRA is running on your network!

  This phone:   http://127.0.0.1:8888
  WiFi LAN:     http://192.168.X.XXX:8888

5 β€” Open in any browser

Navigate to the WiFi LAN address shown in Termux from any device on the same network.


Menu Reference

  1) First-time setup        Install all dependencies
  2) Start (LAN + localhost) Access on WiFi network
  3) Start localhost only    This phone only
  4) Server status           Check what's running
  5) Speed test              Test your WiFi performance
  6) View logs               See server activity
  7) Stop everything         Kill all HYDRA processes
  8) Exit

Architecture

Your Phone (Termux)                      Any Device on LAN
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      β”‚                β”‚                   β”‚
β”‚  hydra.sh            β”‚                β”‚  Chrome / Firefox β”‚
β”‚  (Launcher menu)     β”‚   WiFi LAN     β”‚  http://192.168   β”‚
β”‚         β”‚            │◄──────────────►│       .x.x:8888   β”‚
β”‚         β–Ό            β”‚                β”‚                   β”‚
β”‚  hydra_server.py     β”‚                β”‚  β€’ Upload files   β”‚
β”‚  (Flask on :8888)    β”‚                β”‚  β€’ Download files β”‚
β”‚         β”‚            β”‚                β”‚  β€’ Stream media   β”‚
β”‚         β–Ό            β”‚                β”‚  β€’ View health    β”‚
β”‚  ~/storage/shared/   β”‚                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚  HYDRACloud/         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

See the full architecture diagram.

Key technical details:

  • 8MB streaming chunks β€” maximises WiFi throughput
  • HTTP Range requests β€” enables seek & resume in video players
  • Threaded Flask β€” simultaneous upload + download + streaming
  • 32GB max file size β€” handles any file you throw at it
  • Wake lock β€” keeps server alive when screen is off

Screenshots

πŸ“ Files Browser πŸ“€ Upload Interface
Files tab Upload tab
πŸ“Š Device Health πŸ–₯️ Terminal Menu
Health dashboard Terminal menu

Demo Video

HYDRA Demo

Full walkthrough: setup, file upload, video streaming, device health dashboard.


Requirements

Requirement Details
Device Any Android phone or tablet
Android 7.0 (API 24) or newer
App Termux via F-Droid
Storage Grant Termux storage access when prompted
Network WiFi (for LAN access from other devices)
Python + Flask Installed automatically by setup (option 1)

Configuration

Edit variables at the top of hydra.sh to customise:

PORT=8888                                        # Change the server port
UPLOAD_DIR="$HOME/storage/shared/HYDRACloud"    # Change the storage folder

In hydra_server.py:

CHUNK_SIZE = 8 * 1024 * 1024           # Upload chunk size (default 8MB)
app.config['MAX_CONTENT_LENGTH'] = 32 * 1024 * 1024 * 1024   # Max file size (32GB)

API Endpoints

Method Endpoint Description
GET / Main web UI
GET /api/files JSON list of all files
GET /api/health Device health stats as JSON
POST /upload Upload a file (multipart/form-data)
GET /download/<filename> Download a file
GET /stream/<filename> Stream with HTTP range support
DELETE /delete/<filename> Delete a file

Security Notes

HYDRA is designed for trusted local networks (your home WiFi) only.

  • No authentication is implemented by default
  • Do not expose port 8888 to the internet or forward it on your router
  • On untrusted networks, use localhost only mode (option 3)

Contributing

Contributions are welcome! See CONTRIBUTING.md.

  1. Fork the repository
  2. Create a branch: git checkout -b feature/your-feature
  3. Commit: git commit -m 'Add your feature'
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request

License

MIT License β€” see LICENSE for details.


Acknowledgements

  • Termux β€” the Android terminal that makes this possible
  • Flask β€” lightweight Python web framework
  • Built with ❀️ for anyone who wants their phone to do more

If HYDRA is useful, please ⭐ star the repo!