Updating software breaks wireguard VPN settings

I have had good service with OpenWRT and Mullvad Wireguard VPN. I updated my firmware with "openwrt-22.03.1-ipq806x-generic-netgear_r7800-squashfs-sysupgrade.bin". Afterwards, my Mullvad Wireguard VPN setup was broken and not recognized. I tried to "Restore" from backup and that did not work. I setup the VPN again manually and it is all working properly.

Is there a way to update my software and keep all settings intact?

Model Netgear Nighthawk X4S R7800
Architecture ARMv7 Processor rev 0 (v7l)
Target Platform ipq806x/generic
Firmware Version OpenWrt 22.03.1 r19777-2853b6d652 / LuCI openwrt-22.03 branch git-22.245.77528-487e58a

What version did you upgrade from?

I still had the previous upgrade in my downloads folder. It was:


It was explained to me by someone that routers are a little different and the safest way to upgrade is to use the prepared sysupgrade.bin file. Maybe one day it will be possible to upgrade my router like my Ubuntu PC through a command line in the terminal window. I use my R7800 as a client and it is fast with no problems otherwise.

it already is, but you'll still be writing the whole image ...

If it is safe to upgrade through a terminal window with ssh, what is the proper terminal command to upgrade? If it preserves my settings and existing apps, then that would be nice.

it does, depending on source and target version.

additional packages could be added using the online image builder.

add your packages to the Customize installed packages list.

1 Like

Ok. This builds a customized image. I can try this. Thanks for that information.

I was curious about using the "opkg upgrade" command in the terminal, but saw this:

"Generally speaking, the use of opkg upgrade is very highly discouraged. It should be avoided in almost all circumstances."


I'll use the link you provided to build the custom image. Thanks.

  • To upgrade an image, you use the command sysupgrade
  • To install packages, you use opkg install

From your description, it seems like you just sysupgraded and never ensured you re-installed the needed packages afterwards. So just FYI - there's no need to use opkg update to upgrade your firmware to the next version, nor to install the needed packages. For more on the okpg warning, see: https://openwrt.org/docs/guide-user/installation/generic.sysupgrade#package_upgrade_warning

Hope that clarifies things.

If you have a recent version 21 or 22, the attendedsysupgrade system may work for you. This uses a small client (auc, install with opkg install auc, then run with auc while router is connected to the Internet) to request and install a custom ROM from the upgrade server. This ROM will contain the packages you had installed on the old version.

Major changes like fw3 being replaced with firewall4 and swconfig being replaced with DSA will still need some manual working around.

1 Like

I installed "attendedsysupgrade" with Luci and I also run "auc" with ssh on the router while connected to the internet. This is exactly what I always wanted. My system updates just like my regular Linux computer. I do not lose any settings or configurations and it is so easy. Thanks for the reply.

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