My Android Phone Is Now My Server
· Pradeep Chandran M
Android / Termux, Linux, Self-Hosting, SSH
I wasn't planning to build a server. I just needed somewhere to host an application I was working on. It was a side project, so paying for a VPS or a hosting service didn't really make sense. I initially used Render's free tier, which worked until I ran into an unexpected problem: my institute had blocked Render's IP addresses. I needed something cheap that would still work from campus, ideally something I already had. That's when the old Android phone started to look useful. Instead of treating it as just a device for running apps, what if I could use it as a Linux server? The phone in question is an old Samsung Galaxy M31 that was sitting unused. It was never going to win a benchmark against a VPS, but it had two things a VPS doesn't: a battery, and a place in my pocket. A phone running Linux? My first step was installing Termux. From there, I set up an Ubuntu environment using proot. I wanted more than just a terminal where I could manually execute commands. I wanted something that would behave like a server whenever the phone started up. So I installed SSH, created a startup script, and configured it to start the SSH daemon and launch my application inside a tmux session. What I wanted was boring: boot the environment, start the services, and keep the app running in the background. The whole stack is just: Termux as the Android-side terminal and package manager proot to run a full Ubuntu userland without root OpenSSH so I can log in from my laptop tmux so the application survives a dropped connection A startup script that brings the daemon and the app up together What is it actually running? Currently, I'm using it to run a Node.js result-monitoring script that needs to operate continuously. It's the same script I wrote about in Automated Result Notifications. I can SSH into the phone, access the Ubuntu environment, manage processes through tmux, and work with the machine much like I would with a small Linux server. And the hardware isn't particularly…