Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:luci:luci.essentials [2019/02/15 19:21] – [LuCI on nginx] ahmar16 | docs:guide-user:luci:luci.essentials [2023/04/03 01:00] – [Offline installation] vgaetera | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== LuCI installation | + | ====== LuCI essentials |
| - | ~~NOTOC~~ | + | {{section> |
| - | <WRAP round info 520px> | + | ===== Introduction ===== |
| - | LuCI installation will fail if there is not enough space for installation.\\ **This is regularly | + | While OpenWrt can be managed completely using SSH and the terminal, the LuCI WebUI makes many administration tasks easier. |
| - | </ | + | The OpenWrt full releases, such as the current 21.02.x series, ship with the LuCI WebUI installed. |
| + | But for lower-memory devices, such as those with 4MBytes Flash and/or 32MBytes of RAM, the full install may fail because of lacking sufficient Flash memory so you will have to [[docs: | ||
| + | More info on this can be obtained [[docs: | ||
| + | ===== Instructions ===== | ||
| + | ==== 1. Basic installation ==== | ||
| + | Install the required packages. | ||
| - | | {{: | + | <code bash> |
| + | opkg update | ||
| + | opkg install luci | ||
| + | </ | ||
| - | ===== Online installation ===== | + | Now you can open LuCI interface. |
| - | This installs the essentials of the Web User Interface LuCI. See **'' | + | ==== 2. Providing encryption |
| - | + | Install | |
| - | ==== Without SSL ==== | + | |
| - | <wrap danger> | + | |
| - | - Open an SSH session to 192.168.1.1 | + | |
| - | - Enter the following <code bash> | + | |
| - | opkg update && opkg install luci</ | + | |
| - | - After the installation has completed, the LuCI web GUI will be available at [[http:// | + | |
| - | + | ||
| - | ==== With SSL on uHTTPd ==== | + | |
| - | <wrap safety> | + | |
| - | - Open an SSH session to 192.168.1.1. | + | |
| - | - Enter the following\\ <code bash> | + | |
| - | opkg update && opkg install luci-ssl-openssl | + | |
| - | </ | + | |
| - | - After the installation has completed, the LuCI web GUI will be available at [[https:// | + | |
| - | ==== Native Language Support ==== | ||
| - | The basic LuCI web user interface is in English. However, it is being actively translated into many languages by volunteers. See [[https:// | ||
| <code bash> | <code bash> | ||
| - | opkg list | grep luci-i18n- | + | opkg update |
| + | opkg install | ||
| + | / | ||
| </ | </ | ||
| - | You will see a list of the available | + | Reload LuCI interface and verify that you are using HTTPS. |
| + | |||
| + | ==== 3. Native | ||
| + | LuCI uses English by default. | ||
| + | You can search and install | ||
| <code bash> | <code bash> | ||
| + | opkg update | ||
| + | opkg list luci-i18n-\* | ||
| opkg install luci-i18n-hungarian | opkg install luci-i18n-hungarian | ||
| </ | </ | ||
| - | You can also install language packs utilizing the WebInterface and you can install multiple | + | You can also install multiple language packs and switch between them in the LuCI settings. |
| + | |||
| + | LuCI is being actively | ||
| + | |||
| + | ==== 4. Additional web applications ==== | ||
| + | Search and install | ||
| - | ==== Start and Enable the web server (uHTTPd) ==== | ||
| - | The web server software [[docs: | ||
| <code bash> | <code bash> | ||
| - | / | + | opkg update |
| - | / | + | opkg list luci-app-\* |
| </ | </ | ||
| - | Now you should be able to connect to the web server serving LuCI at [[http://192.168.1.1]]. | + | ==== 5. Alternative ports ==== |
| + | Use alternative ports: | ||
| + | * HTTP - 8080/TCP | ||
| + | * HTTPS - 8443/TCP | ||
| + | <code bash> | ||
| + | uci -q delete uhttpd.main.listen_http | ||
| + | uci add_list uhttpd.main.listen_http=" | ||
| + | uci add_list uhttpd.main.listen_http=" | ||
| + | uci -q delete uhttpd.main.listen_https | ||
| + | uci add_list uhttpd.main.listen_https=" | ||
| + | uci add_list uhttpd.main.listen_https=" | ||
| + | uci commit uhttpd | ||
| + | / | ||
| + | </ | ||
| + | ===== Extras ===== | ||
| ==== Details ==== | ==== Details ==== | ||
| - | LuCI is installed as a 'meta package' | + | LuCI is installed as a 'meta package' |
| + | Notably, it installs the [[docs: | ||
| - | * | + | In case you want to use uHTTPd, 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 ''/ |
| - | | + | Thus, by requesting this docroot (by pointing your browser to the devices IP address) an index file such as '' |
| - | * luci-app-firewall | + | The file ''/ |
| - | | + | This is just a script, which basically calls Lua at ''/ |
| - | * luci-proto-ppp | + | uhttpd is configured by default to load pages as CGI in the ''/ |
| - | * | + | |
| - | 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 ''/ | + | It is also possible to run LuCI with Lua as an embedded process. |
| - | + | uhttpd supports this; see the corresponding section of the [[docs: | |
| - | It is also possible to run LuCI with Lua as an embedded process. uhttpd supports this; see the corresponding section of the [[docs: | + | |
| + | LuCI by default comes with the bootstrap theme. There are additional themes available and you can create your own if you wish - [[: | ||
| ==== Configuration ==== | ==== Configuration ==== | ||
| - | The default web server software uhttpd is configured in the file '' | + | * '' |
| - | The LuCI web interface is configured in the file '' | + | |
| - | ===== LuCI on other web servers | + | ==== LuCI on other web servers ==== |
| - | ->[[docs: | + | [[docs: |
| - | ==== LuCI on lighttpd | + | === LuCI on lighttpd === |
| - | ->[[docs: | + | [[docs: |
| - | ==== LuCI on nginx ==== | + | === LuCI on nginx === |
| - | LuCI on nginx is currently supported by using uwsgi as plain-cgi interpreter. | + | For routers without significant space constraints running on snapshots/ |
| + | 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: | You need to install one of this 2 variants of the LuCI meta-package: | ||
| - | * luci-nginx | + | * [[packages: |
| - | * 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 | + | * [[packages: |
| + | It does also create a self-signed certificate for nginx and redirect http traffic to https by default. | ||
| + | Note that even when using nginx, exposing the LuCI interface to the Internet or guest networks is not recommended. | ||
| - | Currently LuCI on nginx is fully supported (maybe only in master snapshots for now, as of 16-Feb-2019). If any problem is found, report them to the support forum. | + | Currently LuCI on nginx is fully supported (maybe only in master snapshots for now, as of 16-Feb-2019). |
| + | If any problem is found, report them to the [[https:// | ||
| + | === LuCI on BusyBox httpd === | ||
| + | If you have a very limited space then you can compile OpenWRT image with [[docs: | ||
| + | If any problem is found, report them to the [[https:// | ||
| - | * [[https://forum.openwrt.org/ | + | ==== Offline installation ==== |
| + | Download the following packages from the [[https://downloads.openwrt.org/ | ||
| + | === Basic === | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | === Extended === | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| - | ===== Offline installation ===== | + | Transfer |
| - | - Go to the package download page of the distribution in question: (for ar71xx - generic " | + | |
| - | - Download the following packages: **(The extension " * " will show package versions and targets (such as ar71xx) depending on the system page)** | + | |
| - | * luci_*.ipk | + | |
| - | * luci-app-firewall_*.ipk | + | |
| - | * luci-i18n-english_*.ipk | + | |
| - | * luci-lib-core_*.ipk | + | |
| - | * luci-lib-ipkg_*.ipk | + | |
| - | * luci-lib-nixio_*.ipk | + | |
| - | * luci-lib-sys_*.ipk | + | |
| - | * luci-lib-web_*.ipk | + | |
| - | * luci-mod-admin-core_*.ipk | + | |
| - | * luci-mod-admin-full_*.ipk | + | |
| - | * luci-proto-core_*.ipk | + | |
| - | * luci-proto-ppp_*.ipk | + | |
| - | * luci-sgi-cgi_*.ipk | + | |
| - | * luci-theme-base_*.ipk | + | |
| - | * luci-theme-openwrt_*.ipk | + | |
| - | - Connect the router | + | |
| - | scp luci_0.11.1-1_ar71xx.ipk luci-app-firewall_0.11.1-1_ar71xx.ipk luci-i18n-english_0.11.1-1_ar71xx.ipk luci-lib-core_0.11.1-1_ar71xx.ipk luci-lib-ipkg_0.11.1-1_ar71xx.ipk luci-lib-nixio_0.11.1-1_ar71xx.ipk luci-lib-sys_0.11.1-1_ar71xx.ipk luci-lib-web_0.11.1-1_ar71xx.ipk luci-mod-admin-core_0.11.1-1_ar71xx.ipk luci-mod-admin-full_0.11.1-1_ar71xx.ipk luci-proto-core_0.11.1-1_ar71xx.ipk luci-proto-ppp_0.11.1-1_ar71xx.ipk luci-sgi-cgi_0.11.1-1_ar71xx.ipk luci-theme-base_0.11.1-1_ar71xx.ipk luci-theme-openwrt_0.11.1-1_ar71xx.ipk root@192.168.1.1: | + | |
| - | </ | + | |
| - | - Log into the router. For example by entering the following command into command prompt in windows 10 \\ < | + | |
| - | ssh root@192.168.1.1 | + | |
| - | </ | + | |
| - | - Packages can be installed using the following command \\ < | + | |
| - | opkg install | + | |
| - | </ | + | |
| - | - Install the packages in the following order | + | |
| - | * luci-proto-core_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-lib-core_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-lib-sys_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-lib-nixio_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-sgi-cgi_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-lib-web_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-i18n-english_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-mod-admin-core_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-lib-ipkg_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-mod-admin-full_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-theme-base_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-theme-openwrt_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-app-firewall_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-proto-ppp_0.11.1-1_ar71xx.ipk | + | |
| - | * luci_0.11.1-1_ar71xx.ipk | + | |
| - | - The LuCI web GUI will be available at %%http:// | + | |
| - | - To clean up, remove the packages with the following command \\ < | + | |
| - | rm luci_0.11.1-1_ar71xx.ipk luci-app-firewall_0.11.1-1_ar71xx.ipk luci-i18n-english_0.11.1-1_ar71xx.ipk luci-lib-core_0.11.1-1_ar71xx.ipk luci-lib-ipkg_0.11.1-1_ar71xx.ipk luci-lib-nixio_0.11.1-1_ar71xx.ipk luci-lib-sys_0.11.1-1_ar71xx.ipk luci-lib-web_0.11.1-1_ar71xx.ipk luci-mod-admin-core_0.11.1-1_ar71xx.ipk luci-mod-admin-full_0.11.1-1_ar71xx.ipk luci-proto-core_0.11.1-1_ar71xx.ipk luci-proto-ppp_0.11.1-1_ar71xx.ipk luci-sgi-cgi_0.11.1-1_ar71xx.ipk luci-theme-base_0.11.1-1_ar71xx.ipk luci-theme-openwrt_0.11.1-1_ar71xx.ipk | + | |
| - | </ | + | |
| - | ==== Minimalistic offline installation ==== | + | <code bash> |
| - | You can also install a minimal version of LuCI with following | + | # Upload |
| - | Download and transfer | + | ssh root@openwrt.lan |
| - | < | + | scp *.ipk root@openwrt.lan: |
| - | * liblua | + | # Install packages |
| - | * lua | + | ssh root@openwrt.lan opkg install /tmp/luci-offline/*.ipk |
| - | * libuci-lua | + | |
| - | * libubus | + | |
| - | * libubus-lua | + | |
| - | * uhttpd | + | |
| - | * rpcd | + | |
| - | * luci-base | + | |
| - | | + | |
| - | * luci-lib-nixio | + | |
| - | * luci-theme-bootstrap | + | |
| - | * luci-mod-admin-full | + | |
| - | * luci-lib-jsonc | + | |
| - | and install them with: | + | # Clean up |
| + | ssh root@openwrt.lan rm -f -R / | ||
| + | </ | ||
| - | <code bash> | + | 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 '' | ||
| + | First part till the last '' | ||
| - | 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.: | + | <code bash> |
| - | <code bash># | + | #!/bin/sh |
| - | #assumes the user has egrep, wget, ssh, and scp | + | |
| + | # Exit on error | ||
| set -e | set -e | ||
| - | # Change this to match your router | + | # Configuration parameters |
| - | architecture="brcm63xx" | + | OWRT_USER="root" |
| + | OWRT_HOST=" | ||
| + | OWRT_TEMP="/ | ||
| - | # These should be fine unless you've changed something | + | # Fetch OpenWrt release |
| - | user="root" | + | eval $(ssh "${OWRT_HOST}" |
| - | ip_address=" | + | |
| - | url=" | + | # LuCI packages and repos |
| - | tmpdir="/tmp/luci-offline" | + | case " |
| - | packages_base=" | + | (snapshot) OWRT_URL=" |
| - | packages_luci=" | + | (*) OWRT_URL=" |
| + | esac | ||
| + | OWRT_CORE="libiwinfo libiwinfo-lua" | ||
| + | OWRT_COREURL=" | ||
| + | OWRT_BASE="libjson-c2 | ||
| + | OWRT_BASEURL=" | ||
| + | OWRT_LUCI=" | ||
| + | | ||
| + | | ||
| + | OWRT_LUCIURL=" | ||
| - | mkdir "$tmpdir" | + | # Download packages from repos |
| - | cd " | + | mkdir -p "${OWRT_TEMP}" |
| - | + | for OWRT_REPO in OWRT_CORE OWRT_BASE OWRT_LUCI | |
| - | wget -N --quiet | + | do |
| - | for pkg in $packages_base; | + | |
| - | | + | |
| - | | + | for OWRT_PKG |
| - | wget -N --quiet | + | |
| + | OWRT_PKGFILE="$(sed -n -r -e \ | ||
| + | | ||
| + | " | ||
| + | | ||
| + | wget -N -P "${OWRT_TEMP}" | ||
| + | done | ||
| done | done | ||
| - | wget -N --quiet " | + | # Upload packages to OpenWrt |
| - | for pkg in $packages_luci; | + | ssh "${OWRT_USER}@${OWRT_HOST}" "mkdir -p ${OWRT_TEMP}" |
| - | pkgfile=" | + | scp "${OWRT_TEMP}/"*.ipk "${OWRT_USER}@${OWRT_HOST}:${OWRT_TEMP}" |
| - | pkgurl=" | + | ssh "${OWRT_USER}@${OWRT_HOST}" |
| - | wget -N --quiet | + | ssh "${OWRT_USER}@${OWRT_HOST}" |
| - | done | + | rm -f -R "${OWRT_TEMP}" |
| - | + | </ | |
| - | wget -N --quiet "${url}luci" | + | |
| - | for pkg in $packages_luci; | + | |
| - | pkgfile=" | + | |
| - | pkgurl=" | + | |
| - | wget -N --quiet " | + | |
| - | done | + | |
| - | + | ||
| - | ssh "${user}@${ip_address}" mkdir -p / | + | |
| - | scp *.ipk "${user}@${ip_address}":/ | + | |
| - | ssh "${user}@${ip_address}" opkg install | + | |
| - | ssh "${user}@${ip_address}" rm -rf /tmp/luci-offline-packages/ | + | |
| - | + | ||
| - | ssh "${user}@${ip_address}" | + | |
| - | ssh "${user}@${ip_address}" | + | |
| - | + | ||
| - | cd | + | |
| - | rm -rf " | + | |
| - | + | ||
| - | + | ||
| - | ===== Miscellaneous ===== | + | |
| - | ==== Secure acccess to luci webserver ==== | + | |
| - | If you want to configure Luci webserver for secure access, [[docs: | + | |
| - | + | ||
| - | ===== Troubleshooting ===== | + | |
| - | * LuCI is developed at Github: | + | |
| - | * Please file LuCI specific bugs at the [[https:// | + | |
| - | * LuCIs old web-presence at [[http:// | + | |
| - | ===== Notes ===== | + | ==== References |
| - | [[docs: | + | * [[https:// |
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[docs: | ||
| + | * [[docs: | ||
| + | * [[docs: | ||