Change default setting and configuration during building image for 15.0

I want to make settings configured during the image built so that the settings stay on router reset.

I am looking for , Password , Configuration of wireless default .

I tried to search but couldn't find.

I'd first strongly consider using v18, as v15 uses a kernel that is no longer supported and there are well known, significant, security vulnerabilities in the kernel, application firmware, and even 802.11 protocols that can't be resolved in v15. With v19 imminent, v17 will be EOLed.

Credentials are in /etc/passwd, /etc/group, and /etc/shadow.

Wireless is in /etc/config/wireless

UCI documentation (OpenWrt-specific config) is available on the wiki.


You can include them as custom files into the image.

( Or if you use just the imagebuilder instead of the full toolchain, you can still do the same:


Thanks Jeff & hnyman,

I totally agree switching to latest v18. But the router I am using is TP link WR840N. And its ROM size limits use of LEDE.

@ hnyman & Jeff,

I will try to implement as you suggested . Hope I should be able to do that.

Based on documentation, the master reset ( to restore default settings) would remove the settings made using above method. right?
I am looking for the changes I make before I build image, so that my configurations goes as default setting.

Please correct me if I misunderstood . -- supported in v18 -- "no excuses"

By putting the settings into ROM, when a reset is done, those are the settings that are then "default" for the device.

Something I missed to mention here. ie its version 6. Ram 32MiB and ROM 4MiB.
Also I am thinking of using WR841N V11. As it's available here. -- shows v6 supported as well, though Support for TL-WR840N Ver 6.0 suggests that it is a very marginal unit.

Why are you considering buying another / more of these outdated, nearly unsupportable units?

I am looking to use this as a mqtt server. in addition to router. At my home I am using Wr841N V11. and is working fantastic for months without a need of reboot. I built image using 15.0.1. I want to give it to 9 friends of mine. Also they want same version. (even I would like to go with something that is time tested). And the cost factor. It costs little over $10.
And as I am giving it to other people. I don't want them to invite me for any maintenance kind of stuff as I have no commercial interest. I am looking to put my configuration as a default settings. So even if they reset it, the router is still set.

Yes, if you include the config files in the flashed image, a reset will mean reverting to those settings.

In OpenWrt a reset means: delete all later settings (and installed packages), and revert to the settings that are included in the flashed firmware image. Those are the "default settings".