You don't need a cloud server to start learning Linux administration.
A few days ago, I came across a LinkedIn post by Luiz Fernando dos Santos about turning an old Android phone into a Linux server using Termux.
Reading his post made me wonder:
Do I really need to pay for a VPS just to learn Linux and server administration?
The answer, at least for now, seems to be no.
Inspired by his idea, I decided to build my own learning environment using nothing but an Android phone and Termux. This article is the beginning of a series where I'll document everything I learn along the way.
Inspiration
Before getting started, I'd like to give credit to Luiz Fernando dos Santos, whose LinkedIn post inspired this project.
His idea of using an old Android phone as a Linux server showed me that I didn't need to rent a VPS to start learning Linux administration.
You can check out his original post here:
First Steps
I had already been using Termux for quite some time, so the first thing I did was update all the installed packages.
apt update
apt upgrade -y
After that, I installed OpenSSH.
pkg install openssh
Before moving on, I wanted to understand what SSH actually is instead of just following commands from a tutorial.
SSH (Secure Shell) is a protocol that allows you to securely connect to another computer or server through an encrypted connection. It's one of the most common ways to remotely access Linux servers.
After installing it, I found the Termux username, configured a password and started the SSH server.
Then I tried connecting from my computer...
And it worked!
It may sound like a simple thing, but seeing my computer remotely access the Linux environment running on my phone was surprisingly satisfying.
Improving the Authentication
After getting the basic connection working, I started researching how authentication by SSH keys works.
I learned that instead of typing a password every time, it's possible to use a pair of cryptographic keys.
So I generated an ED25519 key pair, copied my public key to the authorized_keys file and configured my computer to use the private key when connecting.
While doing this, I also learned the purpose of some important SSH files:
authorized_keys– stores the public keys allowed to access the server.known_hosts– keeps a record of the servers I've connected to before.~/.ssh/config– lets me save connection settings so I don't have to type long SSH commands every time.
After configuring everything, connecting became as simple as:
ssh termux
No password.
No long commands.
Just one simple command.
Besides being much more convenient, this setup will also be useful later when I start learning GitHub Actions and CI/CD.
The First Problem
The next day I tried connecting again...
But this time it didn't work.
At first I thought I had broken something.
After a little investigation, I discovered that my phone had reconnected to my Wi-Fi network and received a different IP address.
Since my ~/.ssh/config file still pointed to the old IP, I only had to update it with the new one.
Problem solved.
Although it was a small issue, it helped me understand how local networks and IP addressing actually work.
Running My First Node.js Application
Once the SSH connection was working properly, I wanted to test something more practical.
I created a simple Node.js API with a health check endpoint.
After pushing the project to GitHub, I cloned it directly inside Termux, installed the dependencies and started the server.
Finally, I accessed the health check endpoint using my phone's IP address and the application's port.
Seeing a Node.js application running on my phone through SSH was a great feeling.
It was a small project, but it proved that the environment was working exactly as I expected.
What's Next?
This is just the beginning.
Over the next few weeks I plan to keep using this Android phone as my Linux lab while studying topics such as:
- Linux file permissions
- Users and groups
- Shell scripting
- Git
- Networking
- Nginx
- Reverse proxy
- Load balancing
- GitHub Actions
- CI/CD
I know that Termux has some limitations because it's running on Android, and I don't expect it to replace a real VPS.
But for learning Linux fundamentals and experimenting with new technologies, it has already exceeded my expectations.
Final Thoughts
One thing I've learned from this project is that sometimes we think we need expensive tools before we can start learning.
In reality, curiosity and consistency matter much more.
An Android phone, Termux and the willingness to experiment are enough to build a great learning environment.
I'll continue documenting everything I learn in future articles, including the mistakes, the limitations and, hopefully, the progress.
If you're also using Termux for learning, I'd love to hear about your experience.
Top comments (0)