{"id":14426370,"url":"https://github.com/Brandawg93/PeaNUT","last_synced_at":"2025-08-25T16:31:41.375Z","repository":{"id":191754093,"uuid":"685324411","full_name":"Brandawg93/PeaNUT","owner":"Brandawg93","description":"A tiny dashboard for Network UPS Tools","archived":false,"fork":false,"pushed_at":"2024-12-21T12:41:07.000Z","size":2559,"stargazers_count":492,"open_issues_count":6,"forks_count":12,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-21T13:36:50.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Brandawg93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"brandawg93","custom":["https://paypal.me/brandawg93"]}},"created_at":"2023-08-31T01:36:37.000Z","updated_at":"2024-12-20T22:16:43.000Z","dependencies_parsed_at":"2023-09-29T03:22:04.708Z","dependency_job_id":"ae807e55-5c20-49da-9188-fcd32fa613fd","html_url":"https://github.com/Brandawg93/PeaNUT","commit_stats":null,"previous_names":["brandawg93/peanut"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brandawg93%2FPeaNUT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brandawg93%2FPeaNUT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brandawg93%2FPeaNUT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brandawg93%2FPeaNUT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brandawg93","download_url":"https://codeload.github.com/Brandawg93/PeaNUT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230923310,"owners_count":18300984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-30T07:00:55.074Z","updated_at":"2025-08-25T16:31:41.365Z","avatar_url":"https://github.com/Brandawg93.png","language":"TypeScript","funding_links":["https://github.com/sponsors/brandawg93","https://paypal.me/brandawg93","https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=CEYYGVB7ZZ764\u0026item_name=peanut\u0026currency_code=USD\u0026source=url","https://github.com/sponsors/Brandawg93"],"categories":["TypeScript","Table of Contents"],"sub_categories":["Other"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"PeaNUT\" src=\"https://raw.githubusercontent.com/Brandawg93/PeaNUT/main/src/app/icon.svg\" width=\"200px\"\u003e\n\u003c/p\u003e\n\n# PeaNUT\n\nA Tiny Dashboard for Network UPS Tools\n\n[![PayPal](https://img.shields.io/badge/paypal-donate-blue?logo=paypal)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=CEYYGVB7ZZ764\u0026item_name=peanut\u0026currency_code=USD\u0026source=url)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/brandawg93)](https://github.com/Brandawg93)\n![Docker Pulls](https://img.shields.io/docker/pulls/brandawg93/peanut)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Brandawg93_PeaNUT\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Brandawg93_PeaNUT)\n\n\u003cimg src=\"https://raw.githubusercontent.com/Brandawg93/PeaNUT/main/images/table.png\" width=\"600px\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/Brandawg93/PeaNUT/main/images/charts.png\" width=\"600px\" /\u003e\n\n## Features\n\n- Monitor UPS devices connected to your network via [NUT](https://networkupstools.org)\n- View real-time statistics and status of UPS devices\n- Customizable dashboard layout\n- Supports multiple UPS devices\n- Execute commands on UPS devices\n- Configure settings through a user-friendly UI\n- Manual configuration via YAML file\n- Access NUT server directly via terminal\n- API access for integration with other tools\n- [InfluxDB](https://www.influxdata.com) v2 integration for monitoring via [Grafana](https://grafana.com)\n- [Prometheus](https://prometheus.io) support for monitoring and alerting\n- Customizable widgets for [Homepage](https://gethomepage.dev) integration\n- Detailed [documentation](https://github.com/Brandawg93/PeaNUT/wiki) and examples available\n\n## Installation\n\nInstall using Docker\n\n### docker run\n\n```bash\ndocker run -v ${PWD}/config:/config -p 8080:8080 --restart unless-stopped \\\n--env WEB_PORT=8080 brandawg93/peanut\n```\n\n### docker-compose.yml\n\n```yaml\nservices:\n  peanut:\n    image: brandawg93/peanut:latest\n    container_name: PeaNUT\n    restart: unless-stopped\n    volumes:\n      - /path/to/config:/config\n    ports:\n      - 8080:8080\n    environment:\n      - WEB_PORT=8080\n```\n\n### compile from source\n\n```bash\ngit clone https://github.com/Brandawg93/PeaNUT.git\ncd PeaNUT\nnpm i -g pnpm # only if you don't have pnpm installed\npnpm i\npnpm run build:local\npnpm run start:local\n```\n\nMore examples can be found in the [examples](https://github.com/Brandawg93/PeaNUT/tree/main/examples) folder.\n\n## Environment Variables\n\n| Variable            | Default   | Description                                       |\n| ------------------- | --------- | ------------------------------------------------- |\n| WEB_HOST            | localhost | Hostname of web server                            |\n| WEB_PORT            | 8080      | Port of web server                                |\n| WEB_USERNAME        | undefined | Username of web app                               |\n| WEB_PASSWORD        | undefined | Password of web app                               |\n| BASE_PATH           | undefined | Base path for reverse proxy                       |\n| DISABLE_CONFIG_FILE | undefined | If set to 'true', disables all config file saving |\n\n## Reverse Proxies\n\nFor detailed reverse proxy configuration instructions, see the [Reverse Proxy Setup Wiki](https://github.com/Brandawg93/PeaNUT/wiki/Reverse-Proxy-Setup-for-PeaNUT).\n\n**Note**: If you encounter issues with missing favicon or font loading errors, please check the troubleshooting section in the wiki for additional `sub_filter` rules.\n\n## Configuration\n\nConfiguration is primarily done via the UI, but manual configuration can be done via the `/config/settings.yml` file within the container. More information can be found on the [wiki](https://github.com/Brandawg93/PeaNUT/wiki/YAML-Configuration).\n\n## Authentication\n\nAuthentication can be enabled by setting both `WEB_USERNAME` and `WEB_PASSWORD` environment variables. When these are set:\n\n- Web UI access will require login using these credentials\n- API calls will require Basic Authentication\n\nFor API calls, you'll need to include an Authorization header with the Base64 encoded credentials in the format `username:password`. The header should be formatted as: `Authorization: Basic \u003cencoded credentials\u003e`\n\n## API\n\n| API Call                                                  | Description                                                               |\n| --------------------------------------------------------- | ------------------------------------------------------------------------- |\n| `GET /api/ping`                                           | Health check endpoint that returns \"pong\"                                 |\n| `GET /api/v1/info`                                        | Retrieves information about the PeaNUT application                        |\n| `GET /api/v1/version`                                     | Retrieves the version of the NUT server currently in use                  |\n| `GET /api/v1/netversion`                                  | Retrieves the version of the network protocol currently in use            |\n| `GET /api/v1/devices`                                     | Retrieves information about all UPS devices                               |\n| `GET /api/v1/devices/[ups]`                               | Retrieves information about the specified UPS device                      |\n| `GET /api/v1/devices/[ups]/vars`                          | Retrieves all variables for the specified UPS device                      |\n| `GET /api/v1/devices/[ups]/var/[param]`                   | Retrieves value for a single parameter of the specified UPS device        |\n| `POST /api/v1/devices/[ups]/var/[param]`                  | Saves value for a single parameter of the specified UPS device            |\n| `GET /api/v1/devices/[ups]/var/[param]/description`       | Retrieves description for a single parameter of the specified UPS device  |\n| `GET /api/v1/devices/[ups]/var/[param]/type`              | Retrieves type for a single parameter of the specified UPS device         |\n| `GET /api/v1/devices/[ups]/var/[param]/enum`              | Retrieves enum values for a single parameter of the specified UPS device  |\n| `GET /api/v1/devices/[ups]/var/[param]/range`             | Retrieves range values for a single parameter of the specified UPS device |\n| `GET /api/v1/devices/[ups]/commands`                      | Retrieves available commands for the specified UPS device                 |\n| `POST /api/v1/devices/[ups]/command/[command]`            | Executes a given command for the specified UPS device                     |\n| `GET /api/v1/devices/[ups]/command/[command]/description` | Retrieves description for a single command of the specified UPS device    |\n| `GET /api/v1/devices/[ups]/description`                   | Retrieves the description for the specified UPS device                    |\n| `GET /api/v1/devices/[ups]/clients`                       | Retrieves the connected clients for the specified UPS device              |\n| `GET /api/v1/devices/[ups]/rwvars`                        | Retrieves writable variables for the specified UPS device                 |\n| `GET /api/v1/metrics`                                     | Metrics endpoint for prometheus                                           |\n| `GET /api/ws`                                             | WebSocket endpoint for direct NUT server communication                    |\n\n## Homepage Support\n\nFor information about how to set up Homepage, check the [Homepage docs](https://gethomepage.dev/widgets/services/peanut/).\n\nEx:\n\n```yaml\nwidget:\n  type: peanut\n  url: http://peanut.host.or.ip:port\n  key: nameofyourups\n```\n\nOr use the `customapi` widget for complete customization!\n\nEx:\n\n```yaml\nwidget:\n  type: customapi\n  url: http://{HOSTNAME}:{PORT}/api/v1/devices/ups\n  mappings:\n    - field: battery.charge\n      label: Battery Charge\n      format: percent\n    - field: battery.runtime\n      label: Battery Runtime\n      format: duration\n    - field: ups.load\n      label: UPS Load\n      format: percent\n    - field: ups.status\n      label: UPS Status\n      format: text\n      remap:\n        - value: OL\n          to: Online\n        - value: OB\n          to: On Battery\n        - value: LB\n          to: Low Battery\n        - any: true\n          to: Unknown\n```\n\n## FAQ\n\n**Question:** Chokidar is using lots of resources on my machine.\n\n**Answer:** If you are using a Networked File Share, please see [#142](https://github.com/Brandawg93/PeaNUT/issues/142).\n\n**Question:** Why can't I see multiple NUT devices on the display?\n\n**Answer:** In order for PeaNUT to display multiple NUT devices, each UPS must have a unique identifier in the corresponding NUT configuration file. Make sure each UPS device has a distinct name/identifier in your NUT configuration to avoid conflicts and ensure proper display of all devices.\n\n## Tested Devices\n\n[A wiki](https://github.com/Brandawg93/PeaNUT/wiki/Tested-UPS-Devices) has been compiled of tested UPS devices. Feel free to look there for your device or add your device to the list by submitting an issue with the `tested device` label.\n\n## Donate to Support PeaNUT\n\nThis project was made with you in mind. If you would like to show your appreciation for its continued development, please consider [sponsoring me on Github](https://github.com/sponsors/Brandawg93).\n\n\u003cdetails\u003e\n  \u003csummary\u003eStar History\u003c/summary\u003e\n\n[![Star History Chart](https://api.star-history.com/svg?repos=brandawg93/peanut\u0026type=Date)](https://star-history.com/#brandawg93/peanut\u0026Date)\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBrandawg93%2FPeaNUT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBrandawg93%2FPeaNUT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBrandawg93%2FPeaNUT/lists"}