Installing large packages on OpenWRT can be challenging due to the limited storage space typically available on many routers. While there are several methods to address this limitation, this guide will focus on expanding the root filesystem using an external storage volume, such as a USB device or disk.
This demonstration uses OpenWRT hosted in a cloud infrastructure, but the instructions should also apply to physical routers running OpenWRT. The following steps assume you already have shell access to your OpenWRT device. For more detailed information, please refer to the official OpenWRT extroot documentation: https://openwrt.org/docs/guide-user/additional-software/extroot_configuration
1
Install Required Packages
First, update the package lists and install the necessary packages:
This configuration sets up your external drive as the primary storage for installing packages.
9
Reboot Your Router
Reboot the router to finalize the changes:
reboot
Install Docker
Refer to the OpenWRT Docker guide for more details: https://openwrt.org/docs/guide-user/virtualization/docker_host
Generally, you may need to run containers as specific users, requiring the creation of new users, groups, and setting up the appropriate folder permissions. However, for simplicity in this demo, we’ll use the root user.
Install Docker:
opkginstalldockerddocker
Install WireGuard
The safest way to install WireGuard on OpenWRT is via the Web GUI.
1
Update package lists via Web GUI
Navigate to System -> Software and click the Update lists… button.
2
Search and install WireGuard
Search for WireGuard and install wireguard-tools and luci-proto-wireguard (for Web GUI integration).
3
Reboot
Reboot the router after installation.
Join Netmaker Network Via Docker
In the Netmaker UI, add a device by selecting Docker. Copy the docker run command (omitting sudo) and run it on your OpenWRT device.