# Setting up for basic luci development

**URL:** <https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764>\
**Category:** For Developers\
**Created:** [July 19, 2021, 8:24pm UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764 "2021-07-19T20:24:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![twinkleLED](https://forum.openwrt.org/user_avatar/forum.openwrt.org/twinkleled/32/9392_2.png) [@twinkleLED](https://forum.openwrt.org/u/twinkleLED)\
**Post date:** [July 19, 2021, 8:24pm UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/1 "2021-07-19T20:24:01Z")

</div>

I want to build a simple application luci configuration page, and modify some of the existing gui. I have a router with 21.02rc3 installed.

[https://github.com/openwrt/luci/wiki/DevelopmentEnvironmentHowTo](https://github.com/openwrt/luci/wiki/DevelopmentEnvironmentHowTo) suggests

> The recommended way to develop LuCI is to edit it on a real OpenWrt system in conjunction with an editor or IDE which supports remotely editing files via the SCP or SFTP protocol.

This seems lightweight and nice. But the Javascript files on the router are minified, and so don't exactly match what is on github.

Q: Is there an easy/recommended way of upgrading the router files to be uncompressed before editing them?

---

<div class="post-metadata">

**Author:** ![stangri](https://forum.openwrt.org/user_avatar/forum.openwrt.org/stangri/32/58_2.png) [@stangri](https://forum.openwrt.org/u/stangri)\
**Post date:** [July 20, 2021, 5:04am UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/2 "2021-07-20T05:04:33Z")

</div>

I would just grab the corresponding files from github, they shouldn't be minimized there.

---

<div class="post-metadata">

**Author:** ![jow](https://forum.openwrt.org/user_avatar/forum.openwrt.org/jow/32/13_2.png) [@jow](https://forum.openwrt.org/u/jow)\
**Post date:** [July 20, 2021, 6:19am UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/3 "2021-07-20T06:19:27Z")

</div>

As files are minimized independently and not bundled in any way you can replace them one-by-one with github versions.

---

<div class="post-metadata">

**Author:** ![hnyman](https://forum.openwrt.org/user_avatar/forum.openwrt.org/hnyman/32/19_2.png) [@hnyman](https://forum.openwrt.org/u/hnyman)\
**Post date:** [July 20, 2021, 7:12am UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/4 "2021-07-20T07:12:04Z")

</div>

> [@twinkleLED](#):
>
> the Javascript files on the router are minified, and so don't exactly match what is on github.

If you compile your own image, you can disable the minification for LuCI, so that files on router match the GitHub version.

---

<div class="post-metadata">

**Author:** ![twinkleLED](https://forum.openwrt.org/user_avatar/forum.openwrt.org/twinkleled/32/9392_2.png) [@twinkleLED](https://forum.openwrt.org/u/twinkleLED)\
**Post date:** [July 20, 2021, 7:25pm UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/5 "2021-07-20T19:25:10Z")

</div>

I have installed a full beautiful **/www/luci-static/resources/view/system/system.js** on the router. To make sure everything is working I have tweaked some text labels and default values, added a new field to the uci, etc. Seems to work (after I figured out caching). Thank you each!

My next goal is to figure out how to add/remove bigger "pages" from luci. In the new Javascript luci world, how would I remove the whole Network menu, or remove the Software part of the System menu? On the wiki I find the older lua descriptions for entry() in the Wiki, but how is that done in Javascript?  
 ![image](https://forum.openwrt.org/uploads/default/original/3X/c/5/c5bf705121781697e13c6ae7ddbd7cb6586e0c03.png)

---

<div class="post-metadata">

**Author:** ![twinkleLED](https://forum.openwrt.org/user_avatar/forum.openwrt.org/twinkleled/32/9392_2.png) [@twinkleLED](https://forum.openwrt.org/u/twinkleLED)\
**Post date:** [July 20, 2021, 9:23pm UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/6 "2021-07-20T21:23:03Z")

</div>

I have found **/usr/share/luci/menu.d** (on router) which seems to have the JSON defining the top of the screen menus, those in BLACK in the photo above. I can very crudely edit those files and see the impact.

I would still find any develop/build documentation for the modern preferred way of doing these things very helpful, in case anyone has any pointers.

---

<div class="post-metadata">

**Author:** ![biangbiangmian](https://forum.openwrt.org/user_avatar/forum.openwrt.org/biangbiangmian/32/2379_2.png) [@biangbiangmian](https://forum.openwrt.org/u/biangbiangmian)\
**Post date:** [July 20, 2021, 10:45pm UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/7 "2021-07-20T22:45:06Z")

</div>

> [@Vscode remote missing bash](https://forum.openwrt.org/t/vscode-remote-missing-bash/59756/9):
>
> Just wanted to add that yeah seems like the vscode remote development doesn't work with openwrt for me either but I have been pretty seamlessly mounting the openwrt filesystem with sftp, as @SirToffski said, and specificially with [https://marketplace.visualstudio.com/items?itemName=liximomo.remotefs](https://marketplace.visualstudio.com/items?itemName=liximomo.remotefs) on vscode it feels jsut like editing any other folder.

---

<div class="post-metadata">

**Author:** ![twinkleLED](https://forum.openwrt.org/user_avatar/forum.openwrt.org/twinkleled/32/9392_2.png) [@twinkleLED](https://forum.openwrt.org/u/twinkleLED)\
**Post date:** [July 20, 2021, 11:08pm UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/8 "2021-07-20T23:08:54Z")

</div>

Thank you. Great idea!

---

<div class="post-metadata">

**Author:** ![westurner](https://forum.openwrt.org/user_avatar/forum.openwrt.org/westurner/32/8208_2.png) [@westurner](https://forum.openwrt.org/u/westurner)\
**Post date:** [June 4, 2023, 3:34am UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/10 "2023-06-04T03:34:40Z")

</div>

Is running OpenWRT w/ LuCI in Docker an option?

> [@OpenWrt in Docker (openwrt/docker, docker-openwrt) best practices, LuCI \[app\] development, PQ Post-Quantum crypto (!RSA,) (2023)](https://forum.openwrt.org/t/openwrt-in-docker-openwrt-docker-docker-openwrt-best-practices-luci-app-development-pq-post-quantum-crypto-rsa-2023/162033):
>
> Went looking for resources to learn to develop a simple luci app, [https://openwrt.org/docs/guide-user/virtualization/docker\_openwrt\_image#openwrt\_as\_a\_native\_docker\_image](https://openwrt.org/docs/guide-user/virtualization/docker_openwrt_image#openwrt_as_a_native_docker_image)openwrt/docker [https://github.com/openwrt/docker/blob/main/Dockerfile](https://github.com/openwrt/docker/blob/main/Dockerfile)[https://github.com/openwrt/docker/blob/main/.github/workflows/containers.yml](https://github.com/openwrt/docker/blob/main/.github/workflows/containers.yml)[https://github.com/openwrt/docker#rootfs-experimental](https://github.com/openwrt/docker#rootfs-experimental) ::docker run --rm -it openwrt/rootfs # inside the Docker container mkdir /var/lock/ opkg update opkg install tmate tmate T…

---

<div class="post-metadata">

**Author:** ![system](https://forum.openwrt.org/uploads/default/original/3X/7/4/740520c71f00039bbf001045c682f0ecb25e905a.png) [@system](https://forum.openwrt.org/u/system)\
**Post date:** [June 14, 2023, 3:35am UTC](https://forum.openwrt.org/t/setting-up-for-basic-luci-development/101764/11 "2023-06-14T03:35:13Z")

</div>

Closed on June 14, 2023, 3:35am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
