Apurva Chaudhary

Turning an Old Android Phone into a Home Server

With a little encouragement from Tazz, I converted an old Android phone into a server to host my hobby projects. Since most of them get very little traffic, running everything locally made perfect sense. Plus, it saves me the ~$50 a year I was spending on external hosting, which I’d much rather put toward AI subscriptions instead

The Stack

Base OS: https://termux.dev/ – A terminal emulator for Android that acts as a Linux environment. I found this to be really close to my mac terminal and is super powerful.
Web Server: Nginx 1.29 – Handles reverse proxy and serves static content.
Application Server: PHP 8.5 with PHP-FPM – For running PHP applications.
Database: MariaDB 12.1
Monitoring: Built my own monitoring page for now.

I initially considered deploying Prometheus and Grafana through Docker, inspired by tutorials claiming it works on Termux. However, two realizations stopped me. First, Docker fundamentally can’t run properly on Android—it requires kernel-level features that Termux can’t access, meaning those docker-compose up -d commands would never actually work. Second, even if it somehow worked, the memory requirements were prohibitive. A typical Docker + Prometheus + Grafana stack consumes 400-700 MB minimum (with recommendations of 4-8 GB RAM)1, which would choke my Android device’s resources. Rather than fight these limitations, I built a lightweight internal monitoring system instead. It may lack polished Grafana dashboards, but it provides essential monitoring without the impossible memory overhead.

Remote Access: Cloudflare Tunnel (cloudflared) – Exposes services to the internet without opening ports.

SSH Access

The phone runs an SSH server on a port (Termux uses a non-standard port since standard ports require root).

From my laptop, I connect with:

ssh <username>@<phone_ip> -p <port>

The SSH server starts with sshd and runs in the background. Once connected, I have full terminal access to manage services, update code, and monitor the server.

What It Hosts

Currently running a few small web projects and personal tools. The setup is lightweight, always-on, and costs nothing to run since the phone is always plugged in and connected to WiFi.

Why Use an Old Phone?

– Low power consumption – Uses a fraction of what a desktop or Raspberry Pi would consume
– Always on – Phones are designed to run 24/7
– Free hardware – Repurposing a device that would otherwise sit in a drawer
– Surprisingly capable – Modern Android phones have decent RAM and storage. My hosting provider wanted me to upgrade my plan to host more domains, DBs, and what not. I no longer have that restriction. As long as my device supports it, I can host it.

If you have an old phone lying around, it’s definitely worth trying out!

  1. https://prometheus.io/docs/prometheus/1.8/storage/