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 [2020/09/21 23:14] – [Minimalistic offline installation] code optimized vgaetera | docs:guide-user:luci:luci.essentials [2023/04/03 01:00] – [Offline installation] vgaetera | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== LuCI essentials ====== | ====== LuCI essentials ====== | ||
| - | {{section> | + | {{section> |
| ===== Introduction ===== | ===== Introduction ===== | ||
| While OpenWrt can be managed completely using SSH and the terminal, the LuCI WebUI makes many administration tasks easier. | 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 | + | The OpenWrt full releases, such as the current |
| 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: | 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: | More info on this can be obtained [[docs: | ||
| Line 10: | Line 10: | ||
| ===== Instructions ===== | ===== Instructions ===== | ||
| ==== 1. Basic installation ==== | ==== 1. Basic installation ==== | ||
| - | Connect to your router via SSH and install | + | Install |
| <code bash> | <code bash> | ||
| Line 17: | Line 17: | ||
| </ | </ | ||
| - | Now you can open **[[http:// | + | Now you can open LuCI interface. |
| ==== 2. Providing encryption ==== | ==== 2. Providing encryption ==== | ||
| - | Connect to your router via SSH and install | + | Install |
| - | + | ||
| - | For devices with limited flash or running v18 (or prior, though you should strongly consider upgrading) | + | |
| <code bash> | <code bash> | ||
| opkg update | opkg update | ||
| - | opkg install luci-ssl-openssl | + | opkg install luci-ssl |
| - | </code> | + | /etc/init.d/ |
| - | + | ||
| - | For routers without significant space constraints running on snapshots/master or v19 or later, it is possible to install using nginx (a commercial-grade web server) | + | |
| - | + | ||
| - | <code bash> | + | |
| - | opkg update | + | |
| - | opkg install luci-ssl-nginx | + | |
| </ | </ | ||
| Reload LuCI interface and verify that you are using HTTPS. | Reload LuCI interface and verify that you are using HTTPS. | ||
| - | |||
| - | **//Even when using nginx, exposing the LuCI interface to the Internet or guest networks is not recommended.// | ||
| ==== 3. Native language support ==== | ==== 3. Native language support ==== | ||
| Line 64: | Line 54: | ||
| ==== 5. Alternative ports ==== | ==== 5. Alternative ports ==== | ||
| Use alternative ports: | Use alternative ports: | ||
| - | * 8080/ | + | * HTTP - 8080/TCP |
| - | * 8443/ | + | * HTTPS - 8443/TCP |
| <code bash> | <code bash> | ||
| Line 94: | Line 84: | ||
| uhttpd supports this; see the corresponding section of the [[docs: | 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 ==== | ||
| * '' | * '' | ||
| Line 105: | Line 96: | ||
| === LuCI on nginx === | === 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. | 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 - Autoinstall nginx, uwsgi-cgi and the default config file to make luci work on nginx. | + | * [[packages: |
| - | * luci-ssl-nginx - Autoinstall nginx-ssl, uwsgi-cgi and the default config file to make luci wok on nginx. | + | * [[packages: |
| It does also create a self-signed certificate for nginx and redirect http traffic to https by default. | 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). | 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. | + | If any problem is found, report them to the [[https:// |
| - | * [[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 ==== | ==== Offline installation ==== | ||
| Download the following packages from the [[https:// | Download the following packages from the [[https:// | ||
| - | * luci | ||
| - | * luci-app-firewall | ||
| - | * luci-i18n-english | ||
| - | * luci-lib-core | ||
| - | * luci-lib-ipkg | ||
| - | * luci-lib-nixio | ||
| - | * luci-lib-sys | ||
| - | * luci-lib-web | ||
| - | * luci-mod-admin-core | ||
| - | * luci-mod-admin-full | ||
| - | * luci-proto-core | ||
| - | * luci-proto-ppp | ||
| - | * luci-sgi-cgi | ||
| - | * luci-theme-base | ||
| - | * luci-theme-openwrt | ||
| - | <code bash> | + | === Basic === |
| - | # Upload the packages to the router | + | * [[packages: |
| - | scp *.ipk root@openwrt.lan:/tmp | + | * [[packages: |
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| - | # Log into the router | + | === Extended === |
| - | ssh root@openwrt.lan | + | * [[packages: |
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| + | * [[packages: | ||
| - | # Installed the packages | + | Transfer |
| - | opkg install / | + | |
| - | + | ||
| - | # Clean up | + | |
| - | rm -f / | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Minimalistic offline installation ==== | + | |
| - | You can also install a minimal version of LuCI with following packages selected for installation. | + | |
| - | Download and transfer | + | |
| <code bash> | <code bash> | ||
| - | mkdir -p / | + | # Upload packages to the router |
| - | </ | + | 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> | + | |
| - | opkg install | + | |
| </ | </ | ||
| Line 184: | Line 158: | ||
| #!/bin/sh | #!/bin/sh | ||
| - | # Dependencies: | + | # Exit on error |
| + | set -e | ||
| # Configuration parameters | # Configuration parameters | ||
| OWRT_USER=" | OWRT_USER=" | ||
| OWRT_HOST=" | OWRT_HOST=" | ||
| - | OWRT_TEMP=" | + | OWRT_TEMP=" |
| # Fetch OpenWrt release | # Fetch OpenWrt release | ||
| - | eval $(ssh openwrt cat / | + | eval $(ssh "${OWRT_HOST}" |
| - | if [ "${DISTRIB_RELEASE}" | + | |
| - | then OWRT_DIR=" | + | |
| - | else OWRT_DIR=" | + | |
| - | fi | + | |
| # LuCI packages and repos | # LuCI packages and repos | ||
| - | OWRT_URL=" | + | case " |
| + | (snapshot) | ||
| + | (*) OWRT_URL=" | ||
| + | esac | ||
| OWRT_CORE=" | OWRT_CORE=" | ||
| - | OWRT_COREURL=" | + | OWRT_COREURL=" |
| - | OWRT_BASE=" | + | OWRT_BASE=" |
| - | OWRT_BASEURL=" | + | OWRT_BASEURL=" |
| OWRT_LUCI=" | OWRT_LUCI=" | ||
| luci-theme-bootstrap luci-mod-admin-full luci-lib-jsonc luci-mod-status \ | luci-theme-bootstrap luci-mod-admin-full luci-lib-jsonc luci-mod-status \ | ||
| luci-mod-system luci-mod-network" | luci-mod-system luci-mod-network" | ||
| - | OWRT_LUCIURL=" | + | OWRT_LUCIURL=" |
| # Download packages from repos | # Download packages from repos | ||
| Line 214: | Line 188: | ||
| do | do | ||
| OWRT_REPOURL=$(eval echo ' | OWRT_REPOURL=$(eval echo ' | ||
| - | wget -N -P " | + | wget -N -P " |
| for OWRT_PKG in $(eval echo ' | for OWRT_PKG in $(eval echo ' | ||
| do | do | ||
| OWRT_PKGFILE=" | OWRT_PKGFILE=" | ||
| "/ | "/ | ||
| - | " | + | " |
| OWRT_PKGURL=" | OWRT_PKGURL=" | ||
| wget -N -P " | wget -N -P " | ||
| Line 226: | Line 200: | ||
| # Upload packages to OpenWrt | # Upload packages to OpenWrt | ||
| - | ssh " | + | ssh " |
| - | scp " | + | scp " |
| - | ssh " | + | ssh " |
| - | ssh " | + | ssh " |
| rm -f -R " | rm -f -R " | ||
| </ | </ | ||
| Line 236: | Line 210: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| - | * [[http://luci.subsignal.org|LuCI legacy website]] | + | * [[https://github.com/ |
| * [[docs: | * [[docs: | ||
| * [[docs: | * [[docs: | ||
| + | * [[docs: | ||