
Aim
At the end of this article you will be running your own small scale on-premise cloud on Android device and hosting a web page
Requirements
- Android device
- Cloudflare account
- Domain name
- Knowledge of Linux (optional)
The Method
1. Visit F-Droid open source app store and install Termux on your Android device
Download APK
2. After installation is complete, open termux, you will be presented with Android terminal, execute following commands:
pkg update pkg upgrade termux-setup-storagethe above commands updates termux packages if there is any update and permits Termux to access files in your device's internal storage. 3. Sign up for cloudflare zero trust 4. Register a .com domain name or get a free domain from afraid.org 5. Install dotnet
pkg install dotnetAbove command will install dotnet which can run along with android os. This is not a vm so we get native performance.
Following linux flavours are supported:
- Alpine Linux (edge)
- Arch Linux / Arch Linux 32 / Arch Linux ARM
- Debian (stable)
- Fedora 35
- Manjaro AArch64
- OpenSUSE (Tumbleweed)
- Ubuntu (22.04)
- Void Linux
Install termux boot
Setup script to run cloudflare tunnel
And run dotnet application on boot
pkg install dotnet sdks and dotnet runtime
Following are the steps for Ubuntu
proot-distro install ubuntu proot-distro login ubuntu --termux-home su apt install wget -y apt install ssh -y apt-get install -y net-tools
Conclusion
Unlimited possibilities when you run linux on your mobile phone and point cloud to your linux running on mobile
Recommended Hardware
--TODO--
References
--TODO--
TLDR;
- Install termux on your Android device
- Create Cloudflare account & Setup cloudflare zero trust
- Get your domain name and point nameservers to Cloudflare
- Install any proot-distro on Android using Termux
- Point domain to your Linux using Cloudflare zero trust
