Skip to content

HudsonGraeme/MoCI

Repository files navigation

MoCI

Modern Configuration Interface for OpenWrt

License: MIT

DemoInstallFeatures

MoCI Dashboard


What is this?

A complete standalone web interface for OpenWrt routers. Not a LuCI theme—pure vanilla JavaScript SPA using OpenWrt's native ubus API.

scp -r moci/* root@192.168.1.1:/www/moci/
# Access at http://192.168.1.1/moci/

Features

Dashboard

  • Live system stats & graphs
  • Network traffic monitoring
  • System logs
  • Active connections
  • Quick actions

Network

  • Interface configuration
  • Wireless management (SSID, encryption)
  • Firewall & port forwarding
  • DHCP leases (active + static)
  • Diagnostics (ping, traceroute, WOL)

System

  • Hostname & timezone
  • Password management
  • Backup & restore
  • Package management
  • Service control
  • Init script management

Design

  • Dark glassmorphic UI
  • Responsive tables
  • Real-time updates
  • Toast notifications
  • Smooth animations

Installation

Option 1: Package (Recommended)

Download the ipk for your architecture from Releases:

wget https://github.com/HudsonGraeme/MoCI/releases/latest/download/moci_VERSION_ARCH.ipk
opkg install moci_VERSION_ARCH.ipk

Available architectures: x86_64, ramips/mt7621, ath79, mediatek/filogic, bcm27xx, ipq40xx, mvebu, ipq806x

Replace VERSION_ARCH with your specific file from the releases page.

Option 2: Manual Install

Quick start:

scp -r moci/* root@192.168.1.1:/www/moci/
scp rpcd-acl.json root@192.168.1.1:/usr/share/rpcd/acl.d/moci.json
ssh root@192.168.1.1 "/etc/init.d/rpcd restart"

First time setup (if you get 404):

ssh root@192.168.1.1
uci set uhttpd.main.home='/www'
uci commit uhttpd
/etc/init.d/uhttpd restart

What the ACL grants:

  • WAN/LAN status display on dashboard
  • Bandwidth monitoring
  • Device count
  • Package list viewing in Software tab

Access at http://192.168.1.1/moci/ and login with your root credentials.


Building from Source

To build the ipk package yourself:

# In OpenWrt buildroot
git clone https://github.com/HudsonGraeme/MoCI.git package/moci
make package/moci/compile

The package will be in bin/packages/*/base/moci_*.ipk


Security

Uses OpenWrt's native authentication system. Same security model as LuCI:

Feature MoCI LuCI
Authentication ubus sessions ubus sessions
Authorization rpcd ACLs rpcd ACLs

All operations validated server-side. No privilege escalation paths.


Development

Auto-deploy on save:

# QEMU VM
pnpm dev

# Physical router
pnpm dev:physical 192.168.1.1

Project structure:

moci/
├── index.html    - Application shell
├── app.css       - Styling
└── js/
    ├── core.js   - Core functionality
    └── modules/  - Feature modules (dashboard, network, system, vpn, services)

Adding features:

const [status, result] = await this.ubusCall('system', 'info', {});

Browser Support

Chrome 90+ • Firefox 88+ • Safari 14+ • Any modern browser


License

MIT

About

Modern Configuration Interface for OpenWRT

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors