Team: Huntress EDR
Product: NinjaOne RMM (Script), Huntress Agent for macOS
Environment: macOS
Summary: Deploying the Huntress Agent script via NinjaOne RMM to macOS endpoints.
NinjaOne RMM allows you to create Scheduled Scripts to deploy third-party software. This document provides instructions for adding a Scheduled Script to your Policies to deploy the Huntress Agent for macOS to your end users' computers.
This only installs the Huntress Agent. It does not install the system extension or the network content filter, which are also needed for full EDR functionality, such as endpoint isolation. Review the complete macOS installation instructions to make the right choice for your environment.
The Organization Name and Organization key will match the site name from NinjaOne RMM (the names shown in Dashboard > Organizations).
We are not able to offer comprehensive support for NinjaOne RMM. Refer to the NinjaOne RMM documentation for full details regarding the usage of NinjaOne RMM policies and scheduled scripts.
In this Article
Retrieve Your Huntress Account Key
Configure the Huntress Deployment Script
Add a Scheduled Script to Your Policy
Troubleshooting
Retrieve Your Huntress Keys
- Log in to Huntress and go to the Agent Setup page.
- Get your Account and Organization keys. If you use Agent tags, have those ready as well.
Configure the Huntress Deployment Script
- Download our ShellScript Deployment Script. Make sure the file extension is
.sh
- In your NinjaOne RMM dashboard, go to Configuration > Scripting.
- Open the Import New Script window.
- Import the file that you saved in Step 3:
- The scripting UI will appear with the imported shell script, add your Huntress keys.
- Scroll down to around line 52 and paste your Huntress account secret key over the
__ACCOUNT KEY__
text in the script. - NinjaOne introduced a new variable called
$NINJA_ORGANIZATION_NAME
, eliminating the need to manually set or pass the Organization name via parameter. The Huntress deployment script has been updated to take advantage of this new feature. Be sure to leave the OrgKey name in quotes as shown in the second screenshot:
Before:
After:
It is important that your script matches.
- Scroll down to around line 52 and paste your Huntress account secret key over the
- Complete the form with these values:
- Name, Description, and Category = Use what works best for your environment
- Scripting language = ShellScript
- Operating system = Mac
- Architecture = All
- Save your changes
Add a Scheduled Script to Your Policy
This section is provided as a general guideline. You may wish to add the Huntress script to one or more custom policies in your deployment.
We are not able to offer comprehensive support for NinjaOne RMM. Refer to the NinjaOne RMM documentation for full details regarding the usage of NinjaOne RMM policies and scheduled scripts.
- Log in to NinjaOne RMM.
- Go to Configuration > Policies, then select the policy name that you want to use to install the Huntress Agent or create a new policy. In this example, we're using the "Mac" policy.
- From the Scheduled Scripts menu, select Add a Scheduled Script.
- In the Scheduled Script window, choose an appropriate name and description for the script. Set the Schedule and Notification preferences to your preferred settings. Click Add Script.
- Navigate to the category you set for your script in Step 6 of the script configuration and select the script name to import it into the schedule.
- In the Parameter window, confirm that Run As is set to System, and Apply your changes.
- Finish the process by clicking Add to get the script into the schedule.
- Save your changes. You are now ready to deploy the Huntress Agent via NinjaOne RMM!
Troubleshooting
If you don't see the endpoints you expected, we've also provided several ways to check from the Huntress platform.
You can also do some verification from NinjaOne.
From your NinjaOne dashboard click on Activities, then click on All.
Find the Completed action and click on More.
The resulting pop up should describe what the issue is. In the example below, the organization key was not set in the script parameters (step 5 from Configure the Huntress Deployment Script).
Another common issue is incorrect/missing Account Key (also in script parameters).
Below is an example of an error caused by an improperly imported script. If you copied and pasted the script from GitHub in Step 1 of Configure the Huntress Deployment Script, your computer might have added extraneous characters. Delete the script from NinjaOne, and follow the steps in that section exactly as shown in order to prevent this. This is typically accidentally added by opening the script inside of a Windows-based program, which you can avoid by not editing on a Windows machine or saving it with Unix line endings.
The example below indicates that there were Huntress assets previously on this machine. This is typically not a problem, but if you see the message "The Upgrade was successful," and the installation is not working, you may need to remove all Huntress assets before attempting a reinstall.
You'll find Huntress assets in:
/Library/Application Support/Huntress/HuntressAgent
/Applications/Huntress.app/Contents/
You may need to verify there are no package remnants remaining with:
pkgutil --pkgs | grep huntress
If you see a successfully installed message like the example below, and you still don't see the endpoint in the Huntress platform, make sure you're searching from your Account-level dashboard, not your Org-level dashboard.
If you're still stuck; email your Huntress log files from the affected machine's /tmp/
and /Library/Application Support/Huntress/HuntressAgent/
directories to support@huntress.io