I turned my old Galaxy phone into a pocket Linux server with Termux


If you have an old phone lying around or like to experiment on your current devices, Termux is probably my favorite app. I decided to use an old Samsung phone, specifically my wife’s old Samsung phone, to build a pocket Linux server. My plan is to use the server as a home for my Syncthing drive that’s more convenient and portable for my purposes.

Termux is certainly one of my most used apps—I use it for hobbies, RSS, music, some video editing, home lab experiments, and to monitor my phone’s systems or test various functions. So I was excited to try yet another experiment for this awesome app.


The Python logo superimposed on an image of Termux running a program


4 ways Python has turned my Android phone into the ultimate homelab companion

I turned my Android phone into a homelab without buying anything new.

Preparing the old phone for reassignment

A few steps to take before getting started

The Termux start screen - what adventure awaits? Credit: David J. Buck / How-To Geek

As with any project, there are some steps you must follow for diving in. For purposes of this experiment, I’ll go over what I did with my device.

I used an old phone. I performed a factory reset, followed by a de-bloat using Canta and Shizuku. After that, I installed an APK of F-Droid and grabbed Termux from there.

Then, I followed our handy guide to installing Linux on Android. I chose to install Ubuntu using proot-distro install [your Linux distro container]. I selected Ubuntu.

Since I’m setting up my pocket server to use Syncthing, I figured it would be easier to have a desktop interface, so I downloaded Andronix (an app that installs your Linux distro and a desktop for it) and RVNC (a server where you interact with your Linux desktop).

After running the Andronix > Termux > RVNC Server process, I had Ubuntu running on my wife’s old phone.

The first challenge was getting online

There was an immediate compatibility issue

Connecting to a VNC server on Android. Credit: David J. Buck/How-To Geek

Getting onto Ubuntu wasn’t difficult, although it felt like the installation through Termux took an eternity to complete. I immediately loaded the Terminal Emulator and punched in apt install syncthing.

It installed the application just fine. So far, so good. I opened the web browser. Instant input/output error. Modern versions of Ubuntu use snaps for packages, but they won’t work on the phone.

This is because proot-distro doesn’t have root access and can’t use systmd. Essentially, running in a containerized environment. Fortunately, there was a workaround.

How to access your server once installed

There are multiple methods available

Installing Ubuntu linux on an Android phone.
David J. Buck/How-To Geek

On the desktop instance of Ubuntu, I tried using Dillo, but it didn’t work because it doesn’t support JavaScript (Syncthing requires it). I also tried Falkon, but Ubuntu really didn’t like it.

So, I ditched the GUI and ran everything straight through Termux. I set up a new user, so I wouldn’t be running Syncthing as root.

Although you’re running Linux through Termux, you can use a standard browser that’s already on your phone to access your server. I used Vivaldi for this setup because I tend to prefer its speed and ease of use over other browsers.

It’s also less temperamental than trying to use a modern browser inside what is essentially a shared kernel container.

Getting things in sync

How I actually use the pocket server

Syncthing-fork on a Fairphone 6. Credit: Bertel King / How-To Geek

Things ran much more smoothly when I switched to just the command line. I switched users and launched Syncthing by typing syncthing into the command line on Termux. To open the Syncthing GUI, you need the GUI Listen address, which is 127.0.0.1:8384 . It only listens for connections from the same computer running Syncthing, making it a safer option. I set up a username and password to further increase security.

Then, I set up a folder in Syncthing (using the same method I have in the past) and attached the two other devices I’ll be using with it.

The devices need to be connected to the same Wi-Fi network so they can talk to each other. Beyond that, connecting devices with Syncthing is straightforward.

Right now, I’m using the server to host work-related images, some homebrew NES games, some personal website/YouTube assets, and some of my own recorded music. It frees up disk space on hard drives and gives me instant access to them when I need them.

I upload music or other files to be instantly accessible from any shared device.

I can use this to help my workflow. I take a lot of pictures for articles. Getting them to my computer is easier with something like this, simply because I’ll take them with the same phone (the camera still works fine), save them to my synced folder, and then just download them on my connected machine.

Setting the stage for long-term use

Some things to consider before using the server

A hand holding a phone showing Termux downloading and installing packages. Credit: David J. Buck/How-To Geek

Keeping the server running without interruptions is probably the biggest challenge when using this type of setup. Termux already helps with offering a wake lock, which you can turn on using termux-wake-lock to prevent the phone from going into a deep sleep.

Since I’ll be using this device daily and keeping it on, adjusting battery settings to prevent the phone from going into power-saving mode (and killing the app), and preventing your browser from killing the Syncthing GUI by disabling page preloading.

And since it’ll likely be plugged in constantly, keep an eye out for battery swelling.


Portable cloud storage for $0 a day

Building a pocket server from an old, unused phone is a great way to learn and get more hands-on with self-hosting. I like the flexibility of a pocket server and the low cost. I will say this experiment was definitely one of the more complex ones I’ve done with Termux.

Starting with a desktop version was a mistake, when the CLI worked just fine for a headless server. Given the hassle, challenge, and limitations of this project, but as a fun weekend or “because I can” home lab project, I think it’s worthwhile to dive in and do some hands-on learning/experimentation.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


Microsoft has spent the last several years pushing Copilot and new user interface designs, which has meant that several great features included with Windows don’t get the recognition that they deserve. These are some of my favorites that will run on any Windows 11-compatible PC.

Clipboard history remembers everything you copy

Win+V replaces one of the oldest frustrations in computing

Windows’s default clipboard has been a source of minor but constant annoyance: it holds exactly one thing. If you copy something new, the previous item is wiped out. It is enough of a problem that multiple third-party apps were created to address the shortcoming.

Now, Windows has Clipboard History built in, though it isn’t enabled by default. To turn it on, press Windows+i, then navigate to System > Clipboard, and click the toggle next to Clipboard history.

Once it is enabled, you can press Win+V to view up to 25 items in your clipboard history, including text, images, and links.

If you have specific pieces of information you use daily—like an email signature, a common code snippet, or a home address—you should pin up some of those items. Pinned items persist between system reboots and clipboard history clears, which means you never have to hunt to find something when you need it.

You can even enable sync in the Clipboard settings, allowing your copied text to follow you between different PCs signed in to the same Microsoft account. Once you get into the habit of using Win+V, the standard copy-paste function will feel useless by comparison.

Voice typing actually works now

Win+H lets you write with your voice

Notepad with Windows Voice Typing popup visible.

Windows dictation software has a reputation for being clunky and difficult to use, but that isn’t the case anymore. Thanks to the improvements in AI that we’ve seen since 2024, voice typing accuracy has improved significantly, especially for technical vocabulary. You don’t have to spend your time manually fixing formatting either. The tool supports punctuation commands like “period,” “new line,” and “question mark,” which prevents your text from turning into a rambling mess.

To use voice typing, press Windows+H anywhere there is a text field.

While it isn’t a full replacement for high-end professional software, it is free, built-in, and more than good enough for long-form writing, taking down a sudden idea, or writing quick messages when your hands are full.

Snap layouts make window management effortless

Hover over the maximize button and pick a layout

Notepad with the Windows Snap Layout window visible.

You can manually drag windows to the edges of your screen to split your display up, but you’re doing more work than is necessary in most cases. Windows’ Snap Layouts allow you to instantly arrange your Windows into predefined halves, thirds, or quarters. Just hover over the maximize button on any window or press Win+Z.

One of the most practical aspects of this system is the Snap Group. If you snap a browser and a document side-by-side, Windows remembers them as a pair. When you Alt+Tab, you can bring the entire group back together.

Live captions transcribe any audio on your device

Real-time subtitles for anything you’re watching

You can enable real-time subtitles for any audio playing through your speakers by going to Settings > Accessibility > Captions, or by pressing Win+Ctrl+L. The audio is processed locally on your device; nothing is sent to the cloud, which is critical if you’re privacy conscious or if whatever you’re captioning demands confidentiality.

I’ve mostly taken to using it when it is too hot to wear my headphones. I can just toggle it on and keep watching without disrupting anyone around me.

There are some hardware requirements you need to meet. Basic same-language captioning works on any Windows 11 PC running 22H2 and up, but if you want real-time translation, you will need Copilot+ hardware with an NPU and at least Windows 11 24H2.


The NZXT Capsule Elite USB microphone sitting on a desk.


Windows 11’s voice typing convinced me to skip Wispr Flow and other premium apps

Windows lets me turn my rambling thoughts into notes without typing anything.

Dynamic Lock locks your PC when you walk away

Pair your phone via Bluetooth and your computer can lock itself automatically

I can’t count how many times I’ve stepped away from my PC only to think, “Dang, I forgot to lock my PC.”

Fortunately, Windows has an easy way to handle that automatically by pairing your phone with your PC. When your phone gets out of range (about 20 feet in my house, though your wall materials and layout will affect that), your computer will automatically lock after about 30 seconds. There is no need to install a separate app on your phone, the setup just uses the Bluetooth connection itself. While the 30-second delay means it isn’t a guarantee no one can access my PC, it does mean it won’t remain unlocked if I step away for a long time.

I especially like this feature when I’m working on my laptop in public.

You can enable Dynamic Lock by navigating to Settings > Bluetooth & devices and pairing your phone, then enabling Dynamic Lock in Settings > Accounts > Sign-in options.


Microsoft includes tons of great tools if you dig for them

These tools aren’t alone either. There are tons of practical tools buried in Windows, unappreciated and underutilized.

Each of these tools takes less than a minute to enable, but they can make a significant difference in your day-to-day workflow. It is worth the small investment of time to find them and set them up.

If you’re looking for even more advanced customization options, I’d recommend checking out Microsoft PowerToys. It gives you a huge range of fantastic tools that make Windows much more pleasant to use.



Source link