Patrium-Speedtest is a plugin for OPNsense that integrates the Ookla Speedtest CLI to run internet speed tests directly from your firewall and visualize results.
- OPNsense 25.x build environment checked out to a ROOTDIR (e.g.,
/tmp/opnsense) - Internet access to fetch the Speedtest CLI and plugin sources
- FreeBSD package management installed on target firewall
Clone the plugin source from GitHub into your OPNsense plugin directory:
cd /tmp/opnsense/plugins/devel
git clone https://github.com/mcduffman/Patrium-Speedtest.git patrium-speedtest/tmp/opnsense
├── plugins
│ └── devel
│ └── patrium-speedtest
│ ├── Makefile
│ ├── files
│ │ └── post-install.sh
│ ├── src/...
│ └── service/...
- Update OPNsense tools:
cd /tmp/opnsense/tools env ROOTDIR=/tmp/opnsense make update - Build the plugin package:
The resulting
env ROOTDIR=/tmp/opnsense make -C /tmp/opnsense/tools plugins
os-patrium-speedtest-1.0.txzwill be in/tmp/opnsense/var/.../firmware/plugins.
- Copy the package to your firewall:
scp /tmp/opnsense/var/.../os-patrium-speedtest-1.0.txz root@firewall:/tmp
- On the firewall, install the package:
pkg add /tmp/os-patrium-speedtest-1.0.txz configctl pkg update
- Enable the plugin in the GUI under System → Firmware → Plugins.
- Dashboard Widget: Add the Speedtest widget to your dashboard, configure to show latest or averages.
- Run Manually: In Diagnostics → Speedtest, click “Run Speedtest”.
- Scheduled Tests: Enable scheduled tests in System → Settings → Speedtest, set interval and units. The plugin will install a cron job automatically.
- GET
/api/speedtest/settings/get - POST
/api/speedtest/settings/set - POST
/api/speedtest/service/test
Example:
curl -k -H "Authorization: Bearer <token>" https://<firewall>/api/speedtest/service/testMIT