While working for NGO ED4free specialized in low-cost digital tools for education and training in Africa, I have successfully install a Nextcloud 20 server on a Smartphone.
It works fine and performances are not so bad.
There are two ways to do it:
With Linux Deploy Android application, which requires rooting the smartphone, which is a significant obstacle, but with which the performance is good (in use, no difference compared to a Raspberry PI 3 B +). This application is based on the Linux Chroot command which creates a Debian environment on Android (same concept than Docker, but native to Linux).
With Termux Android application which does not require to root the smartphone. The response times are less good but not catastrophic. This application is based on the Linux command Proot (same than Chroot but without link with natif OS Android).
Other applications have been successfully installed, including Wordpress server, Moodle server and the Kiwix server which allows embedding Wikipedia and other content like Wikibooks, Project Gutenberg, etc.)
What can this be used for? Suppose a teacher make course in front of his students in Africa. On his smartphone, he activates the “Nextclloud server” and “wifi hotspot” functions, then he invites his students to download his course on their own smartphones, so they will be able to consult it at home (they use Nextcloud android app for downloading the course).
You can find more information at EDphone – ED4free (in French, but you can use translation feature of your browser).
We are looking for partners to lead a pilot in Africa.