Extending the OpenWrt Sysupgrade Server with router configuration

I would like the option to build a new image that includes the configuration.

The benefit would be:

  • flashing a new router also sets the configuration
  • flashing with an upgrade that breaks the current configuration can include a modified configuration.

This could be achieved by adding the configuration as a backup file or as a set of cli commands and applying a restore or execute a cli command file.

The configuration will include account and wifi credentials. Maybe those can be set as hashes in the backup and cli commands.

Is it possible to run a local OpenWrt Sysupgrade Server that can be modified to try this?

Something like WrtNova – browser config generator that builds pre-configured images via OpenWrt's ASU ?

If you really want to do this, be aware that the sysupgrade.openwrt.org server exposes all of the request contents, so be sure you are ok sending it over the internet and storing it on a public server.

Image builder works great. After unarchiving a backup, changing the settings and including the directory in the image builder, I got a working image. After flashing I could access the router again. I had to flash twice because luci is not included as a default package and I like the web interface to check things. So I included the luci and ca certificates packages in the next image i did build. I also had to add list dns '192.168.10.1' to the lan interface in the /etc/config/network file to get dns resolving working.

It is very handy for routers that do not use the default IP address 192.168.1.1

BTW I turned ipv6 resolving off on my dns server, because my isp does not support ipv6 and else openwrt.org could not be reached by the router, an Zyxel EX5601-T0-ubootmod.