Restoring a package offline after OpenWrt upgrade

I followed this article to enable DNS Over HTTPS on the router-level. The problem is that it requires installing a package named "stubby" from a remote repository.

When upgrading OpenWrt, even though I checked restoring configurations, it seems that the packages are not restored. So, basically, the Internet connection does not work after upgrading OpenWrt, because the restored configuration relies on "stubby", yet it does not exist, and I cannot install "stubby" from the Web UI, because the Internet is not working. I had to do some cumbersome things like resetting the settings, installing "stubby", and then restoring the settings.

But, is there anyway to install "stubby" offline, like copying the package to another storage before updating OpenWRT, and then copy it back to OpenWRT using SSH, without requiring an Internet connection?

If you need additional packages for connectivity (or for secure DNS etc.), the best approach is to cook a personal firmware image that includes the needed packages.

Compiling from sources is rather easy, but even easier might be to use the imagebuilder that cooks up the firmware from already compiled packages.

Other alternative is to download the packages (.ipk files) to your PC before flashing, and then after flashing, first transfer them with SCP/FTP/whatever to the router and install it with opkg while having only LAN connectvity. (and you can even do that package uploading and installation in the LuCI GUI, system/software tab).


Where is the IPK stored? If it is not stored on the router, where can I downloaded it from?

In the download repo, from which also opkg downloads it if necessary. There are gigabytes of downloadable packages.
19.07.2 packages:

The exact directory depends on your router model /target / architecture).
E.g. for ipq806x R7800 it would be:

But that depends on your router model.

Thanks. It would have been easier if the Web UI just had a simple feature of downloading the IPK file, though.


Download to PC & upload:

Download from URL: (but that would require internet connectivity...)

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