Keep your systems safe when the power goes out. NUPST is a lightweight, battle-tested command-line tool that monitors SNMP-enabled UPS devices and orchestrates graceful system shutdowns during power emergencies. Distributed as self-contained binaries with zero runtime dependencies for maximum reliability.
Version 5.0+ is powered by Deno and distributed as single pre-compiled binaries—no installation, no setup, just run.
✨ Features
- 🔌 Multi-UPS Support: Monitor multiple UPS devices from a single installation
- 👥 Group Management: Organize UPS devices into groups with flexible operating modes
- Redundant Mode: Only shutdown when ALL UPS devices in a group are critical
- Non-Redundant Mode: Shutdown when ANY UPS device in a group is critical
- ⚙️ Action System: Define custom actions with flexible trigger conditions
- Battery threshold triggers
- Runtime threshold triggers
- Power status change triggers
- Configurable shutdown delays
- 🌐 Universal SNMP Support: Full support for SNMP v1, v2c, and v3 with authentication and encryption
- 🏭 Multiple UPS Brands: Works with CyberPower, APC, Eaton, TrippLite, Liebert/Vertiv, and custom OID configurations
- 🚀 Systemd Integration: Simple service installation and management
- 📊 Real-time Monitoring: Live status updates with detailed action and group information
- 🌐 HTTP API: Optional HTTP server for JSON status export with authentication
- ⚡ Power Metrics: Monitor output load, power (watts), voltage, and current for all UPS devices
- 📦 Self-Contained Binary: Single executable with zero runtime dependencies—just download and run
- 🖥️ Cross-Platform: Binaries available for Linux (x64, ARM64), macOS (Intel, Apple Silicon), and Windows
🚀 Quick Start
One-Line Installation
Initial Setup
That's it! Your system is now protected. 🛡️
📥 Installation
Automated Installer Script (Recommended)
The installer script handles everything automatically:
What it does:
- Detects your platform (OS and architecture)
- Downloads the latest pre-compiled binary
- Installs to /opt/nupst/nupst
- Creates symlink at /usr/local/bin/nupst
- Preserves existing configuration
Installer Options
Manual Installation
Download the appropriate binary for your platform from releases:
| Linux x64 | nupst-linux-x64 |
| Linux ARM64 | nupst-linux-arm64 |
| macOS Intel | nupst-macos-x64 |
| macOS Apple Silicon | nupst-macos-arm64 |
| Windows x64 | nupst-windows-x64.exe |
Alternative: Via npm
Alternatively, NUPST can be installed via npm:
Note: This method downloads the appropriate pre-compiled binary for your platform during installation.
Verify Installation
📖 Usage
Command Structure
NUPST uses an intuitive subcommand structure:
Service Management
UPS Device Management
Group Management
Action Management 🆕
Actions define what happens when UPS conditions are met. Actions can be attached to individual UPS devices or to groups.
Example: Adding an action
Feature Management 🆕
Optional features like the HTTP server for JSON status export:
Example: Enabling HTTP Server
Query UPS Status via HTTP:
JSON Response:
Configuration
Global Options
⚙️ Configuration
NUPST stores configuration at /etc/nupst/config.json. The easiest way to configure is through interactive commands, but you can also edit the JSON directly.
Example Configuration (v4.1+)
Configuration Fields
Global Settings
- version: Config format version (current: "4.2")
- checkInterval: Polling interval in milliseconds (default: 30000)
- httpServer: Optional HTTP server configuration (see HTTP Server Configuration below)
UPS Device Settings
- id: Unique identifier for the UPS
- name: Friendly name
- groups: Array of group IDs this UPS belongs to
- actions: Array of action configurations (see Actions section)
SNMP Configuration:
| host | IP address or hostname | e.g., "192.168.1.100" |
| port | SNMP port | Default: 161 |
| version | SNMP version | 1, 2, or 3 |
| timeout | Timeout in milliseconds | Default: 5000 |
| upsModel | UPS brand/model | 'cyberpower', 'apc', 'eaton', 'tripplite', 'liebert', 'custom' |
| community | SNMP community (v1/v2c) | Default: "public" |
SNMPv3 Security:
| securityLevel | 'noAuthNoPriv', 'authNoPriv', or 'authPriv' |
| username | SNMPv3 username |
| authProtocol | 'MD5' or 'SHA' |
| authKey | Authentication password |
| privProtocol | 'DES' or 'AES' (for authPriv) |
| privKey | Privacy/encryption password |
Action Configuration
Actions define automated responses to UPS conditions:
Action Fields:
| type | Action type | Currently only 'shutdown' |
| thresholds | Battery and runtime limits | { battery: 0-100, runtime: minutes } |
| triggerMode | When to trigger action | See Trigger Modes below |
| shutdownDelay | Delay before executing (seconds) | Default: 5 |
Trigger Modes:
| onlyPowerChanges | Trigger only when power status changes (on battery → online or vice versa) |
| onlyThresholds | Trigger only when battery or runtime thresholds are violated |
| powerChangesAndThresholds | Trigger only when power changes AND thresholds are violated |
| anyChange | Trigger on any status change |
Group Settings
Groups allow coordinated management of multiple UPS devices:
Group Modes:
- redundant: System shuts down only when ALL UPS devices in the group are critical. Perfect for setups with backup UPS units.
- nonRedundant: System shuts down when ANY UPS device in the group is critical. Used when all UPS devices must be operational.
HTTP Server Configuration 🆕
Enable optional HTTP server for JSON status export with authentication:
HTTP Server Fields:
| enabled | Whether HTTP server is enabled | false |
| port | TCP port for HTTP server | 8080 |
| path | URL path for status endpoint | /ups-status |
| authToken | Authentication token (required for all requests) | Auto-generated |
Authentication Methods:
The HTTP server supports two authentication methods:
- Bearer Token (Header): Authorization: Bearer <token>
- Query Parameter: ?token=<token>
Security Features:
- Token-based authentication required for all requests
- Returns 401 Unauthorized for invalid/missing tokens
- Serves cached data from monitoring loop (no extra SNMP queries)
- No CORS headers (local network only)
Use Cases:
- Integration with monitoring systems (Prometheus, Grafana, etc.)
- Custom dashboards and visualizations
- Mobile apps and web interfaces
- Home automation systems
Supported UPS Models
NUPST includes built-in OID mappings for:
- CyberPower (cyberpower)
- APC (apc)
- Eaton (eaton)
- TrippLite (tripplite)
- Liebert/Vertiv (liebert)
- Custom OIDs (custom)
For custom UPS models, specify customOIDs:
🖥️ Monitoring
Status Display
The status command shows comprehensive information about your UPS devices, groups, and configured actions:
Live Logs
Monitor NUPST in real-time:
Example output:
🔒 Security
NUPST is designed with security as a priority:
Architecture Security
- Single Binary: Self-contained executable with zero runtime dependencies
- No Installation Required: Pre-compiled binaries run immediately without package managers
- Minimal Attack Surface: Compiled Deno binary with only essential SNMP functionality
- Reduced Supply Chain Risk: Pre-compiled binaries with SHA256 checksums
- Isolated Execution: Runs with minimal required privileges
SNMP Security
Full SNMPv3 support with authentication and encryption:
| noAuthNoPriv | No authentication, no encryption (not recommended) |
| authNoPriv | MD5/SHA authentication without encryption |
| authPriv | Full authentication + DES/AES encryption (recommended) |
Example SNMPv3 Configuration:
Network Security
- Local-Only Communication: Only connects to UPS devices on local network
- No Telemetry: No data sent to external servers
- No Auto-Updates: Manual update process only
- HTTP Server (optional):
- Disabled by default
- Token-based authentication required
- Local network access only (no CORS)
- Serves cached data (no additional SNMP queries)
- Configurable port and path
Verifying Downloads
All releases include SHA256 checksums:
🔄 Updating NUPST
Automatic Update
Re-run the installer to update to the latest version:
The installer will:
- Download the latest binary
- Replace the existing installation
- Preserve your configuration
- Restart the service if it was running
Manual Update
Check for Updates
Visit the releases page for the latest version.
🗑️ Uninstallation
🔧 Troubleshooting
Binary Won't Execute
Service Won't Start
Can't Connect to UPS
Permission Denied Errors
Most system operations require root:
Action Not Triggering
📊 System Changes
When installed, NUPST makes the following changes:
File System
| /opt/nupst/nupst | Pre-compiled binary |
| /usr/local/bin/nupst | Symlink to binary |
| /etc/nupst/config.json | Configuration file |
| /etc/systemd/system/nupst.service | Systemd service unit |
Services
- Creates nupst.service systemd unit (when enabled)
- Runs with root permissions (required for system shutdown)
Network
- Outbound SNMP to UPS devices (default port 161)
- Optional inbound HTTP server (disabled by default, configurable port)
- No external internet connections
🚀 Migration from v3.x
Upgrading from NUPST v3.x (Node.js) to v4.x (Deno) is seamless:
The installer automatically:
- Detects v3.x installation
- Stops the service
- Replaces Node.js version with Deno binary
- Migrates configuration (v4.0 → v4.1 format if needed)
- Restarts the service
Key Changes in v4.x
| Runtime | Node.js + npm | Deno |
| Distribution | Git repo + npm install | Pre-compiled binaries |
| Runtime Dependencies | node_modules required | Zero (self-contained) |
| Size | ~150MB (with node_modules) | ~80MB (single binary) |
| Startup | Seconds | Milliseconds |
| Commands | Flat (nupst add) | Subcommands (nupst ups add) |
| Configuration | UPS-level thresholds | Action-based thresholds |
Configuration Compatibility
Your v3.x configuration is fully compatible. The migration system automatically converts:
v4.0 format (UPS-level thresholds):
v4.1 format (action-based thresholds):
Migration happens automatically on first run—no manual changes needed.
💻 Development
Building from Source
Requirements: Deno v1.x or later
Project Structure
📞 Support
- Issues: Report bugs or request features
- Documentation: Full documentation
- Source Code: View source
License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the license file within this repository.
Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
Company Information
Task Venture Capital GmbH Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at [email protected].
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
.png)

