Skip to content
Contents
GuidesOpenWrt

Build a first LuCI button that shows a real device state

Modern LuCI commonly uses JavaScript views, menu JSON, and rpcd ACL. Older releases with Lua modules depend on specific versions.

Modern LuCI commonly uses JavaScript views, menu JSON, and rpcd ACL. Older releases with Lua modules depend on specific versions. Start with read-only mode, using the minimal privileges of existing ubus methods, to confirm network access can be enabled under controlled management.

The button does only one thing: authorization

The server exposes only predefined operations and verified parameters. ACLs are separated by read and write permissions. Pages display status as processing, success, or read error. No public entry point is left behind after a plugin is removed.

Verify the first button with real LuCI status

First, have the button handle a approved read-only state, listing its dependent ACLs and implementation. Test sufficient permissions, insufficient permissions, and service failures.

Check whether the menu appears, whether the call succeeds, and whether unauthorized calls are rejected. Test restarts and uninstalls as well. Retain a dedicated rollback entry for the default management interface.

The page should display the source and error information, without executing any shell commands. When the plugin is uninstalled, verify that both the background processes and permissions can be restored.

Click the button in the custom LuCI view and read the router’s actual firmware version returned by system.board. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Open the original image
Click the button in the custom LuCI view and read the router’s actual firmware version returned by system.board. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Click the button in the custom LuCI view and read the router’s actual firmware version returned by system.board. · OpenWrt 25.12.6 x86/64 (QEMU/KVM). Open the original image

Reference

Related guides

Reference

Check the model, region and hardware revision on the label before selecting firmware.

Explore hardware

Comments