PeaNUT is a modern and elegant web interface that lets us visually monitor UPSs managed by Network UPS Tools (NUT). With PeaNUT, we can check the status of our UPS devices intuitively from any browser.

In this post, I’ll show you how to install and configure PeaNUT using Docker and Docker Compose.

⚠️ DISCLAIMER: Please note that this article is a manual translation of the Spanish version. The screenshots may have been originally taken in Spanish, and some words/names may not match completely. If you find any errors, please report them to the author. ⚠️

Requirements

Things to keep in mind

  1. PeaNUT connects to the NUT server through port 3493 by default. Make sure your NUT server is configured in netserver mode and accepts network connections. Modify the port if needed.

  2. PeaNUT’s web interface is read-only. It doesn’t allow modifying UPS configurations, only viewing its status.

  3. This post covers installation with Docker in rootless mode. If you use Docker in root mode, you’ll need to adjust the Docker socket paths.

What is PeaNUT?

PeaNUT is a lightweight and modern web interface for Network UPS Tools. It’s designed to be simple, fast, and easy to use, providing a clear view of your UPS status without complications.

Main features:

  • Modern and responsive web interface
  • Real-time UPS status visualization
  • Detailed information about load, battery, and voltages
  • Simple configuration through environment variables
  • Compatible with multiple UPS devices
  • Lightweight and efficient

Installing PeaNUT with Docker

Create directory structure

We start by creating the directory where we’ll host PeaNUT’s configuration files:

mkdir -p ~/Rootless-Docker-Files/peanut/config

If you use a different structure for your Docker projects, adjust the path according to your needs.

Create docker-compose.yml

We create the docker-compose.yml file for PeaNUT:

nano -cl ~/Rootless-Docker-Files/peanut/docker-compose.yml

Add the following content:

services:
  peanut:
    image: brandawg93/peanut:latest
    container_name: PeaNUT
    restart: unless-stopped
    volumes:
      - ./config:/config
    ports:
      - 3494:8080
    environment:
      - WEB_PORT=8080

Configuration explanation:

  • image: brandawg93/peanut:latest: Official PeaNUT image.
  • container_name: PeaNUT: Container name.
  • restart: unless-stopped: The container will restart automatically except if manually stopped.
  • volumes: Mount a volume for persistent configuration. In this case, we’ll use the config directory we created earlier.
  • ports: Map container port 8080 to host port 3494.
  • environment: Environment variables, in this case the port where the container will serve the web internally.

Start the container

Start the scenario we defined in docker-compose.yml:

docker compose -f ~/Rootless-Docker-Files/peanut/docker-compose.yml up -d

Verify that the container is running:

docker compose -f ~/Rootless-Docker-Files/peanut/docker-compose.yml ps

PeaNUT Running - Container running

First access to the web interface

At this point, PeaNUT should already be accessible at http://localhost:3494 or http://<SERVER_IP>:3494:

Initial PeaNUT configuration

When accessing PeaNUT for the first time, you’ll need to configure the connection to your NUT server.

You do this from the settings menu, which you can access by clicking the gear icon in the top right corner.

In the Manage servers section, enter the connection details for your NUT server:

  1. Name: A descriptive name for the server. It can be anything.
  2. Server: NUT server address (without including the port).
  3. Port: NUT server port (default 3493).
  4. Username: If you followed the guide I published about NUT, enter observer here.
  5. Password: The password you configured for the observer user (or whichever one you’re using).

PeaNUT Web Interface - NUT server configuration

With these fields filled in, apply the changes and PeaNUT will start displaying UPS information in real-time:

PeaNUT Web Interface - Main dashboard

Alternatives to PeaNUT

If PeaNUT doesn’t fit your needs or you want to explore other options, check out the NUT Web GUI project.

Conclusion

PeaNUT is an excellent option for visually and easily monitoring your UPSs managed by NUT. Its installation via Docker is quick and easy, and its interface makes it much easier to supervise our UPSs.

Don’t forget to check out the previous post, where I explain how to configure NUT and implement Telegram notifications to always stay informed about your UPS status:

Security

Some security recommendations:

  • Keep PeaNUT accessible only from your local network (don’t expose it directly to the Internet).
  • If you need remote access, use a VPN to connect to your local network.
  • Keep Docker and images updated, paying attention to changes in new versions.

References