Sep 28, 2024

Own micro home-lab on-premise cloud using Android

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

  1. Android device
  2. Cloudflare account
  3. Domain name
  4. 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-storage
the 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 dotnet
Above 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:
  1. Alpine Linux (edge)
  2. Arch Linux / Arch Linux 32 / Arch Linux ARM
  3. Debian (stable)
  4. Fedora 35
  5. Manjaro AArch64
  6. OpenSUSE (Tumbleweed)
  7. Ubuntu (22.04)
  8. 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;

  1. Install termux on your Android device
  2. Create Cloudflare account & Setup cloudflare zero trust
  3. Get your domain name and point nameservers to Cloudflare
  4. Install any proot-distro on Android using Termux
  5. Point domain to your Linux using Cloudflare zero trust