@jensa falls noch von Interesse. Ich habe das Problem auf MacOs über einen LaunchDaemon gelöst
/Library/LaunchDaemons/org.iobroker.plist
statt den bei der iobroker bereitgestellten LaunchAgent in ~/Library/LaunchAgent
Folgende Schritte funktionieren bei mir auf einem MacBook Pro 2015
sw_vers
ProductName: macOS
ProductVersion: 12.7.5
BuildVersion: 21H1222
Bitte unbedingt in der .plist-Datei die eigenen PATH Einstellungen für node etc setzen. Bei mir ist es node@18 und postgresql@13
MacOs iobroker as LaunchDeamon
create a macOS User
sudo dscl . -create /Users/iobroker
sudo dscl . -create /Users/iobroker UserShell /bin/bash
sudo dscl . -create /Users/iobroker RealName "ioBroker Service User"
sudo dscl . -create /Users/iobroker UniqueID "510"
sudo dscl . -create /Users/iobroker PrimaryGroupID 20
sudo dscl . -create /Users/iobroker NFSHomeDirectory /usr/local/iobroker
sudo dscl . -passwd /Users/iobroker <password> # can be empty
permission for the installation
sudo chown -R iobroker:staff /usr/local/iobroker
create a system-wide launch daemon
/Library/LaunchDaemons/org.iobroker.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.iobroker</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/iobroker/.nvm/versions/node/v18.20.5/bin/node</string>
<string>/usr/local/iobroker/node_modules/iobroker.js-controller/iobroker.js</string>
<string>restart</string>
</array>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin::/usr/local/opt/postgresql@13/bin:/usr/local/iobroker/.nvm/versions/node/v18.20.5/bin</string>
</dict>
</dict>
</plist>
permissions for the launch daemon
sudo chown root:wheel /Library/LaunchDaemons/org.iobroker.plist
sudo chmod 644 /Library/LaunchDaemons/org.iobroker.plist
reload
sudo launchctl unload /Library/LaunchDaemons/org.iobroker.plist
sudo launchctl load /Library/LaunchDaemons/org.iobroker.plist