Android Web Server

Do you want to have a web server in your pocket running on your android smart phone? Here I am going to discuss how to convert your android phone into a web server along with a domain name associated with it. There are a lot of Web Server apps are available in android market but what I found interesting is kWS – Android Web Server by Kamran Zafar.

kWS – Android Web Server by Kamran Zafar

kWS is a lightweight and fast Web Server especially designed for android mobile devices. It can be used to host websites and to serve files over HTTP. kWS implements HTTP1.0.


  • Basic & digest authentication for secure access
  • Server side includes (SSI)
  • Directory index
  • Directory downloads in tar, tgz & zip formats
  • Resumable file downloads
  • Built in Dynamic DNS update client. Supports Dynamic DNS Providers and
  • Up to 20 parallel connections
  • Comprehensive HTTP logs

Additional features in Pro version

  • HTTPS/TLS support with BKS & PKCS12 keystores
  • Password based file encryption (128 bit AES & Triple DES)
  • GZip file compression
  • Directory index in JSON & XML formats and index sorting
  • Highly configurable with support for up to 999 per-port parallel connections
  • Directory level configuration
  • Support for more Dynamic DNS providers like ZoneEdit etc.

Configure kWS – Android Web Server

  • Download and install kWS – Android Web Server.
  • Launch kWS – Android Web Server, then go to Options and tap Settings
  • General section you can configure below parameters:
    • Home directory: The path of directory where your website contents are stored and will be served from by kWS – Android Web Server e.g. “/sdcard/web” without double quotes. In this case all website contents must be placed under “/sdcard/web” directory.
    • Port: The TCP port on which kWS – Android Web Server will listen on. It can be any port greater than 1024 and less than 65535. Say 8080.
    • Bind address: This option is only available in PRO version.
    • Concurrent Connections: In lite version it supports up to 20 concurrent connections, so it can be anything between 1-20. Say 5.
    • Connection timeout: This option is available only in PRO version. This is the timeout value after which connection with client will be closed.
    • Status Notification: This option will show server status on notification bar if enabled.
  • Advanced section you can configure below parameters:
    • Server Side Includes: It will allow server-side scripting language to be used by Android Web Server.
    • Directory level config: Only available in Pro version
    • Directory Index: You can set directory content listing if the default document is not available in directory.
    • Dynamic DNS:
      • Dynamic DNS provider: Select the service provide for your dynamic dns service. You can choose from None, and I selected
      • Username: Username to access your DDNS service account
      • Password: Password of your DDNS service account
      • Hostname: Host name which you set up at your DDNS service providers server. I have entered
      • Auto update DNS: Updates DNS when server starts if enabled.
      • Force update DNS: Only available in Pro version.
  • Security section you can configure below parameters:
    • Authentication:
      • Authentication: You can choose authentication method between None, Basic and Digest. To run a public android web server so that any body can open up your website you must choose None here. In remaining two options it will ask for login credentials before opening up the website.
      • Realm: Available only in Pro version
      • Username: Login username in case if you chose authentication method other than None.
      • Password: Login password in case if you chose authentication method other than None.
    • SSL settings: As we discussed in feature list kWS – Android Web Server Pro version supports SSL also. So, here you can configure SSL related settings
    • Encryption: Only available with Pro version
  • Logging section you can set the log options:
    • Server log level: You can select from Info, Verbose and Debug
    • Buffer size: You can set log buffer size in KB
    • Log to file: This will log server-messages to kws.log file
    • Overwrite http logs: If enabled will overwrite previous logs other wise it will create date based log files and maintain all log files
  • Finally Start Server by tapping “Start server” button

The configuration part is over. Now how to check whether everything configured properly. To access your android web server you could either have your IP address or if you have configured Dynamic DNS then the fully qualified domain name is required or using either one you could access your android web server running on your android smart phone. But if you have dynamically assigned IP address to your WAN interface then it is recommended to register for Dynamic DNS service and setup a host name there, because if you want to run a public android web server then how visitor will know your IP address to access your website. Now to access android web server open up your web browser and type either http://your_ip_address:port or http://ddns_fqdn:port and then press enter.

Cheers! Your android web server is up and running. Please drop us a comment if you have any queries.

Related Posts

10 thoughts on “Android Web Server

  1. Do you know of way to have the Web Server start automatically upon opening the KWS app? I’m looking for a solution to have this start automatically as part of a boot process. I can launch the app, just not “start server” automatically…any suggestions?

        1. ajssibtr gopalthorve hi! I am sorry friend. I can’t find the answer. I am not finding the command line which can be used to launched during android boot process using init scripts.

  2. Hi there! Incredibly good piece of writing! I am a frequent visitor to your site (a lot more like addict ) of the website though I had a is sue. I am never for sure if it is the right site to question, but you’ve got no spam comments. I receive comments every day. Are you going to you help me? Thanks a bunch!

  3. I simply want to mention I am very new to blogging and site-building and seriously loved this web site. Very likely I’m going to bookmark your website . You definitely have awesome well written articles. Regards for revealing your blog site.

  4. Its such as you read my thoughts! You appear to understand so much approximately this, like you wrote the book in it or something. I think that you just can do with a few % to pressure the message home a little bit, however other than that, this is magnificent blog. A fantastic read. I will definitely be back.

Leave a Reply