A professional network statistics application for OpenWrt LuCI
Features • Installation • Usage • Development • License
luci-app-netstat is a modern, feature-rich LuCI application that provides comprehensive network traffic statistics and monitoring for OpenWrt routers. It leverages vnstat for accurate traffic monitoring and presents the data through an intuitive web interface.
The application offers real-time network statistics, historical data visualization, and detailed traffic analysis to help you understand your network usage patterns.
✨ Core Features:
- 📊 Real-time Network Monitoring - Track network traffic with live statistics
- 📈 Traffic Visualization - Interactive charts powered by Chart.js
- 📅 Historical Data - Monitor trends over days, weeks, months, and years
- 🎨 Dark Mode Support - Professional dark theme for comfortable usage
- 📱 Responsive Design - Works seamlessly on desktop and mobile devices
- ⚙️ Easy Configuration - Simple UCI-based configuration system
- 🔄 Automatic Updates - Uses vnstat for continuous data collection
- OpenWrt with LuCI installed
vnstatpackage (required dependency)- Modern web browser (Chrome, Firefox, Safari, Edge)
Clone the repository and install using the OpenWrt build system:
git clone https://github.com/dotycat/luci-app-netstat.git
cd luci-app-netstat
make- Download the latest
.ipkpackage from Releases - Upload to your router via SCP:
scp luci-app-netstat_*.ipk root@<router-ip>:/tmp/
- Install via SSH:
ssh root@<router-ip> opkg install /tmp/luci-app-netstat_*.ipk
- Navigate to LuCI Web Interface → Status → Network Statistics
The application configuration is managed via UCI. Edit /etc/config/netstats to customize:
config netstat
option enabled '1'
option interface 'wan'
option update_interval '60'
Ensure vnstat is properly configured and running:
opkg install vnstat
service vnstat start
service vnstat enable- Log into your OpenWrt LuCI web interface
- Navigate to Status → Network Statistics
- View traffic statistics for your network interfaces
- Current Usage - Real-time traffic rates
- Daily Statistics - Traffic breakdown by day
- Monthly Analysis - Monthly usage overview
The NoobWRT theme stores the user's theme preference in localStorage under the key luci-theme ('dark' or 'light'). When dark mode is active the theme also adds the class dark-theme to document.body.
tabs.htm (rendered on every Netstat tab) reads this value at page load:
var isDark = localStorage.getItem('luci-theme') === 'dark'
|| document.body.classList.contains('dark-theme');If dark mode is detected, a <style> block is injected into the page with !important overrides for every .netstat-* class. This covers:
| Selector | Dark value |
|---|---|
.netstat-dashboard |
#1a1d20 background |
.netstat-summary |
#111315 background |
.netstat-chart-wrap |
#1a1d20 background |
.netstat-about-card |
#1a1d20 background |
.netstat-chart-title, .netstat-summary-item |
#f3f4f6 text |
.netstat-summary-label, .netstat-about-label |
#9ca3af text |
.netstat-about-row a |
#60a5fa link color |
The same flag (window._netstatDark) is passed to Chart.js so axis labels and grid lines also use dark-friendly colors.
No server-side detection or separate CSS files are needed — everything is driven by the single localStorage value the theme toggle button already sets.
- Original Development: SMALLPROGRAM
- Maintenance: nooblk-98
Contributions are welcome! Please feel free to:
- Report bugs and issues
- Submit feature requests
- Create pull requests with improvements
- Improve documentation
For support, issues, or questions:
- Open an Issue on GitHub
- Check existing Discussions
- Contact: liyanagelsofficial@gmail.com
Made with ❤️ for the OpenWrt Community
