Just like old PCs and laptops, there are plenty of ways to repurpose an old smartphone. If it has a functional camera, you could turn it into a makeshift webcam for your PC, or even a full-on surveillance system using a Frigate server. Alternatively, you could use its touchscreen display to build a reliable Home Assistant dashboard. Or, if you’re as much into productivity as I am, you could even repurpose it into a Stream Deck.
But what about turning an Android phone into a home server – one that could rival the likes of a Raspberry Pi? That shower thought led to another, and I figured I could give this project a shot. After all, I’ve already tried running PC games on my smartphone, so running Linux containers shouldn’t be that difficult, right? Well, not quite. Due to non-root limitations, I could only run a couple of distros on my phone, and eventually ended up with a setup that’s better for distro-hopping than running containerized services.
Choosing the right packages for this setup
In the end, I went for a Temux + proot-distro setup

The biggest challenge of this project was finding a setup that would work reliably without rooting my phone. Back in the day, I used to jailbreak my phones right after purchasing them. But with all the restrictions on modern apps, I figured it’d be better to avoid going down the root route.
Unfortunately, the straightforward method for running containers requires a rooted device – even custom kernel modules in some cases. This restriction meant I had to look for an alternative. Running virtual machines – even those via Chroot – had a similar problem on non-rooted devices.
This left me with workarounds involving Termux, a powerful terminal emulator that I often use for my Android projects. A little bit of doomscrolling on GitHub brought me to proot-distro, which seemed like the perfect package for this experiment. What it does is essentially create a proot (user-space variant of chroot) environment, where I could tinker with Linux distributions to my heart’s content. Little did I know this would soon lead me on a distro-hopping journey.
Tinkering with Linux distros on Android
proot-distro worked well in the beginning

With all the preparations complete, it was time to kick this project into second gear. After running pkg install proot-distro inside Termux, I wanted a couple of minutes for the command to pull the necessary packages. Then, I ran proot-distro install debian to begin setting up a Debian environment on my smartphone. Once the installation was complete, I executed proot-distro login debian to enter Debian, and sure enough, the king of vanilla distros was up and running within my smartphone.
Since I couldn’t run any packages with sudo privileges, I began updating my packages with the ol’ apt update and apt upgrade commands. After that, I tried installing some normal packages, including DokuWiki. But most packages failed right away. I also attempted to install Docker, which threw some errors my way. Undeterred by the failure, I shifted my attention to Podman, which refused to run as well. In hindsight, this made perfect sense, since I’d have to make certain modifications to the kernel to get the container runtimes operational on my phone.
But I couldn’t get the essential proot-apps working

After browsing GitHub a little more, I came across the proot-apps repository. As you may have already guessed from the name, it’s a collection of applications from the genius devs at LinuxServer that are meant to be run in a proot environment. So, I began by installing some of those inside my Debian virtual machine. Unfortunately, the ones designed for typical Docker containers, like Nextcloud, failed to work on my setup. What’s interesting is that the error code mentioned QEMU (or rather, the lack thereof), which shouldn’t even be required by the application.
Still, I figured I could try running the packages on a different distribution. Fedora has better support for Podman, so I figured I could try running the container runtime on a different distro – which didn’t work all that well either. Then, I tried running proot-apps inside an Arch Linux setup, while some other distros refused to run altogether. And it was the last part that bothered me the most…
I switched to the Termux-Pentesting-Distro repo
But by then, I’d lost sight of the initial project
Although Debian, Fedora, and Arch “worked,” I realized I couldn’t install many apps without any pkg errors – and this includes something as simple as neofetch. So, I made one last ditch attempt after encountering the Termux-Pentesting-Distro GitHub repository. Turns out, this neat repo not only runs a plethora of cool distributions, but also works with many apps. While I couldn’t get any window managers or desktop environments running, I was able to install numerous distros on my smartphone.
Likewise, I was also able to install Emacs, Neovim, and other essential Linux apps on the new distro’s repos. The problem? By now, I’d completely deviated from my initial objective of running containers and had pivoted entirely to tinkering with cool distros. In my defense, my lizard brain couldn’t help getting excited from the barrage of Linux distributions – especially when there were a couple whose names I hadn’t even heard in the past. Then there’s the fact that each flavor of Linux shipped with Neofetch right out of the box, and if there’s anything I love more than distro-hopping, it’s seeing the cool Neofetch widget.
For now, I was satisfied with the weird distro-hopping setup I’d configured, especially since I couldn’t figure out a way to get the essential containers running on my smartphone. I plan to root a different, slightly older phone in the near future, so I can re-attempt this experiment with proper Docker and Podman containers.