Linux Deploy on Android: SSH and Network Troubleshooting Notes
These notes describe my setup from June 2024. Linux Deploy forks, Android versions, and installation steps may have changed since then.
I spent several days trying to run Linux applications on an old phone so I could use it as a server. I started with Linux Deploy because its graphical interface looked convenient, but working through its issues ended up taking more time.
This post collects a few problems I ran into and the workarounds I used. If you would rather use Termux, see my Termux server setup.
Maintaining Linux Deploy
The original Linux Deploy repository had little activity when I wrote this. I used a fork maintained by another developer: Linuxdeploy-Pro.
Some older versions of Linux Deploy failed when installing a new system image. Switching to this fork fixed that problem for me.
SSH does not work
On a fresh installation, I enabled SSH in the settings but could not connect. It seemed the SSH server had not installed correctly. The issue looked similar to this report.
I do not remember exactly which step fixed it. I changed the installation target from a directory to an image file and reinstalled the system, after which SSH worked.
The Linux environment cannot access the network
In my case, apt could download packages, but pinging a domain failed to resolve its name, while pinging an IP address just hung. It appeared that the Linux user did not have the permissions needed to access Android’s network.
The workaround was to add the user to the aid_inet group. See this Linux Deploy issue for related details.
Closing notes
There were other problems, but I cannot remember them well enough to document them. I eventually switched to Termux because I could not fix the remaining issues in Linux Deploy. I later wrote up that setup in Run SSH and Game Servers on an Old Android Phone with Termux.