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:user-guide:luci:luci.essentials [2018/02/20 20:02] – ↷ Page moved from docs:user-guide:luci.essentials to docs:user-guide:luci:luci.essentials bobafetthotmail | 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 ==== | + | |
| - | - 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. | ||
| + | |||
| + | ==== 3. Native language support ==== | ||
| + | LuCI uses English by default. | ||
| + | You can search and install additional packages for native language support. | ||
| + | |||
| + | <code bash> | ||
| + | opkg update | ||
| + | opkg list luci-i18n-\* | ||
| + | opkg install luci-i18n-hungarian | ||
| + | </ | ||
| + | |||
| + | 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 '' | ||
| + | |||
| + | <code bash> | ||
| + | opkg update | ||
| + | opkg list luci-app-\* | ||
| + | </ | ||
| + | |||
| + | ==== 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 ==== | ||
| + | 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 '' | ||
| + | The file ''/ | ||
| + | This is just a script, which basically calls Lua at ''/ | ||
| + | uhttpd is configured by default to load pages as CGI in the ''/ | ||
| + | |||
| + | 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 ==== | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ==== 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:// | ||
| + | |||
| + | === Basic === | ||
| + | * [[packages: | ||
| + | * [[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 / | ||
| + | scp *.ipk root@openwrt.lan:/ | ||
| + | |||
| + | # Install packages | ||
| + | ssh root@openwrt.lan opkg install / | ||
| + | |||
| + | # Clean up | ||
| + | ssh root@openwrt.lan rm -f -R / | ||
| + | </ | ||
| + | |||
| + | 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 " | ||
| + | </ | ||
| - | ===== Offline installation ===== | + | ==== References |
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[docs: | ||
| + | * [[docs: | ||
| + | * [[docs: | ||