As of May 2019 what are the options (if any) to install Ubuntu server on a smartphone device?

I don't need much of the smartphone functionality, I don't need desktop and touchscreen blows and whistles at all (the phone will be accessed mostly through SSH and USB, it would be nice to have a working terminal on the phone).

I intend to use my old device (originally Android, Nexus 4 or BQ Aquaris E5 or ASUS ZenFone 2) as a mobile LAMP server and run lxc containers on it (serving the apps).

Does anybody have any experience / ideas?

I looked at Ubuntu Touch / UBports solution, but it focuses mostly on smartphone functionality (supporting all hardware, installing Android apps, nice touch desktop etc.). I need more of a server - less of a smartphone... Not only me, perhaps.

BTW the most detailed answers related to Ubuntu Touch (for those who are interested) are gathered here: What hardware does Ubuntu Touch support?

Links to related questions / discussions:

  1. How to use Android SDK and smartphone vendor tools to boot another kernel?

  2. Ubuntu Touch (UBports) and Android support for LXC/LXD containers (for running Ubuntu): current state

  • 1
    UBports is actually your best bet because you need hardware support. Then, if the server features are available for that architecture (I'm really not sure), they can be installed.
    – user880592
    May 14 '19 at 8:49
  • Well, I need only WiFi and USB for connectivity and a touch screen with working terminal. I'm still reading info on UBports and trying to figure out how it would be possible to start a container. They have some sort of a container technology available (docs.ubports.com/en/latest/userguide/dailyuse/libertine.html) but it seems to be focused on user apps (running android apps) not server. May 14 '19 at 8:57
  • 2
    For ARM you actually need the manufacturer to release the source code including the proprietary drivers. It's not the same as desktop PCs.
    – user880592
    May 14 '19 at 8:59
  • 1
    One of the mentioned devices is "BQ Aquarius 5" which was one of the Ubuntu Touch flagships back in 2015. It should have most of the source code open. May 14 '19 at 9:01
  • 1
    Why? It is not their platform so why would they? Canonical's focus is on the cloud and servers with the desktop as a side effect. They tried with an Ubuntu phone with Ubuntu but that was not worth the investment and rightly ended that project. Making a replacement for Android is going to be expensive too: licenses need to be paid. Android does an excellent job with their software. So does Apple. Not even Microsoft can get a dent into their marketshare. And they did try. Several times. Anything Linux with phones is going to be a community driven event. Not an official event.
    – Rinzwind
    May 15 '19 at 6:39

{{ UPDATE 2 }}

The second part of the answer with more details on research path is given here:

How to use Android SDK and smartphone vendor tools to boot another kernel?.

{{ UPDATE 1 }}



As of May-2019 it is impossible to install any of the mainstream linux server distros on smartphones (listed in the question and most likely any other) in a feasible way. If you have a decent 2-3 year old hardware (like ZenFone2 with 4-core 2.3Ghz 22nm 64bit Intel Atom CPU, 4Gb RAM and 64Gb flash drive and with scratched screen), just sell it for nothing, give it away or break it. The hardware you paid for has a very limited usage (compared to a PC).

There seem to be some initiatives but they are so weak and marginal that are barely worth mentioning. Only one link is enough to understand the situation: https://en.wikipedia.org/wiki/List_of_open-source_mobile_phones

Only ONE phone in the list (a honeypot? or a carrot? or both?) which is even not available at the moment have 'multiple community-driven' in the OS column. To me the situation is clear. No way guys)))


After a small research I found out that things are not as good as they could be.

Debian community instructions could be found here:


Section 2.1.3. Variations in ARM CPU designs and support complexity gives general view of the problem and possible solutions to it. It seems to be possible to install Debian server on a smartphone, but the process is rather painful.

Some examples:

1) http://julianwi.square7.ch/debian-on-smartphone/

2) http://bonedaddy.net/pabs3/log/2012/12/03/debian-mobile/


I managed to install UBports / Ubuntu Touch on Nexus 4 (ARMv7-A CPU) easily with the help of their wonderful user friendly ubports-installer (https://ubuntu-touch.io/get-ut). The process took 5 minutes or so (I had to activate developer mode on the phone and restart it 2 times), all things were handled automatically, the phone booted into working Ubuntu Touch OS nice and smoothly. However that was not the task. I needed ubuntu-server.

Then I found mentioning of another tool on UBports site (FAQ section), namely MDT (https://github.com/MariusQuabeck/magic-device-tool). It is no longer supported but its purpose is much closer - it was supporting various OS images (including Ubuntu Desktop 13.04!) and various smartphone models. Very sad that this tool is no longer maintained. It would solve the problem if ubuntu-server image for arm devices was supported. I am wondering whether the maintainers of UBports could extend their tool (ubports-installer) and add support of server images (perhaps use MDT tool codebase)...

I will try to install ubuntu-sever (or debian) manually, but unfortunately this is going to take more research / time than it could (if we had a working / maintained version of the installer). We don't need a gui version like ubports-installer, just a CLI version which would bundle working scripts maintained by people behind MDT project and UBports team.

  • 1
    Did you have a closer look at the Aquarius? It should be relatively well supported with the latest edition of ubuntu touch. May 21 '19 at 15:04
  • 2
    Would be cheaper to just buy a Raspberry Pi 3b+. You are sacrificing a lot going from a real host to a mobile phone though. If you want to save money, mobile phones as servers is not the way to go (or Google App Engine would be running on mobile phones in their DC).
    – dobey
    May 21 '19 at 15:07
  • @Thorbjørn Ravn Andersen I looked at BA Aquaris E5, Yes. I liked Ubuntu Touch, but it is unable to run native linux containers (lxc/lxd) on it. That was the task (I develop web apps inside containers running Ubuntu, currently using django-uwsgi-nginx stack). May 21 '19 at 15:11
  • 1
    Ah missed the lxc bit. Then I agree on the Raspberry Pi 3+ suggestion - it can run docker images which may have better tooling than lxc. May 21 '19 at 15:13
  • 2
    What you paid for, is a phone though. And phones are not servers. Phones are not PCs, and you cannot take a generic image and install it on any phone, and have a new OS. You are welcome to try postmarketOS to run a more standard Linux, but it is off topic for Ask Ubuntu, and Ubuntu is not working to build. IMO though, you'd be better off selling or donating your phones to people who would use them as phones and help develop things like Ubuntu Touch, pmOS, LineageOS, etc… and buying something more fit for purpose. A hammer can't be used a socket wrench, simply because it's what you have.
    – dobey
    May 21 '19 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.