Do LuCI and command line settings synchronize?

Hello.

I am new to OpenWrt, but managed to flash a TD-LINK C7 version 5. It went swimmingly. Thanks!

My question is whether LuCI and the command line settings fully synchronize. Unpacking it a little, it would amount to asking whether it is true to say:

"For any area of setting, if both LuCI and command line provide access to it, then whatever setting (creation, modification, or deletion) made in LuCI will be reflected in command line config and also whatever setting made on command line will be reflected in LuCI."

Sorry about the mouthful. But would that be true?

For example, suppose you can create a (WAN to LAN) port forwarding rule in LuCI or on command line. If I create a rule on command line and look at the appropriate section of LuCI, will the rule be there? And vice versa?

If the answer is yes, then I can just start using LuCI and know that, when later I want to switch to command line, all my settings will be there too.

If the answer is no, I would want to make the LuCI vs. command line decision at the outset and stick to the one I chose. Otherwise I would end up juggling two sets of port forwarding rules, two sets of SSH public keys, etc., etc.

Please note that forwarding rules were just an example. I want to know whether LuCI and command line totally synchronize. If there are settings areas that do synchronize and other that don't, then I would have to assume that any given area does not synchronize (unless there is a list of areas that syncrhonize).

I hope that made sense. I searched both the forum and Google, but could find nothing on point. If this is not the appropriate forum section, please advise where I should put posting this question. Thanks.

Luci and the cli (or manually editing the configuration files) are synchronized for almost all settings. I won’t say all because there are some rare situations where a setting/option is not exposed in LuCI, but for all standard uses, the settings are always in sync.

1 Like

That's great. Thanks so much! An area not exposed to LuCI would be no problem for me. I would have no opportunity to acquire two sets of settings.

There are no separate "LuCI settings".

LuCI interpretes & modifies the same config files (mainly in /etc/config) that you handle by text editor via SSH command line.

(Like psherman says, LuCI does not understand/support some rare options & option combinations, so some exotic settings can only be modified via text editor.)

2 Likes

@hnyman ‘s answer is better and more accurate - I should have stated that there is one set of configuration files. As such, it is not that the LuCI vs CLI is synchronized, but that they are actually operating on the exact same files.

In fact, LuCI is a front end that essentially runs one or more CLI commands in the background for every operation on the web interface.

In theory, UCI configs and changes with CLI can be runtime.
Those settings aren't detected by LuCI until you commit them.

1 Like

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