User Tools

Site Tools


LuCI Essentials

Installing LuCI on uHTTPd

This installs the essentials of the Web User Interface LuCI. See opkg update && opkg list luci-* for all available packages to administer OpenWrt through LuCI.

  • Preferred & Secure
    opkg update && opkg install luci-ssl-openssl
In case you are not familiar with a CLI, check out command-line HELP and/or opkg

Native Language Support

The basic LuCI web user interface is in English. However, it is being actively translated into many languages by volunteers. See and get involved! For a list of available packages, do

opkg list | grep luci-i18n-

You will see a list of the available language packages. To install your native language, do e.g.

opkg install luci-i18n-hungarian

You can also install language packs utilizing the WebInterface and you can install multiple LuCI language packs at the same time and switch between them in the LuCI-WebInterface or by editing the file → /etc/config/luci

Start and Enable the web server (uHTTPd)

The web server software uHTTPd is a dependency of the LuCI package and is automatically installed when you install LuCI. After installation the web server is not running! You need to manually start the web server. You should also enable the web server, so that it automatically starts up whenever you reboot the router. The first command below starts the web server, the second enables it across reboots.

/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable

Now you should be able to connect to the web server serving LuCI at


LuCI is installed as a 'meta package' which installs several other packages by having these defined as a dependency. Notably, it installs the uHTTPd web server, configured for use with LuCI. The dependent packages are the following (see the LuCI technical reference for more information):

  • uhttpd
  • uhttpd-mod-ubus
  • luci-mod-admin-full
  • luci-theme-bootstrap
  • luci-app-firewall
  • luci-proto-core
  • luci-proto-ppp
  • libiwinfo-lua

In case you want to use uHTTPd for the web interface there is little configuration necessary as uHTTPd is configured with CGI to make LuCI work with the Lua interpreter. By default this is organised as follows. By default /www is the standard document root. Thus, by requesting this docroot (by pointing your browser to the devices IP address) an index file such as index.html is searched for (per uHTTPd settings). The file /www/index.html (installed with LuCI) is prepared such that when requested, it redirects you to /cgi-bin/luci, which is the default CGI gateway for LuCI. This is just a script, which basically calls Lua at /usr/bin/lua. uhttpd is configured by default to load pages as CGI in the /cgi-bin path, and thus starts serving these pages with the /cgi-bin/luci script.

It is also possible to run LuCI with Lua as an embedded process. uhttpd supports this; see the corresponding section of the uHTTPd Web Server Configuration article on the UCI configuration of uhttpd.


The default web server software uhttpd is configured in the file /etc/config/uhttpd.
The LuCI web interface is configured in the file /etc/config/luci.

LuCI on other web servers

LuCI on lighttpd

LuCI on nginx

LuCI on nginx is currently supported by using uwsgi as plain-cgi interpreter. You need to install one of this 2 variants of the LuCI meta-package:

  • luci-nginx – Autoinstall nginx, uwsgi-cgi and the default config file to make luci work on nginx
  • luci-nginx-ssl – Autoinstall nginx-ssl, uwsgi-cgi and the default config file to make luci wok on nginx. It does also create a self-signed certificate for nginx and redirect http traffic to https by default

Currently LuCI on nginx is fully supported. If any problem is found, report them to the support forum.

Minimalistic offline installation

Download and transfer (e.g. using SCP) the packages listed below to your OpenWrt router onto the RAM disk in /tmp/luci-offline-packages

mkdir -p /tmp/luci-offline-packages; cd /tmp/luci-offline-packages
  • liblua
  • lua
  • libuci-lua
  • libubus
  • libubus-lua
  • uhttpd
  • rpcd
  • luci-base
  • luci-lib-ip
  • luci-lib-nixio
  • luci-theme-bootstrap
  • luci-mod-admin-full
  • luci-lib-jsonc

and install them with:

opkg install /tmp/luci-offline-packages/*.ipk; done

Or use this script bellow. Note, the script assumes you have internet access through the router where you are installing Luci. If you do not, then you will need to either manually download required .ipk packages, or run the script in two parts. First part till the last Done statement to be executed when connected to Internet.:

#assumes the user has egrep, wget, ssh, and scp
set -e
# Change this to match your router
# These should be fine unless you've changed something
packages_base="liblua lua libuci-lua libubus libubus-lua uhttpd rpcd"
packages_luci="luci-base liblucihttp liblucihttp-lua luci-lib-ip luci-lib-nixio luci-theme-bootstrap luci-mod-admin-full luci-lib-jsonc luci-mod-status luci-mod-system luci-mod-network libiwinfo-lua libiwinfo-lua"
mkdir "$tmpdir"
cd "$tmpdir"
wget -N --quiet "${url}base/Packages"
for pkg in $packages_base; do
    pkgfile="$(egrep -oe " ${pkg}_.+" Packages | tail -c +2)"
    wget -N --quiet "$pkgurl"
wget -N --quiet "${url}luci/Packages"
for pkg in $packages_luci; do
    pkgfile="$(egrep -oe " ${pkg}_.+" Packages | tail -c +2)"
    wget -N --quiet "$pkgurl"
wget -N --quiet "${url}luci"
for pkg in $packages_luci; do
    pkgfile="$(egrep -oe " ${pkg}_.+" Packages | tail -c +2)"
    wget -N --quiet "$pkgurl"
ssh "${user}@${ip_address}" mkdir -p /tmp/luci-offline-packages
scp *.ipk "${user}@${ip_address}":/tmp/luci-offline-packages
ssh "${user}@${ip_address}" opkg install /tmp/luci-offline-packages/*.ipk
ssh "${user}@${ip_address}" rm -rf /tmp/luci-offline-packages/
ssh "${user}@${ip_address}" /etc/init.d/uhttpd start
ssh "${user}@${ip_address}" /etc/init.d/uhttpd enable
rm -rf "$tmpdir"


Secure acccess to luci webserver

If you want to configure Luci webserver for secure access, read the explanation here.



docs/guide-user/luci/luci.essentials-tomerge.txt · Last modified: 2018/11/29 03:36 by cmcaine