nut_webgui
nut_webgui copied to clipboard
Web interface for Network UPS Tools
NUT Web GUI
Light weight web interface for Network UPS Tools.


Quickstart
docker run -e UPSD_ADDR=10.0.0.1 -e UPSD_USER=test -e UPSD_PASS=strongpass -p 9000:9000 ghcr.io/superioone/nut_webgui:latest
Features
- Monitors UPS variables with auto refresh.
- Supports INSTCMD calls from GUI.
- 🥔 Potato PC friendly. Small footprint on both resource usage and disk size.
- Basic JSON API.
- Supports RISC-V and older ARM devices.
In order to run
INSTCMD, make sure the configured user has proper instcmds granted atupsd.users. See man(upsd.users).
Examples
- Kubernetes with EndpointSlice
- Docker compose
CPU architecture support
| Arch | Test Hardware | Notes |
|---|---|---|
| amd64 | AM4 CPU | Works across all amd64 platforms. |
| amd64-v3 | AM4 CPU | Snake oil level optimizations with AVX. It mostly reduces response compression overhead. |
| amd64-v4 | Intel® SDE | Snake oil level optimizations with AVX-512. |
| arm64 | Raspberry Pi 4 Model B | |
| armv7 | Qemu emulation | |
| armv6 | Qemu emulation | |
| riscv64 | Qemu emulation |
amd64 v3 and v4 variants require certain CPU feature flags to run. If you are a crackhead min-max enjoyer (like me), you can use
nut_webgui:latest-amd64-v3andnut_webgui:latest-amd64-v4images. See x86-64 Microarchitecture levels for more details.
Command-Line arguments
--base-path: Overrides HTTP server base path. Default is/.--listen: Listen address for the HTTP server. Default is0.0.0.0.--log-level: Log level for the HTTP server. Default isinfo.--poll-freq: UPSpollfreq in seconds. Default is30.--poll-interval: UPS pollinterval in seconds. Default is2.--port: Port used by the HTTP server. Default is9000.--static-dir: Directory path for static files. Default is./static.--upsd-addr: UPS daemon address. Default islocalhost.--upsd-pass: UPS daemon password.--upsd-port: UPS daemon port. Default is3493.--upsd-user: UPS daemon username.
Container image environment variables
BASE_PATH: Overrides HTTP server base path. Default is/.LISTEN: Listen address for the HTTP server. Default is0.0.0.0.LOG_LEVEL: Log level. Default isinfo.POLL_FREQ: UPS pollfreq in seconds. Default is30.POLL_INTERVAL: UPS pollinterval in seconds. Default is2.PORT: Port used by the HTTP server. Default is9000.UPSD_ADDR: UPS daemon address. Default islocalhost.UPSD_PASS: UPS daemon password.UPSD_PORT: UPS daemon port. Default is3493.UPSD_USER: UPS daemon username.
Log level options:
info,warn,error,debug,trace
BASE_PATHrules:
- Allows multiple path segments. (eg.
segment1/segment2/...)- Whitespaces and trailing forward slash
/characters will be trimmed. For example,base_pathand/base_path/are treated as the same.- Percent encoded characters are not supported.
- Unlike RFC3986 path definition,
:and'characters are not allowed. However, you can still use some questionable base paths such as(-_-)/(@_@)/($_$)/nut-xyz.monitor/
JSON data API
A simple JSON-based API is available for integration and automation purposes.
OpenAPI 3.1.0 specification files: json minimized | yaml
Probes
nut_webgui has basic probe endpoints to check server health and readiness:
/probes/health/probes/readiness
Building from source and debugging
See Building and Debugging.