TL;DR:
- OpenWRT is a Linux-based open-source firmware that turns consumer routers (and x86 mini-PCs) into fully programmable edge nodes — running Mosquitto MQTT broker, Node-RED automation, Home Assistant, and Docker on appropriate hardware
- GL.iNet routers running OpenWRT are the most practical commercial option: purpose-built for this use case with pre-installed OpenWRT, good community support, and prices starting around £50
- The key advantage over commercial IoT gateways is full Linux control, no mandatory cloud services, and the ability to run any open-source stack locally at the network edge
Most commercial IoT deployments rely on some form of cloud connectivity for data collection, processing, and management. This works well when you have reliable internet, acceptable latency, no data sovereignty concerns, and confidence that the cloud service will remain available. In industrial, remote, or sensitive environments, those assumptions often don’t hold.
OpenWRT offers a different path: a full Linux environment running on hardware that costs a fraction of commercial edge gateways, with complete control over the software stack and no mandatory cloud dependencies. It’s been the foundation of self-hosted home automation setups for years, but it’s increasingly relevant for industrial edge applications, remote monitoring, and privacy-conscious deployments.
What OpenWRT Is
OpenWRT is an open-source Linux distribution built for embedded networking hardware — originally, router chipsets. The project started as a replacement firmware for the Linksys WRT54G in 2004 and has expanded to support hundreds of devices. Today it runs on routers, access points, small x86 PCs, and purpose-built IoT gateway hardware.
The key difference from consumer router firmware is that OpenWRT exposes the full Linux userspace. You get SSH access, a package manager (opkg), iptables for network control, and the ability to install and run essentially any software that compiles for the target architecture. For edge IoT use cases, this means you can install an MQTT broker, an automation runtime, and store time-series data — all on a device that draws 5-15 watts and costs £50-200.
Hardware Options
GL.iNet routers are the most popular commercial choice. GL.iNet builds routers that ship with their own OpenWRT-based firmware (GL.iNet firmware) and also support standard OpenWRT flashing. The GL-MT3000 (Beryl AX) and GL-AXT1800 (Slate AX) are popular midrange options. For edge IoT specifically, GL.iNet also makes the GL-E750 (a portable unit with a built-in battery) and the GL-X3000 (with 5G capability for remote deployments).
x86 mini-PCs (Intel N100, AMD Ryzen Embedded) running OpenWRT unlock more capability: more RAM, USB ports for sensors and modems, and support for Docker without the architecture constraints of ARM-based routers. Devices like the Beelink EQ12 or Topton N-series fanless units run OpenWRT from a USB or NVMe drive and can serve as capable edge nodes.
Raspberry Pi can run OpenWRT, though a standard Raspberry Pi OS with NetworkManager often gives a better experience for Pi-specific hardware. OpenWRT on Pi makes most sense when you need the router/gateway network functions alongside IoT processing.
Installing the Core IoT Stack
Once you have OpenWRT installed and accessible via SSH, adding IoT gateway capabilities is straightforward:
Mosquitto MQTT broker:
opkg update
opkg install mosquitto-ssl mosquitto-client-ssl
uci set mosquitto.mqtt.enabled=1
uci commit mosquitto
service mosquitto start
Configure listeners in /etc/mosquitto/mosquitto.conf. On a local network, an MQTT broker on the router means every device on that network can publish and subscribe without internet connectivity — zero cloud dependency for device-to-device messaging.
Node-RED for automation: Node-RED doesn’t install via opkg directly on ARM devices (it requires Node.js), but on x86 OpenWRT targets with sufficient storage:
opkg install node node-npm
npm install -g --unsafe-perm node-red
For ARM routers with limited storage, running Node-RED in a Docker container on an x86 device alongside OpenWRT as the network layer is a more practical architecture.
Persistent storage: Most routers have limited onboard flash storage (16-128MB). For IoT data logging, either use a USB stick (opkg install kmod-usb-storage block-mount) or configure logging to write to an external device. InfluxDB and SQLite are both usable on x86 targets with USB or NVMe storage for time-series retention.
Use Cases by Environment
Home automation without cloud: OpenWRT router running Mosquitto as the MQTT broker for Zigbee-to-MQTT (via Zigbee2MQTT on a co-located Pi or USB coordinator), with Node-RED automations. All data stays local. This is the architecture used by a significant portion of the DIY home automation community.
Remote site monitoring: An x86 mini-PC at an agricultural site, remote infrastructure enclosure, or off-grid location, running OpenWRT with a 4G/5G modem and a local MQTT broker. Sensors publish locally; data is batched and uploaded when connectivity allows. Processing and alerting run locally regardless of internet availability.
Industrial LAN edge: OpenWRT running on a small PC within an industrial network segment, collecting MQTT or Modbus-over-TCP data from equipment on that segment, running local processing rules, and forwarding aggregated data upstream to a SCADA system or cloud platform.
Development and testing: A GL.iNet router or x86 device running OpenWRT makes a portable IoT testbed — you can bring it anywhere, connect IoT devices to its WiFi, and run a complete broker-automation-storage stack on a self-contained device.
Limitations
OpenWRT is not a managed platform. There’s no built-in OTA update mechanism for your custom packages, no fleet management, and no monitoring dashboard out of the box. For production fleets of edge devices, platforms like Balena or AWS IoT Greengrass provide better device management — though at higher cost and with cloud dependencies.
Storage and memory constraints are real on router-class hardware. Mosquitto and lightweight services run fine; running full-featured databases or ML inference models requires x86 hardware with adequate resources.
Security requires active configuration. OpenWRT doesn’t assume a security-hardened posture out of the box for all settings — MQTT brokers should have authentication configured, and SSH access should be key-only. Treat these as first-configuration steps before deploying.
For teams who need local-first IoT processing at low cost with full software control, OpenWRT is an underutilised option that’s significantly more capable than most people assume.