Website in your pocket. Turn your Android phone into a web server! 🚀

Website in your pocket. Turn your Android phone into a web server! 🚀

Hosting a website is simple right? Let us do something cooler insted. How about hosting a website from your Android device? Do not worry, we need not root/jailbreak your phone.

🚀 Let’s Get Started!

Tools You’ll Need:

Termux: Termux is an Android terminal emulator for running a web server like Node.js http-server.

Pinggy: Pinggy.io is a tool to obtain public URLs for accessing your server.

Sneak Peek

Here’s a sneak peek of a blog running on a $180 Android phone. Check out the screenshots below:

Step 1: Install Termux

First, we need to install Termux. This app emulates a terminal and Linux environment on your Android device without rooting or additional setup. You can get Termux from F-Droid or download the APK directly from the Termux website.

Step 2: Install Necessary Packages

Now, let’s get the essential packages for our web server. Open Termux on your phone. Update and install the packages using these commands:

pkg update
pkg upgrade
pkg install openssh
pkg install nodejs-lts

Check the versions to ensure they installed correctly:

node –version
npm –version

Step 3: Start the Server and Pinggy Tunnel

Create a sample HTML page:

echo “<h1>My awesome website!</h1>” > index.html

You can edit this page using nano or vim editors. Then, start the http-server:

npx http-server &

This command runs the server on port 8080 by default.

Now let’s get a public URL with one Pinggy command. In a new Termux window tun the following.

ssh -p 443 -R0:localhost:8080 a.pinggy.io

You’ll receive a public URL like https://ranxyzxxxx.a.pinggy.online. Share this URL with your friends and see live stats of visitors on the Pinggy terminal interface. 🎉

Hosting a website or blog from your Android device might sound impossible, but it’s totally doable with the right tools! Using Termux and Pinggy, you can create and share your content with the world. So, why not give it a try? Unleash your creativity and bring your ideas to life on your personal web server! 🌟

Please follow and like us:
Pin Share