Sign inSign up

prplanit/nutify-ssh

By prplanit

•Updated about 1 year ago

Image
0

501

prplanit/nutify-ssh repository overview

⁠📦 This image is no longer maintained!

If we resume packaging nutify we will likely remove SSH from the image (and move it to hlhd/nutify) as we find that embedding SSH in this container is not preferred to NUT server & client interaction. Hosts can listen to the master NUT server and shutdown when it has reported on battery status for a specific duration. If you choose this image, continue informed that it is outdated and not best practice, ever.

In the meantime you can use the packaging from the official maintainer:

docker pull dartsteven/nutify:0.3.0-amd64

0.3.0-amd64 was specified as an example, a newer version may be available.

➡️ Official Repository: https://hub.docker.com/r/dartsteven/nutify⁠

Please update your image references. Tags here are frozen at the last version published before the move.


GitHub GitLab Last Commit Open Issues Contributors


Nutify Official Logo

⁠Nutify - UPS Monitoring System

Nutify is a comprehensive monitoring system designed to track the health and performance of your Uninterruptible Power Supply (UPS) devices. It provides real-time insights into critical UPS metrics, allowing you to ensure the continuous operation and protection of your valuable equipment. Nutify collects data, generates detailed reports, and visualizes key parameters through interactive charts, all accessible via a user-friendly web interface.

Buy Me a Coffee ⁠ Help Testing ⁠ Wiki ⁠ Changelog ⁠ Multi Monitor ? ⁠

Join our Discord channel for any issues, questions, information, or testing!

Nutify Bugs ⁠ Nutify Help ⁠ Nutify Support ⁠

If you like Nutify, please give it a ⭐️ on GitHub to help the project grow!

⁠SSH Specific Instructions

Note: This is a modified version of Nutify with SSH added to it. The developer has stated upon reaching out that he will soon add, official support. This image was published by SoFMeRight. I did a best effort to document this after pushing it by incident, not truly mistake as part of a GitOps pipeline test. So I guess this is published now 🤷🏽‍♀️ So I may as well document it I guess????

⁠Adding a custom ssh shutdown command to Nutify

In the Nutify UI: Custom configurations via the Settings⚙️ on top right -> Advanced Section

Look to edit the file "/etc/nut/upsmon.conf" For the deault config we should replace this line:

SHUTDOWNCMD "/sbin/shutdown -h now"

For something like this:

SHUTDOWNCMD "/bin/bash /root/script/nutify-shutdown.sh"
⁠Adding your custom shutdown script to Nutify

We will need to create a script. i.e.

docker exec -it Nutify nano /root/script/nutify-shutdown.sh

Change its contents to something like this:

#!/bin/bash
apt update
apt install -f -y openssh-client
hosts=( "Avocado" "Bamboo" "Cosmos" "Dragonfruit" "Eggplant" )
for host in "${hosts[@]}"; do
    ssh root@$host "shutdown now"
    done

Note that we will need to ensure the script has execute permissions, i.e.

  • docker exec -it Nutify chmod +x nutify-shutdown.sh
⁠Adding SSH KEYS so that Nutify can authenticate to hosts for shutdown.
  1. Generating ssh keys:
  • docker exec -it Nutify ssh-keygen -b 4096
  1. Copying the public key to each host you want to shutdown:
  • docker exec -it Nutify ssh-copy-id <user>@<host>
⁠Testing shutdown.

Note: Running this command WILL SHUT DOWN THE HOSTS YOU SPECIFIED in the nutify-shutdown.sh script if you configured everything correct, so just be aware of that as you run this command!

docker exec -it Nutify /usr/local/sbin/upsmon -c fsd

Additional Note: your UPS may need additional setup to ensure it sends the proper command to Nutify to actually execute this properly. If the above command works you should do any further tweaking to your actual UPS if its still behaving wrong when you cut the power.

Other Useful Links you may Reference: https://www.virtono.com/community/tutorial-how-to/restrict-executable-ssh-commands-with-authorized-keys/⁠ https://forum.proxmox.com/threads/shutdown-the-server-via-api.98125/⁠ https://dan.langille.org/2020/09/10/nut-testing-the-shutdown-mechanism/⁠


Setup Wizard - Mode Selection Setup Wizard - Complete

Setup Wizard - Mode Selection Setup Wizard - Complete

🆕 LATEST DOCKER IMAGES
Use these tags to always get the latest version:
• AMD64/x86_64: dartsteven/nutify:amd64-latest
• ARM64/aarch64: dartsteven/nutify:arm64-latest

📊 Is Nutify working with your UPS?
Please share your experience in the Discussions⁠ section under "Nutify UPS Compatibility List". Your feedback helps the community!

⁠Latest Version

Current Version: 0.1.7 (07/07/2025)

For a detailed list of changes and improvements, please see the changelog.txt⁠ file.

⚠️ IMPORTANT: Latest Updates in v0.1.7 ⚠️

Version 0.1.7 introduces significant improvements including:

  • User Authentication System: Multi-user login with configurable permissions for individual pages and options
  • Enhanced Security: Comprehensive permission system for all configuration areas
  • Improved Setup Wizard: Fixed UI issues and enhanced user experience
  • System Stability: Upgraded to NUT 2.8.3 and improved core architecture
  • Better Reporting: Fixed time/battery reports with enhanced pandas integration

👉 For detailed information on new features and migration, please see the Nutify Wiki⁠.

⁠Key Features

  • Real-time UPS Monitoring: Continuously collects and displays data from your UPS devices
  • User Authentication System: Multi-user login with granular permission control for individual pages and configuration areas
  • Detailed Reports: Generates comprehensive reports on UPS performance with enhanced pandas integration
  • Interactive Charts: Visualizes UPS data using interactive charts
  • Setup Wizard: Enhanced configuration wizard with improved UI and navigation
  • Customizable Dashboards: Provides a web-based dashboard to view real-time data
  • Data Persistence: Stores historical UPS data in a SQLite database with improved schema
  • Dockerized Deployment: Easily deployable using Docker and Docker Compose
  • Flexible Deployment Modes: Run as a complete NUT server or as a lightweight client connecting to a remote NUT server
  • Robust Mode Detection: Multi-layered CLIENT/SERVER mode detection with automatic fallback mechanisms
  • Enhanced Notification System: Database-driven notifications with multiple channels (Email, Ntfy, Webhooks)
  • Discord Integration: Send notifications directly to Discord channels
  • System Monitoring: Real-time RAM and CPU usage widgets in the dashboard header
  • Multi-account Email Support: Configure multiple email accounts for notifications with simplified provider setup
  • Energy Monitoring: Detailed analysis of energy consumption
  • Battery Management: Monitoring of battery status and performance
  • Event Management: Logging and notification of UPS events
  • UPS Commands: Interface to send commands to the UPS with permission control
  • Dark/Light Theme: Customizable interface with both dark and light themes
  • Automated Reports: Scheduled reports with detailed UPS status and improved accuracy
  • Push Notifications: Integration with Ntfy for instant mobile alerts
  • Webhook Integration: Flexible HTTP callbacks for third-party system integration
  • Advanced Configuration: Fine-grained control over NUT settings and polling with user-based access
  • Connection Recovery: Automatic reconnection and recovery from UPS communication failures
  • Optimized Event Handling: Native Python integration with upsmon.conf for improved stability and responsiveness
  • WebSocket-based Real-time Data: Efficient caching system significantly reducing CPU and RAM usage
  • Modular Architecture: Extensible design with clean separation of concerns
  • Professional Branding: Official logo and favicon for consistent identity across platforms
  • Expanded UPS Support: Added drivers for a wider range of UPS models
  • Enhanced Security: User authentication and permission system protecting configuration areas

⁠Quick Start

To run Nutify using Docker Compose:

  1. Create a docker-compose.yaml file with the following minimal configuration:
services:
  nutify:
    cap_add:
      - SYS_ADMIN
      - SYS_RAWIO
      - MKNOD
    container_name: Nutify
    device_cgroup_rules:
      - 'c 189:* rwm'
    devices:
      - /dev/bus/usb:/dev/bus/usb:rwm
    env_file: nutify-secret.env
    environment:
      # - SECRET_KEY=$SECRET_KEY # for password encryption and decryption in the database
      - UDEV=1   
    image: cr.pcfae.com/prplanit/nutify-ssh:latest  # Use amd64-latest or armv7-latest based on your architecture
    ports:
      - 3493:3493
      - 5050:5050
      - 443:443
    privileged: true
    restart: always
    user: root
    volumes:
      - /opt/docker/Nutify/logs:/app/nutify/logs
      - /opt/docker/Nutify/instance:/app/nutify/instance
      - /opt/docker/Nutify/ssl:/app/ssl
      - /opt/docker/Nutify/etc/nut:/etc/nut
      - /opt/docker/Nutify/.ssh:/root/.ssh
      - /opt/docker/Nutify/script:/root/script
      - /dev:/dev:rw              # Full /dev access improves hotplug handling
      - /run/udev:/run/udev:ro    # Access to udev events                 # Improve USB detection
  1. Start Nutify:

    docker-compose up -d
    
  2. Access the Setup Wizard: Open your web browser and navigate to http://localhost:5050

  3. Follow the Setup Wizard for initial configuration:

    • Select your Timezone.
    • Choose the Operating Mode:
      • SERVER (Standalone): If the UPS is directly connected to this machine.
      • CLIENT (Netclient): If connecting to a remote NUT server.
    • Enter a Name for your UPS (e.g., myups).
    • Configure the connection details (driver, port, etc.). The wizard can attempt Automatic Detection or allow Manual Configuration.
    • Review your settings.
    • Save & Restart to apply the configuration.

⁠Web-Based Configuration

Nutify 0.1.6 introduces a new setup wizard that simplifies the entire configuration process. Instead of manually editing the docker-compose.yaml file, you can now:

  1. Start with minimal configuration: Only a few environment variables are needed in docker-compose.yaml
  2. Access the web interface: Navigate to the web UI after starting the container
  3. Follow the setup wizard: Step-by-step configuration for your UPS setup
  4. Configure all settings via the UI: No need to restart containers when changing settings

The setup wizard allows you to configure:

  • UPS connection type (Standalone/Netwrok Server - Network Client)
  • Manual Configuration or Auto-detect with nut-scanner
  • Driver selection from the extensive list of supported drivers
  • Connection parameters (hostname, port, etc.)

Here are some examples of the Setup Wizard screens:

Setup Wizard - Mode Selection Setup Wizard - Complete

⁠Supported Architectures

Nutify is available for multiple hardware platforms:

ArchitectureDocker Image TagDevices
🖥️ AMD64/x86_64dartsteven/nutify:amd64-latestStandard PCs, servers, most cloud VMs
🍓 ARM64/aarch64dartsteven/nutify:arm64-latestRaspberry Pi 4, Pi 400, Compute Module 4, Apple M1/M2 Macs

You can also use specific version tags (e.g., dartsteven/nutify:amd64-0.1.6) if you need a particular version.

⁠Tested UPS Models

Nutify aims for broad compatibility with UPS devices supported by Network UPS Tools (NUT).

Is your UPS model working with Nutify but not listed here? Please help us expand this list by sharing your experience in the

UPS Compatibility List discussion⁠

Knowing which models work helps the entire community.

While Nutify should work with most NUT-compatible devices, the models listed above have specific confirmation from users.

⁠Documentation Nutify Wiki⁠

For detailed documentation, including:

  • Complete configuration options
  • Advanced features
  • Troubleshooting
  • Screenshots and examples
  • Technical details
  • ... And More ...

⁠License

This project is licensed under the MIT License - see the LICENSE file for details.

⁠Screenshots

Dark Theme Light Theme Setup Wizard - Complete

⁠Support the Project

Nutify is developed and maintained in my free time. If you find this project useful and would like to support its continued development, please consider making a donation.

Your support helps cover development costs and encourages further improvements and new features. Thank you for your generosity!

Donate Bitcoin ⁠    ⁠

⁠Stargazers over time

Stargazers over time

Tag summary

Content type

Image

Digest

sha256:915485704…

Size

9.2 MB

Last updated

about 1 year ago

docker pull prplanit/nutify-ssh