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.

In case you are not familiar with a CLI, check out command-line HELP and/or opkg

Installation

  1. Retrieve the current list of available packages in the repository:
    opkg update
  • For a full LuCI installation without HTTPS support:
    opkg install luci
  • For a full LuCI installation with HTTPS support
    opkg install luci-ssl

OPKG install luci

Native Language Support

The LuCI web user interface is being actively translated by volunteers. See http://i18n.luci.subsignal.org/pootle/ and get involved! For a list of available packages, do

opkg list | grep luci-i18n-

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 the web server (uHTTPd)

The web server software uHTTPd is a dependency of the LuCI package and automatically installed on your OpenWrt system, when you install LuCI. After installation the web server is not running! You need to manually start the web server (uHTTPd):

/etc/init.d/uhttpd start

Now you should be able to connect to the web server serving LuCI at http://192.168.1.1.

Enable the web server (uHTTPd)

To make the web server being started automatically after each reboot, you need to enable it, i.e. register the web server in the start up scripts.

Enable automatic start at boot:

/etc/init.d/uhttpd enable

Details

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.

Configuration

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 ...

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-lua
  • uhttpd
  • luci-lib-ipkg
  • luci-i18n-english
  • luci-sgi-cgi
  • luci-lib-core
  • luci-lib-nixio
  • luci-lib-sys
  • luci-lib-web
  • luci-proto-core
  • luci-theme-base
  • luci-theme-openwrt
  • luci-mod-admin-core
  • luci-mod-admin-full

and install them with:

for pkg in liblua lua libuci-lua libubus-lua uhttpd luci-lib-ipkg luci-i18n-english luci-sgi-cgi luci-lib-core luci-lib-nixio luci-lib-sys luci-lib-web luci-proto-core luci-theme-base luci-theme-openwrt luci-mod-admin-core luci-mod-admin-full; do opkg install /tmp/luci-offline-packages/$pkg*.ipk; done

Additionally, the following packages are needed for basic wireless configuration: libiw, libiwinfo, libiwinfo-lua.

Troubleshooting

  • LuCI has its own web-presence. Please file LuCI specific bugs at the LuCI website

Notes

Back to top

doc/howto/luci.essentials.txt · Last modified: 2014/07/10 12:38 by tapper