If you consider a house server, the standard suspects will come to thoughts. The Raspberry Pis, small NUC-style PCs, previous laptops, have all lengthy been fantastic gadgets to run a house server on. However when you these have them mendacity round, your telephone may simply match the invoice.
You see, operating a full Linux desktop in your Android is not some technical wizardry anymore. It is a matter of putting in a few apps and operating just a few instructions. And when you get to that Linux desktop, the road between a Linux PC and your telephone will skinny out actual fast.
Associated
Android’s Linux terminal is so good that I maintain discovering new causes to not open my PC
I maintain reaching for my telephone, and it’s not for scrolling.
I skipped the standard residence server {hardware}
Outdated Androids include built-in battery, connectivity, and 0 further value
Why would you run a house server on an previous, probably below powered Android machine you may need mendacity round when options just like the Raspberry Pi are for wherever between $30 to $100 on Amazon? That is a good query to ask. However the reply can also be fairly easy: since you already personal it.
In case you’ve acquired an previous laptop computer or desktop mendacity round otherwise you wish to study extra about embedded programs through the use of a Raspberry Pi, by all means, go for it. They’re finally a greater answer contemplating they’re really meant to run desktop Linux. Nevertheless, in case you do not already personal them, they often require shelling out cash after which ready on transport to reach. To not point out that within the case of the Raspberry Pi, you may additionally want a show, keyboard, mouse, microSD card, and an influence provide to get all of it operating. Instantly, you would be taking a look at a large invoice.
Your telephone, then again, already has all of it. It is probably acquired rather more than 8 GB of area, a show, contact enter, and a built-in battery. You are not changing Android in your telephone both, and might at all times revert to common Android if you have to use your telephone as, properly, a telephone.
And when you’re questioning whether or not you may really run something helpful on it, there are tons of issues you are able to do with a Linux terminal on Android that common apps cannot. Something from operating a Pi-hole occasion for network-level advert blocking, a Copyparty occasion for a file server, or perhaps a Navidrome music server on an previous Android is well doable. In case you’ve acquired the {hardware}, you may even self-host your individual AFFiNE server and break free from Notion.
Linux on Android is less complicated than it sounds
A fast setup that turns your telephone right into a server
You need not unlock the bootloader, root your telephone or do something flashy to put in Linux. Android 16 now natively helps a Linux terminal, however if you’d like the complete desktop expertise, a mix of Termux and Termux X11 will take you a great distance.
There are tons of set up scripts out there on GitHub that automate the setup course of for you, so as a substitute of putting in particular person instruments, the distribution, and the XFCE desktop, you simply run an set up script to put in every thing mechanically. I used the Cellular HackLab script from jarvesusaram99 on GitHub. It installs every thing you want, plus a bunch of additional utilities like Firefox, Wget, cURL, VS Code, and even Wine to get you began. It additionally has a relatively pleasant terminal interface that tells you precisely what is going on on.
OS
Android
Value mannequin
Free, Open-source
Termux is an Android app that brings a full Linux terminal atmosphere to your telephone, letting you run command-line instruments and packages natively.
In any case, set up is an easy matter of putting in Termux and Termux X11 from their official GitHub repositories. As soon as put in, you may must disable Android’s phantom course of killer. This feature is offered in Android developer settings, typically as a Disable little one course of restrictions toggle. As soon as you’ve got enabled it, restart your telephone, and also you’re good to go.
After your telephone restarts, open Termux, and run the next command:
curl -sL https://uncooked.githubusercontent.com/jarvesusaram99/termux-hacklab/important/set up.sh | bash
The command can take wherever from 15 to half-hour, as claimed by the set up script, relying in your telephone’s processor and web velocity. All the set up course of took lower than 10 minutes on my Pixel 9a, with some safety instruments unable to put in.
Subsequent, you have to run the Termux X11 app. Simply open the app, reduce it, and head again to the Termux terminal. As soon as there, run the next command to begin the desktop. Then, swap to the Termux X11 app and you must see the Linux desktop.
I might additionally strongly suggest utilizing a USB-C dock to present your telephone energy and Ethernet connections. As you may begin establishing server and hammering lengthy instructions within the terminal, you may additionally understand {that a} bodily keyboard is a greater choice. A USB-C hub will allow you to add a keyboard, mouse, and even an even bigger show to show your telephone into a correct Linux workstation.
OS
Android
Value mannequin
Free, Open-source
Termux X11 is a companion app for Termux that gives a local X11 show server, letting you run full Linux GUI desktops and apps instantly on Android without having VNC.
Holding Android from getting in the best way
Tweaks to make it steady, predictable, and at all times on
Picture taken by Yadullah Abidi | No attribution required.
Android was designed as a telephone OS, and contemplating you are operating your Linux set up on prime of it, it’ll maintain making an attempt to behave like one. Fortunately, every thing you have to change is already out there in Android’s settings.
Earlier than you go round tweaking Android settings nevertheless, you may must run yet another Termux command as quickly as you begin your session:
termux-wake-lock
You can even add it to your ~./bash_profile so it runs mechanically on boot. This command prevents Android from placing your telephone into deep sleep and throttling the Linux processes when its display screen turns off.
Subsequent, take away each app you do not want, and prohibit background exercise for those you may’t uninstall or in any other case want on the telephone. Simply head to Settings > Apps > Battery utilization and set each app to Restricted. Keep in mind: each background course of that you simply take away offers extra {hardware} headroom on your Linux atmosphere. Underneath Developer Choices, you too can set the Background course of restrict to a hard and fast quantity — a setting that may make your previous Android telephone quicker.
Final however not least, disable battery optimization for each Termux and Termux X11. The apps ought to mechanically immediate you to do that, so you do not even must dig by means of your telephone’s settings. Android’s battery administration may be fairly harsh on apps taking over an excessive amount of energy, and letting Termux run free ensures your Linux atmosphere runs steady.
This setup is extra succesful than you’d anticipate
Outdated Android {hardware} nonetheless has lots to present
You do not want a mini PC, previous laptop, or Raspberry Pi to run a house server. Are these gadgets higher outfitted to host one? Sure they’re. However when you do not already personal them, a seemingly out of date Android telephone will get you many of the manner there relying on what you really wish to run.
Associated
I discovered the easiest way to reuse my previous Android telephone
Outdated Androids may be extra than simply e-waste.
It is not essentially the most glamorous setup, and it is not essentially the most highly effective both. But it surely’s free, silent, would not eat sufficient energy to lift your electrical energy invoice (in a significant manner anyway), and might face up to energy cuts courtesy of the built-in battery. Extra importantly, it will get you tinkering straight away.

