root on macOS or Linux, or as SYSTEM on Windows. Use the multi-file MDM scripts and ship the shared lib with the install or uninstall script for your platform.
Cloud sync is optional. For the plan, the API key and the Tenant ID, see Cloud sync.
Install
1
Create a Command
In the JumpCloud Admin Console, create a Command and set Run As to
root for macOS or Linux. Windows Commands run as SYSTEM.2
Attach the scripts
- macOS
- Linux
- Windows
Upload
lib_macos.sh and pmg_setup_install_macos.sh from scripts/mdm/macos/. Set File Destination to /tmp/pmg-mdm/.Optionally upload a config.yml to the same directory for managed config. Set cloud.enabled: true in it for Cloud sync.3
Set the timeout
Set Timeout After to at least 900 seconds so a slow download is not killed mid-run.
4
Add Cloud variables
Define the Command Variables
safedep_api_key and safedep_tenant_id. Mark the API key as a Secret variable. For local-only blocking, omit both variables and their assignments from the Command body.5
Set the Command body
- macOS
- Linux
- Windows
6
Assign and run
Assign the Command to a device group and run it.
Uninstall
1
Create a second Command
Use
root on macOS or Linux, or SYSTEM on Windows.- macOS
- Linux
- Windows
Upload
lib_macos.sh and pmg_uninstall_macos.sh from scripts/mdm/macos/, with File Destination /tmp/pmg-mdm/.2
Set the Command body
- macOS
- Linux
- Windows
3
Assign and run
Assign the Command to the same device group and run it. Do not run the install and uninstall Commands on the same devices at the same time.
Run cloud sync only
Create another Command to repeat cloud sync without installing or configuring PMG again. Set it up the same way as the install Command, with the same shared library and script androot on macOS or Linux, or SYSTEM on Windows. Use this Command body:
- macOS
- Linux
- Windows
Manage settings from the cloud policy
To let SafeDep Cloud set the package rules and the dependency cooldown, ship a managedconfig.yml with cloud.policy: true. See Manage settings from the cloud policy.
Other MDMs
Set up PMG with Jamf or Intune, and see the script layout.
MDM scripts README
Read the current MDM scripts in the PMG repo.

