Skip to content

Instantly share code, notes, and snippets.

@natcl
Last active January 23, 2024 22:50
Show Gist options
  • Save natcl/4688162920f368707613 to your computer and use it in GitHub Desktop.
Save natcl/4688162920f368707613 to your computer and use it in GitHub Desktop.
Node-Red launchd script
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.nodered.plist</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/usr/local/bin/node-red</string>
<string>-v</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/YOURUSER/.node-red/node-red.log</string>
<key>WorkingDirectory</key>
<string>/Users/YOURUSER/.node-red</string>
</dict>
</plist>
@SchneHa
Copy link

SchneHa commented Feb 1, 2021

Here is the correct .plist script with palette working:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.nodered.plist</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/node</string>
        <string>/usr/local/bin/node-red</string>
        <string>-v</string>
    </array>
    <key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key>
        <string>$PATH:/usr/local/bin</string>
    </dict>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/Users/YOURUSER/.node-red/node-red.log</string>
    <key>WorkingDirectory</key>
    <string>/Users/YOURUSER/.node-red</string>
</dict>
</plist>

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