Ditching a VPS to Self-Host on an Old Android Phone
Frustrated by the cost of a Hetzner VPS — especially the dedicated CPU needed to run a remote browser called Surf — and unwilling to buy new hardware amid absurd DRAM prices, the author repurposed a spare CMF Phone 1. Its eight ARM cores, 8 GB of RAM, 128 GB of flash, 5G modem, and built-in battery made it a capable, already-paid-for server. It now hosts Surf’s managed Chrome instance, a finance tracker, a screen-sharing service, and several smaller web apps, all deployed from Git and reachable across networks.
The path there was a series of instructive dead ends. Flashing postmarketOS bricked the phone’s useful hardware — Wi-Fi, GPU, modem, and power management were all marked broken — nearly turning it into a paperweight before a painful recovery to stock Nothing OS. The lesson: let Android keep doing the vendor-specific driver work and just run Linux apps on top of it. The working design keeps stock Android with Termux as a lightweight host control plane, using runit for supervision, Tailscale for a stable address, and Termux:Boot plus a custom Ansible-applied power profile (wake locks, disabled idle, background-restriction exemptions) so the phone survives reboots unattended.
Applications ship as ARM64 OCI images. proot-distro handled ordinary web services well, but its userspace syscall translation starved the latency-sensitive Chrome workload, so the author rooted the phone — not to replace Android, but to enter the same Debian filesystem via a real chroot and reach the kernel through native syscalls, a dramatic speedup that eventually pulled the smaller services onto the same path. The author is candid that these are compatibility layers, not security boundaries, since everything shares Android’s kernel and network stack. The whole host — versions, routes, secrets, power settings, and health checks — lives in one Ansible-managed private repo with digest-pinned images and atomic symlink deploys, turning a clever hack into reproducible infrastructure.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.