app-nut is a ClearOS Webconfig application for configuring, monitoring and diagnosing Network UPS Tools (NUT) on ClearOS systems.
The application is focused on a safe local USB UPS workflow:
USB UPS → NUT driver → upsd → upsmon → ClearOS Webconfig
It provides a friendly Webconfig interface for USB UPS detection, NUT configuration, live status monitoring, diagnostics, and local event logging.
- Detects connected USB UPS devices.
- Filters out irrelevant USB devices such as Linux Foundation root hubs.
- Opens a confirmation/configuration form before writing NUT configuration.
- Does not write UPS configuration directly from the USB device list.
The app manages the main NUT configuration files:
/etc/ups/nut.conf
/etc/ups/ups.conf
/etc/ups/upsd.conf
/etc/ups/upsd.users
/etc/ups/upsmon.conf
Supported settings include:
MODEinnut.conf- local
LISTENaddresses and ports inupsd.conf ALLOW_NO_DEVICEALLOW_NOT_ALL_LISTENERSDEBUG_MIN- multiple
upsd.usersusers with different roles - local
upsmonparameters - event logging settings
The dashboard shows runtime UPS data from upsc, including:
- UPS status
- battery charge
- low/warning battery thresholds
- estimated runtime
- battery temperature
- input/output voltage
- UPS load
- manufacturer, model and serial data
UPS status values are shown with clear labels and emoji indicators.
app-nut can log selected upsmon events into a local app-owned log:
/var/clearos/nut/events.log
Supported event types include:
ONLINE
ONBATT
LOWBATT
FSD
SHUTDOWN
COMMOK
COMMBAD
NOCOMM
REPLBATT
The diagnostics page provides read-only checks for:
- configured NUT mode
- local
LISTENaddresses - NUT service status
- selected TCP ports
- runtime
upscoutput - configuration file permissions
- recent service status messages
The diagnostics page does not modify configuration, firewall rules, Zabbix settings or service state.
app-nut is intentionally conservative:
- ✅ no firewall changes
- ✅ no Zabbix configuration
- ✅ no hidden Webconfig
sudocalls - ✅ no private
/usr/sbin/app-nutctl - ✅
/etc/upspermissions are handled by package install/upgrade scripts - ✅ Webconfig reads and applies only app-owned configuration
- ✅ NUT package files remain owned by the real NUT package
Packaging files are stored in:
packaging/
├── app-nut.spec
└── build-rpm.sh
Build an RPM from a GitHub release tag:
cd packaging
./build-rpm.shOr specify version and release explicitly:
cd packaging
VERSION=0.1.56 RELEASE=1 ./build-rpm.shBy default the build script downloads:
https://github.com/snuglinux/app-nut/archive/refs/tags/<VERSION>.tar.gz
So the corresponding GitHub tag must exist before building with the default source URL.
The RPM installs the ClearOS app to:
/usr/clearos/apps/nut
It also installs real package-owned helpers:
/usr/sbin/app-nut-detect
/usr/sbin/app-nut-notify
And ClearOS daemon descriptors:
/var/clearos/base/daemon/nut-server.php
/var/clearos/base/daemon/nut-monitor.php
app-nut state is stored in:
/var/clearos/nut
/var/clearos/nut/backup
/var/clearos/nut/events.log
The core package expects:
app-base
app-base-core
nut
usbutils
iproute
NUT itself provides the real UPS tools and services, for example:
upsc
upsd
upsmon
upsdrvctl
nut-server.service
nut-monitor.service
nut-driver@.service
For local monitoring, app-nut creates or manages an upsmon primary user in:
/etc/ups/upsd.users
Example:
[upsmon-local]
password = ********
upsmon primaryThe local monitor is then referenced in:
/etc/ups/upsmon.conf
Example:
MONITOR ups-name@localhost 1 upsmon-local ******** primaryThe interface includes:
- Ukrainian
- English
Event log messages are translated in Webconfig, not stored as fixed-language text in the raw event log.
NUT can initiate system shutdown when a UPS reaches a critical battery state.
Important events include:
OB— running on batteryLB— low batteryFSD— forced shutdownSHUTDOWN— shutdown sequence started
Review upsmon.conf, user roles and event logging settings carefully before using app-nut on production systems.
GPLv3
SnugLinux
https://github.com/snuglinux

