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 [2018/11/03 13:33] – [without SSL] Added danger wrap, warning root's password will be sent via plaintext jw0914 | 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. | ||
| - | ===== Online installation ===== | + | < |
| - | ==== without SSL ==== | + | |
| - | <wrap danger> | + | |
| - | - Open an SSH session to 192.168.1.1. | + | |
| - | - Enter the following\\ | + | |
| opkg update | opkg update | ||
| opkg install luci | opkg install luci | ||
| </ | </ | ||
| - | - After the installation has completed, the LuCI web GUI will be available at %%http:// | ||
| - | ==== with SSL ==== | + | Now you can open LuCI interface. |
| - | - Open an SSH session to 192.168.1.1. | + | ==== 2. Providing encryption ==== |
| - | - Enter the following\\ | + | Install |
| + | |||
| + | < | ||
| opkg update | opkg update | ||
| opkg install luci-ssl | opkg install luci-ssl | ||
| + | / | ||
| </ | </ | ||
| - | - After the installation has completed, the LuCI web GUI will be available at %%https:// | ||
| + | Reload LuCI interface and verify that you are using HTTPS. | ||
| - | ===== Offline installation ===== | + | ==== 3. Native language support |
| - | - Go to the package download page of the distribution in question: (for ar71xx " | + | LuCI uses English by default. |
| - | - Download the following | + | You can search and install additional |
| - | * luci_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-app-firewall_0.11.1-1_ar71xx.ipk | + | <code bash> |
| - | | + | opkg update |
| - | | + | opkg list luci-i18n-\* |
| - | * luci-lib-ipkg_0.11.1-1_ar71xx.ipk | + | opkg install |
| - | * 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 | + | |
| - | - Connect the router to the computer and copy the packages to the router using file transfer. For example the following command can be used via the command prompt in windows 10:\\ < | + | |
| - | scp luci_0.11.1-1_ar71xx.ipk luci-app-firewall_0.11.1-1_ar71xx.ipk | + | |
| </ | </ | ||
| - | - Log into the router. For example by entering the following command | + | |
| - | ssh root@192.168.1.1 | + | You can also install multiple language packs and switch between them in the LuCI settings. |
| + | |||
| + | LuCI is being actively [[https:// | ||
| + | |||
| + | ==== 4. Additional web applications ==== | ||
| + | Search and install '' | ||
| + | |||
| + | < | ||
| + | opkg update | ||
| + | opkg list luci-app-\* | ||
| </ | </ | ||
| - | - Packages can be installed using the following command \\ < | + | |
| - | opkg install PACKAGE_NAME | + | ==== 5. Alternative ports ==== |
| + | Use alternative ports: | ||
| + | * HTTP - 8080/TCP | ||
| + | * HTTPS - 8443/TCP | ||
| + | |||
| + | < | ||
| + | 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 | ||
| + | / | ||
| </ | </ | ||
| - | - Install the packages | + | |
| - | * luci-proto-core_0.11.1-1_ar71xx.ipk | + | ===== Extras ===== |
| - | * luci-lib-core_0.11.1-1_ar71xx.ipk | + | ==== Details ==== |
| - | * luci-lib-sys_0.11.1-1_ar71xx.ipk | + | LuCI is installed as a 'meta package' |
| - | * luci-lib-nixio_0.11.1-1_ar71xx.ipk | + | Notably, it installs the [[docs: |
| - | * luci-sgi-cgi_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-lib-web_0.11.1-1_ar71xx.ipk | + | 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. |
| - | * luci-i18n-english_0.11.1-1_ar71xx.ipk | + | By default this is organised as follows. |
| - | * luci-mod-admin-core_0.11.1-1_ar71xx.ipk | + | By default ''/ |
| - | * luci-lib-ipkg_0.11.1-1_ar71xx.ipk | + | Thus, by requesting this docroot (by pointing your browser to the devices IP address) an index file such as '' |
| - | * luci-mod-admin-full_0.11.1-1_ar71xx.ipk | + | The file ''/ |
| - | * luci-theme-base_0.11.1-1_ar71xx.ipk | + | This is just a script, which basically calls Lua at ''/ |
| - | * luci-theme-openwrt_0.11.1-1_ar71xx.ipk | + | uhttpd is configured by default to load pages as CGI in the ''/ |
| - | * luci-app-firewall_0.11.1-1_ar71xx.ipk | + | |
| - | * luci-proto-ppp_0.11.1-1_ar71xx.ipk | + | It is also possible to run LuCI with Lua as an embedded process. |
| - | * luci_0.11.1-1_ar71xx.ipk | + | uhttpd supports this; see the corresponding section of the [[docs: |
| - | - The LuCI web GUI will be available at %%http://192.168.1.1%% | + | |
| - | | + | LuCI by default comes with the bootstrap theme. There are additional themes available and you can create your own if you wish - [[: |
| - | rm luci_0.11.1-1_ar71xx.ipk luci-app-firewall_0.11.1-1_ar71xx.ipk | + | ==== Configuration ==== |
| + | | ||
| + | * '' | ||
| + | |||
| + | ==== LuCI on other web servers ==== | ||
| + | [[docs: | ||
| + | |||
| + | === LuCI on lighttpd === | ||
| + | [[docs: | ||
| + | |||
| + | === LuCI on nginx === | ||
| + | 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: | ||
| + | * [[packages: | ||
| + | * [[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 [[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:// | ||
| + | |||
| + | ==== 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: | ||
| + | |||
| + | === Extended === | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | |||
| + | Transfer the downloaded packages to your router onto the RAM disk and install them. | ||
| + | |||
| + | <code bash> | ||
| + | # Upload packages to the router | ||
| + | ssh root@openwrt.lan mkdir -p /tmp/luci-offline | ||
| + | scp *.ipk root@openwrt.lan:/ | ||
| + | |||
| + | # Install packages | ||
| + | ssh root@openwrt.lan opkg install /tmp/luci-offline/*.ipk | ||
| + | |||
| + | # Clean up | ||
| + | ssh root@openwrt.lan rm -f -R /tmp/luci-offline | ||
| </ | </ | ||
| + | |||
| + | 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 '' | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | |||
| + | # Exit on error | ||
| + | set -e | ||
| + | |||
| + | # Configuration parameters | ||
| + | OWRT_USER=" | ||
| + | OWRT_HOST=" | ||
| + | OWRT_TEMP="/ | ||
| + | |||
| + | # Fetch OpenWrt release | ||
| + | eval $(ssh " | ||
| + | |||
| + | # LuCI packages and repos | ||
| + | case " | ||
| + | (snapshot) OWRT_URL=" | ||
| + | (*) OWRT_URL=" | ||
| + | esac | ||
| + | OWRT_CORE=" | ||
| + | OWRT_COREURL=" | ||
| + | OWRT_BASE=" | ||
| + | OWRT_BASEURL=" | ||
| + | OWRT_LUCI=" | ||
| + | luci-theme-bootstrap luci-mod-admin-full luci-lib-jsonc luci-mod-status \ | ||
| + | luci-mod-system luci-mod-network" | ||
| + | OWRT_LUCIURL=" | ||
| + | |||
| + | # Download packages from repos | ||
| + | mkdir -p " | ||
| + | for OWRT_REPO in OWRT_CORE OWRT_BASE OWRT_LUCI | ||
| + | do | ||
| + | OWRT_REPOURL=$(eval echo ' | ||
| + | wget -N -P " | ||
| + | for OWRT_PKG in $(eval echo ' | ||
| + | do | ||
| + | OWRT_PKGFILE=" | ||
| + | "/ | ||
| + | " | ||
| + | OWRT_PKGURL=" | ||
| + | wget -N -P " | ||
| + | done | ||
| + | done | ||
| + | |||
| + | # Upload packages to OpenWrt | ||
| + | ssh " | ||
| + | scp " | ||
| + | ssh " | ||
| + | ssh " | ||
| + | rm -f -R " | ||
| + | </ | ||
| + | |||
| + | ==== References ==== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[docs: | ||
| + | * [[docs: | ||
| + | * [[docs: | ||
| + | |||