How to run a web server on your Android device – LAPTOP


Whether you have a $ 50 mini PC that you leave plugged in all the time or a 5-inch smartphone that you take with you, you can use any Android device as a full-fledged web server accessible over the local network or from anywhere on the internet. . With an Android web server, developers can easily test their code without paying for a hosting service. Freelancers can take a copy of the web tools they’ve created with them to show off to their clients. Home and small business users can even configure custom web tools for local network users.

Here’s how to set up a web server on your Android phone, tablet, or mini PC.

Install the web server

1. Install and launch KSWEB on your Android device. The app only has a six-day free trial, after which it costs $ 2.99. There are a number of other web server applications including Bit Web ($ 2.39) and Ultimate Servers, but we chose KSWEB for this tutorial because it is one of the simpler options.

2. Go to the IP address listed by KSWEB in your computer browser or localhost: 8080 on the device itself.

3. Click on the link for the KSWeb interface and enter the default username and password (admin and admin).

4. Select System Settings and change the default password from “admin” to something else.

5. Select KSWEB settings, enter a MySQL shell password and press save. You can stick with the default blank password, but it is not recommended to have a blank password, even if your server is not connected to the Internet.

6. Select a root directory for your site by pressing Document Root in the KSWEB application settings menu and entering the appropriate file path. You can keep the default directory (/ mnt / sdcard / htdocs), but we recommend that you save space by placing the folder on a microSD card, if your Android device has one.

You can now visit your site by going to localhost: 8080 on the Android device or by going to the IP address displayed by KSWeb. However, at this point you will only see the default KSWEB homepage and you will only be able to access it from the local network.

FOLLOWING: Galaxy S4 Tips

Make your server accessible from the web

If you want users outside your local network to see your web server, you need to make some changes to your router settings. Each brand of router has its own administration menus, so the names of the menus and fields vary slightly, but these are the general steps you should take to make your Android web server available on the Internet. Our screenshots and menus were taken from a TRENDnet TEW-633GR router.

1. Log in to your router’s administration page from your computer. If you do not know its IP address, consult your router’s user manual.

2. Make a static IP address available for your Android device. Local IP addresses tend to start with and work your way up from there. If your router provides DHCP (Dynamically Assigned IP I) to a range of addresses, anything below that range will be available for static assignment. For example, our router uses the addresses to for dynamic assignments, so we chose to give our phone the address Some routers will also allow you to reserve a specific address.

3. Configure your router to forward port 80 to port 8080 on the static IP address you assign to your android device. On our router this feature was called “Add Virtual Server”, but on others it will be called “Port Forwarding”.

4. Access the Wi-Fi menu on your Android device.

5. Long press the name of your Wi-Fi network and select Change network.

6. Check show advanced options.

7. Select Static under IP Settings and enter the static IP address you have chosen (or reserved) and press Save.

8. Search on Google for the term “What is my IP address” to find your router’s public IP address. Google will display it above the search results.

Anyone on the Internet will now be able to access your site, as long as you give them this IP address to use. Unfortunately, unless you pay for a plan with a static IP address, your number might change the next time you restart your router. You can resolve this issue by purchasing a domain and using a dynamic DNS service such as which always directs that domain to your current IP address, no matter how often it changes.

Keep in mind that hosting a website from your home Internet connection may violate your ISP’s terms of service. Therefore, if you expect everyone to visit the internet, you might want to upgrade your account or purchase a web hosting package.

FOLLOWING: 5 Ways To Speed ​​Up Your Android Phone In Under 5 Minutes

Keep your web server awake

When your Android device goes to sleep, the server software also goes to sleep so that users cannot connect to it. There are a number of apps that will prevent your device from sleeping, but we love Keep the screen on because it lets you decide which apps will keep the screen awake and configure the device not to go to sleep while charging.

To keep your Android device awake while the server is up:

1. To install Keep the screen on.

2. Switch the service to On and tap Settings.

3. Enable the Keep screen on while charging option. If you plan to keep your server operational, you should still leave your device plugged in.

4. Tap Apps. A list of all applications appears.

5. Check the box next to KSWEB and tap the bulb icon in the upper right corner of the screen.

6. Select “When the application is running” in the context menu that appears.

FOLLOWING: 30 apps for rooted Android phones

Adding Files to Your Android Web Server

With KWSWEB running, you browse your site directly from the Android device by navigating to local host: 8080 or you can visit its IP address from any computer on your local network. However, there is no point in visiting a site that has no content. If you want to put HTML files, PHP scripts, images or other files on your server, you can either create them locally or send them from your PC via FTP.

To edit Android web server files locally:

1. To install Droidedit or another code editor on your Android device.

2. Write or edit web files in HTML, CSS, PHP, Javascript or other languages.

3. Save files to web server directory by selecting Save As and browsing to the appropriate folder.

To send files to your server using FTP:

1. To install Ftp server by Olivier.

2. Tap Home Directory in the FTP server settings menu and select custom folder.

3. Tap on Custom folder in the settings menu and enter the KSWEB root directory (/ mnt / sdcard / htdocs if you haven’t changed it).

4. Set a username and password by tapping these options in settings.

5. Press the start button in the FTP server. If the server is active, the button will turn green after pressing it. You can press it again to turn off FTP.

6. Forward port 21 to port 2221 on the IP address of your Android device in your router’s software if you want to perform an FTP from outside your local network.

Users will now be able to upload and download files from your web server by entering local or public IP addresses into an FTP client such as Filezilla.

MORE: Best Android Security Apps 2013

Install WordPress on your Android server

With PHP and MySQL on your server, you can install any content management system (CMS), including WordPress, a very powerful publishing tool used by over 8.5 million sites, including several large ones. To install WordPress on your Android server:

1. Install Astro file manager if you haven’t already.

2. Download WordPress zip file from

3. Launch Astro File Manager and navigate to the download folder (usually under / sdcard / Download) on your device.

4. Long press the wordpress zip file and select Extract here.

5. Copy the wordpress folder under Download, then paste it into the server root directory.

6. Access the device’s local IP address at port 10,000 on your computer. PhpMyAdmin will load.

7. Enter root as username and password that you assigned to it when configuring KSWEB.

8. Click on the Databases tab at the top of the screen.

9. Enter “wordpress” in the Create database field and press Create.

ten. Access the IP address of your server with the port: 8080 and the path /wp-admin/install.php (ex: on your PC.

11. Click on Create a configuration file when prompted

12. Enter your database username and password when prompted by WordPress.

13. Click on Run installation when WordPress asks it.

14. Enter your site title, username, password and desired email address so press the Install WordPress button. These are the credentials that you will use to sign in to WordPress after it is installed.

WordPress will then confirm your installation and allow you to log in for the first time.

You will be able to log into WordPress and write new articles by going to your IP address / wordpress / wp-admin.


Comments are closed.