Skip to content

Instantly share code, notes, and snippets.

@hcgatewood
Created July 27, 2024 02:49
Show Gist options
  • Save hcgatewood/d99c6e7bf62eaa7d0ed3707ab7bfd29d to your computer and use it in GitHub Desktop.
Save hcgatewood/d99c6e7bf62eaa7d0ed3707ab7bfd29d to your computer and use it in GitHub Desktop.
Configure NUT on macOS

Configure NUT on macOS

Quick overview of installing Network UPS Tools on macOS.

macOS notes

  • Config files are located in their normal Linux-style locations, with the brew --prefix prepended. So e.g., on Apple silicon, nut.conf is located at /opt/homebrew/etc/nut/nut.conf.
  • NUT's Homebrew service should be run as root, to support default shutdown command.
  • While desktop macOS supports "wake after power loss", it doesn't seem to support "wake on power". It treats the graceful shutdown as a normal shutdown, which doesn't result in startup after power restore. Can either accept manual power-on required, or remove graceful shutdown.

Howto

Install

brew install nut

Configure

Configure relevant files, e.g. nut.conf and upsmon.conf for a follower host.

Enable

sudo brew services start nut

Test

Simulate power outage. upsmon should initiate shutdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment