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


It’s the first of the month, which means Netflix has added a substantial number of new movies and shows. Some of the highlights include the Creed movies, Friday Night Lights, The Karate Kid franchise, and the first five seasons of Hawaii Five-0. Keep an eye on the new movies coming later this month, including Office Romance and Little Brother.

As for the thriller section, there are several movies to check out this week. My top pick is a recent crime thriller from an Academy Award-nominated director. My other two movies are total opposites. One is a disturbing psychological thriller featuring two familiar faces, while the other is a notable book-to-screen adaptation.

3

The Girl on the Train

Based on the bestselling novel

The Girl on the Train walked so that It Ends with Us could run. What do I mean? It’s not like The Girl on the Train was the first movie to be based on a book. I’m more focused on the style of thriller — a beach read that is predominantly aimed toward women. Hoover’s books continue to become box-office hits. In 2016, The Girl on the Train proved that there is an audience for this type of thriller.

Based on the novel by Paula Hawkins, The Girl on the Train stars Emily Blunt as Rachel Watson, an alcoholic divorcée who recently lost her job. To pass the time, Rachel rides the train and imagines the new life of her ex-husband, Tom (Justin Theroux), and his new wife, Anna (Rebecca Ferguson). One day, Rachel witnesses a troubling event in the backyard belonging to Scott (Luke Evans) and Megan Hipwell (Haley Bennett). The authorities don’t believe her due to her alcoholism, so Rachel will need more proof than her word.

The Girl on the Train has all the staples of a page-turning thriller. There are several twists that will make you question what is true and what is a lie. It’s a story of deceit and obsession that mixes sexual tension and disturbing violence into its storyline. Blunt gives a convincing performance as an alcoholic searching for answers in the case and in her personal life. At just under two hours, The Girl on the Train certainly delivers everything you want out of an entertaining thriller.

2

The Good Son

Kevin McCallister breaks bad

If your children enjoy the Home Alone franchise, then do not let them watch The Good Son. Speaking from experience, this movie should be consumed by teenagers and adults who are at least 17 years old. I watched this movie as a kid, and it shook me to my core. I would still recommend it because it’s genuinely one of the most shocking performances from an actor who you would never expect to take on this role.

After the death of his mother, 10-year-old Mark Evans (Elijah Wood) is sent to spend winter break with his Uncle Wallace (Daniel Hugh Kelly) and Aunt Susan (Wendy Crewson). Mark also reunited with his two young cousins, Henry (Macaulay Culkin) and Connie (Quinn Culkin). Mark quickly discovers that Henry might be the devil stuck inside a 10-year-old’s body. Henry is fascinated by death and facilitates several evil acts, including a massive car pileup. When Henry sets his sights on his own family, it’s up to Mark to stop it before it leads to tragedy.

Home Alone 2 is my favorite Christmas movie. Imagine being a kid and watching Kevin McCallister in The Good Son trying to kill his sister. Frankly, it’s disturbing. You can’t unsee what Culkin did as the devil’s child. I’ll let you judge it for yourself; my guess is you’ll agree with me.

1

Dead Man’s Wire

Inspired by a real standoff

Gus Van Sant is too talented to be sitting on the sidelines for a long period of time. Van Sant, who helmed Good Will Hunting and Milk, last made a film in 2018 called Don’t Worry, He Won’t Get Far on Foot. He did not make another film until Dead Man’s Wire, which had a festival premiere in 2025 before releasing in theaters in January 2026. That’s an unacceptable amount of time without a Van Sant movie. Be better, Hollywood.

Dead Man’s Wire is inspired by the true story of Tony Kiritsis, played by Bill Skarsgård. In February 1977, Tony takes mortgage broker Richard Hall (Dacre Montgomery) as his hostage after losing money on a deal brokered by Richard’s father. Tony points a sawed-off shotgun at Richard to serve as a dead man’s switch. The ensuing standoff makes headlines, as Tony tries to convince the public of what led to his breaking point.

The movie is based on a true story, so it could follow a blueprint of real-life events. However, it’s a genius idea for a thriller — a mentally unstable person seeks revenge against the corporation that wronged him. You might even find sympathy toward Tony, a credit to Skarsgård’s captivating performance.


More movies to watch this week

Thrillers are not the only genre to explore on Netflix. If you’re a fan of rom-coms, one of Netflix’s newest movies is Office Romance, a charming romantic adventure starring Jennifer Lopez and Brett Goldstein. Office Romance hits Netflix on June 5. Plus, Netflix users can stream the first six movies in the Rocky franchise.

Subscription with ads

Yes, $8/month

Simultaneous streams

Two or four




Source link