Install Webfs Server on Jammy Jellyfish Ubuntu 22.04 system

Webfs is a fantastic web server that helps users to host static content immediately. The web server when installed is capable of hosting static websites and media. It is a better alternative to heavy-duty web servers that are more CPU hungry. 

Here at LinuxAPT, we shall look into how to install Webfs on Ubuntu 22.04 LTS.


Main features of Webfs includes:

  • single process: select() + non-blocking I/O.
  • trimmed to use as few system calls as possible per request.
  • use sendfile to avoid copying data to userspace.
  • optional thread support. Every thread has its own select loop then (compile time option, off by default, edit the Makefile to turn it on).
  • automatically generates directory listings when asked for a directory (check for index.html available as option), caches the listings.
  • no config file, just a few switches. Try "webfsd -h" for a list, check the man page for a more indepth description.
  • Uses /etc/mime.types to map file extentions to mime/types.
  • Uses normal unix access rights, it will deliver every regular file it is able to open for reading. If you want it to serve public-readable files only, make sure it runs as nobody/nogroup.
  • supports keep-alive and pipelined requests.
  • serves byte ranges.
  • supports virtual hosts.
  • supports ipv6.
  • optional logging in common log file format.
  • optional error logging (to syslog / stderr).
  • limited CGI support (GET requests only).
  • optional SSL support.


Steps to Install Webfs Server on Ubuntu 22.04 (Jammy Jellyfish) - Step by step guide ?


1. Perform System Update

To begin, run the system update command below to update the system packages:

$ sudo apt update


2. Install Webfs Server on the system

Now install Webfs Server with the below command:

$ sudo apt install webfs


3. Confirm the Webfs Server Installation

To see if Webfs has been installed, run the following command to make sure that it is working:

$ webfsd 

There is no GUI of course. Web servers do not have GUIs to control them. Particularly this is a tiny web server that only helps to host static content in no time.


How to test Webfs Works on Ubuntu 22.04 LTS ?

Now we will see how Webfs works on a Linux system. We will look into its related functions and properties. To see properties, you will need to run the following command:

$ webfsd -h

The command will list further options and commands that will help you to run Webfs server.

The standard way to make use of them is the following command:

$ webfsd [option]

For example, if you want to change the port where Webfs is listening to incoming data then you will have to use the following command:

$ webfsd -p 9000

The default port is 8000.

This will change the port from 8000 to 9000.


How to Uninstall Wbfs From Ubuntu 22.04 Jammy Jellyfish ?

You can run the below command to remove Webfs from your system repositories:

$ sudo apt remove webfs

To complete the removal process, confirm by typing "Y" and pressing the Enter button.


[Need Ubuntu Linux system issues ? We can help you. ]

This article covers how to install webfs on Ubuntu system. In fact, webfs can host static contents without bloating the system resources.

Related Posts