Your old Android can also be a web server: now I load my website from my mobile

your old android can also be a web server now.webp.webp.webp
your old android can also be a web server now.webp.webp.webp

Android mobiles are incredibly versatile, being able to convert from a portable console to an e-book reader, a Google Home or a webcam, to name a few. An Android mobile too can become a web server.

Your next website can live on your mobile and be visible to the whole world, as long as your mobile is still connected to the Internet. ob

My website lives on my mobile

When creating a website you basically have two options: use a hosting service or host it yourself. In the latter case, it is normal for you to have the server on a computer with a Linux distribution, but you can also do the same on something else that you walk around the house: on an Android mobile.

Best of all, the process for turn an android mobile into a web server It is much simpler than it would seem at first glance, even for those who have never touched a system terminal in their life, as detailed in this blog, hosted on a mobile with Android 11.

all you need is termux, a powerful Linux emulator for Android. You can download it from F-Droid, as the Google Play version is outdated. Termux installs like any other application and does not require root.

Being a miniature linux, Termux keeps multiple processes running on the system and might not work correctly starting with Android 12 as the system limits the number of threads an app can keep running. However, for the simple web server in our experiment, I have had no problems with Android 13.

First, prepare the ground

With Termux installed, you will need to install all the necessary packages in your pocket Linux. For this we are going to need to open Termux and write some commands in the terminal. First of all, let’s update packages with the following commands:

pkg update

pkg upgrade

Write the previous commands separately, pressing the en button


The first step is to install Termux and all the necessary packages.

Then comes the time to install two packages that we are going to need for our web server. Again, enter the commands one by one in the terminal, one by one, and stay tuned as you will be prompted to respond by typing if you want to confirm the download or installation. When in doubt, accept the default option.

pkg install openssh

pkg install nodejs-lts

Create your website

At this point you already have all the necessary tools but you are still missing the most important thing: your website. Since we are basically doing an experiment, if you want you can go for a basic “Hello world”, using the following command to generate an HTML page that says exactly that, “Hello world”.

echo “

Hello World

” > index.html

If you have something more complex in mind and feel like having an entertaining HTML writing session with Gboard, then you can use the nano text editor to edit the HTML file and create a somewhat more complex page:



Creating the web from the terminal is, without a doubt, the heaviest

Make your website accessible from the outside

You already have your website, but need to start the web server to make the website accessible. You can start the Termux web server using the following command in the terminal:

npx http-server &

At this time you can visit your creation from the same device, at the address or from another device in the same local network, using the local IP of the mobile. However, the website will not normally be accessible from the outside, unless you’ve gone to the trouble of port forwarding the router. There is a better alternative.

Instead you can use the Pinggy service to create a public web address. you can use pinggy free on a limited basis, which will make each address expire after 60 minutes, more than enough for our invention. Type the following command to enable pinggy redirection:

ssh -p 443 -R0:localhost:8080

You will see then in the console the web address of your tunnelwhich will be a series of letters before, like This is the address of the web page that lives on your mobile and, now, you can pass it on to your friends so they can visit it.


Upon payment, for about $2.50 a month that Pinggy Pro costs, you could have your web server living on Android with a permanent personalized addressAlthough this already depends on how motivated you are with the project of having the web live on your mobile.

Via | Hacker Newsletter

In Xataka Android | All Google Icons Explained: Here’s What the Logos for Gmail, Drive, Maps, and More Mean