uHTTPd webserver

uHTTPd is OpenWrt's default web server and is used to provide the LuCI web interface.

Its source code is available in the following git repository:

Built as a general purpose HTTP daemon suitable for embedded devices, uHTTPd features include:

  • A lightweight, single-threaded and event-driven architecture with minimal memory footprint
  • HTTP and HTTPS (TLS) support
  • CGI script execution
  • Scripting via Lua and UCode
  • Basic authentication
  • File serving with directory listing capabilities
  • URL rewriting and aliasing

uHTTPd is the standard HTTP server for OpenWrt, and is usually included by default in the system image for the main OpenWrt releases. The package name is uhttpd. In case the package is not installed, it can be installed manually:

opkg update
opkg install uhttpd

However, it is usually installed automatically as a dependency for the LuCI web interface.

The configuration of uHTTPd is performed via OpenWrt's standard uci system. The configuration file is /etc/config/uhttpd. See the uHTTPd UCI configuration page for further details.

One can use the default installation to publish files under /www. Here's a quick example:

mkdir /www/test
echo "Hello world" >> /www/test/message.txt

The file should now be available at e.g. https://192.168.1.1/test/.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2025/07/26 17:55
  • by alphix