Linux

Where Does OpenWrt Store Config Files?

OpenWrt UCI config folder and generated backup tarballs on routers for network and system settings use.

Last updated

OpenWrt keeps router settings in /etc/config with one file per service. Network, wireless, firewall, and DHCP each get their own UCI file. That folder is the router to back up.

The UI and sysupgrade wrap those files into dated tarballs for moves. Packages are tracked separately with opkg lists. Back up /etc/config with the package list. Tarballs restore settings without retyping wireless keys. Packages reinstall from the saved list. Wireless keys live in the wireless UCI file. Extroot setups add USB storage for packages.

Where OpenWrt stores this, by platform

Linux
/etc/config (OpenWrt)

UCI files for network, wireless, firewall, and system settings. Edit through LuCI or uci commands. Copy whole folder with the package list.

Linux
/tmp/backup-OpenWrt.tar.gz

Dated settings archives from LuCI or sysupgrade. Contain /etc/config plus selected files. Save off router since /tmp clears on reboot.

Frequently asked questions

what do i back up for an OpenWrt router

Copy /etc/config with the opkg package list. That folder holds network, wireless, and firewall settings in UCI files. Packages reinstall from the list. Those two restore the router.

where do OpenWrt backup tarballs save

Generate one in System, Backup in LuCI or with sysupgrade -b on SSH. Tarballs land wherever you save them, often /tmp. Copy the file off the router for safekeeping.

Notice an outdated path? Let us know.