/powerpanel-business-docker

Docker image for CyberPower PowerPanel Business

Primary LanguageDockerfileMIT LicenseMIT

This is a Docker image for CyberPower PowerPanel Business served over HTTP or HTTPS. This can be put behind a reverse proxy such as CloudFlare or Traefik, or run standalone.

Usage

Quickstart

If you want to jump right in, take a look at the provided docker-compose.yml.

The default username and password is admin and admin.

USB Devices

If you're using the local version, the Docker image will need to be able to access USB device of the UPS. There's two ways to accomplish this. First, you can give the container access to the specific USB device. Find the USB ID with lsusb:

nathan@zeus:[~]$ lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0bda:2832 Realtek Semiconductor Corp. RTL2832U DVB-T
Bus 003 Device 006: ID 0764:0601 Cyber Power System, Inc. PR1500LCDRT2U UPS
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
nathan@zeus:[~]$

Then pass in the specific USB device:

devices:
  - /dev/bus/usb/003/006:/dev/bus/usb/003/006

However, the ID of the USB device is liable to change given a host reboot. Thus, if security isn't as important, you can run the container in privileged mode:

privileged: true

This will automatically detect the correct USB device with no configuration.

Volumes

The image mounts:

  • /usr/local/ppbe/db_local/

Example docker-compose:

volumes:
  - app_data:/usr/local/ppbe/db_local/
---
volumes:
  app_data:
    driver: local

Network

The image exposes port 3052 (HTTP), 53568 (HTTPS), and 162 (SNMP).

Example docker-compose:

ports:
  - 80:3052
  - 443:53568

Tags

There are two versions available: local and remote. See the User Manual for the difference between them.

Specific Versions

Example:

image: ghcr.io/nathanvaughn/powerpanel-business:local-470

Latest

Example:

image: ghcr.io/nathanvaughn/powerpanel-business:remote-latest

Registry

This image is available from 3 different registries. Choose whichever you want:

Known Issues

  • Versions 450+ appear to try to redirect to the HTTP port no matter what and don't work behind a reverse proxy (that I've figured out)
  • Version 480 always returns a 404 (no known fix)
  • This application does use Log4J, but I have personally not found any vulnerabilities for unauthenicated users (take this with a grain of salt)