I built Perch because managing three access points meant keeping three browser tabs and iftop open just to figure out what was going on. I wanted one dashboard showing traffic per device, per protocol and per access point, similar to what UniFi gives you for its own hardware. Right now it runs my home network and a friend's.
How it's split up
Each piece lives in its own repo.
- The controller is an AdonisJS app backed by MariaDB. It ingests reports from the agents, stores the history, and serves both the API and the React dashboard. The scheduler and agent sessions stay in the same process, so there's only one service to run.
- The collector is a Go binary packaged for OpenWrt. It captures packets with
libpcapand identifies protocols using nDPI. On the router it also reads conntrack, load, memory and WAN rates from/proc, so you don't need to installnode_exporteror any extra monitoring agents alongside it. - The AP daemon runs on each OpenWrt access point. Besides replacing the Prometheus exporter, it lets the controller kick or steer a client, blink an AP's LED to locate it, or reboot it without having to SSH in.
Outbound WebSockets
Both the collector and the AP daemon connect out to the controller over WebSocket and speak JSON-RPC. The controller tells them how often to report, and they push metrics on that interval.
Because the agents initiate the connection, you don't have to open any listening ports on your router or access points. A fresh collector pops up in the dashboard as pending and won't send traffic data until you adopt it, much like UniFi. Access points join using a token you generate in the dashboard, which also gives you the install command to paste in.
History
The controller buckets raw traffic into roughly 5-second intervals and keeps it for 30 days, then rolls it up into 5-minute, hourly and daily buckets kept for two to five years. All of those retention windows are configurable.
Running it
You can bring up the controller and MariaDB with a single compose file:
curl -fsSLO https://raw.githubusercontent.com/capthndsme/perch-controller/main/docker-compose.yml
docker compose up -dOpen port 8080 to create the admin account, install the collector package on your router and adopt it, then add your access points in whatever order you like.
Plain HTTP works for testing, though it doesn't encrypt traffic, so anyone who can sniff your LAN could read the agent reports. The README walks through isolating the controller and device management IPs on their own VLAN or putting it behind HTTPS.
Perch is at v1.0 under the MIT licence. Container images are on GHCR, and collector packages cover five router architectures including MIPS.