> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Other MDM Deployment

> Deploy automatic configuration provisioning to macOS devices using any MDM solution

Deploy automatic configuration provisioning using any MDM that supports script execution.

> [!NOTE]
>
> If your MDM has a dedicated guide (SimpleMDM, Jamf Pro, Intune, Mosyle, or Iru/Kandji), use that instead for provider-specific instructions.

## Prerequisites

* Admin access to your MDM solution
* Enrollment key from Runlayer
* Your MDM must support running shell scripts on managed devices
* The signed [Runlayer CLI macOS package](https://docs.runlayer.com/deploy-cli/macos.md) deployed to target devices

> [accordion] Creating an Enrollment Key
>
> Enrollment keys allow devices to automatically register with Runlayer and obtain API credentials.
>
> ![Enrollment Keys List](https://mintcdn.com/anysource/6y8VzDSWjckfUDpB/images/enrollment-keys-list.png?fit=max\&auto=format\&n=6y8VzDSWjckfUDpB\&q=85\&s=e6e9bf9618213fc75b9e4db86c44f28b)
>
> **1. Navigate to Enrollment Keys**
>
> Go to **Settings** in the Runlayer dashboard and select the **Enrollment Keys** tab
>
> **2. Create a New Key**
>
> Click **+ Create Enrollment Key**
>
> ![Create Enrollment Key](https://mintcdn.com/anysource/6y8VzDSWjckfUDpB/images/enrollment-key-create.png?fit=max\&auto=format\&n=6y8VzDSWjckfUDpB\&q=85\&s=18f53ec6ae775870c77a40f3a2b21cc3)
>
> **3. Configure the Key**
>
> * **Name** (required): Enter a descriptive name (e.g., "Production MDM")
> * **Description** (optional): Add context about the key's purpose
>
> **4. Copy the Key**
>
> Copy the generated key (starts with `rl_enroll_`) and store it securely
>
> ![Enrollment Key Created](https://mintcdn.com/anysource/6y8VzDSWjckfUDpB/images/enrollment-key-created.png?fit=max\&auto=format\&n=6y8VzDSWjckfUDpB\&q=85\&s=3bb1fd346da4bd7717d1dbef8be9a56d)
>
> > [!WARNING]
> >
> > Enrollment keys are shown only once. Store them securely and treat them like passwords.

## Deployment Steps

**1. Generate the Script**

Fill in your settings below to generate a deployment script.

**Configuration tips:**

* `ENROLLMENT_USERNAME`: Use your MDM's variable for the user's email or identity (e.g., `$EMAIL`, `%Email%`). Leave empty to use the device username.
* `ENROLLMENT_DEVICE_NAME`: Use your MDM's variable for the device name or serial number (e.g., `$DEVICE_NAME`, `%DeviceName%`). Leave empty to use the computer name.

#### Config Sync Script Configuration

Fill in your settings to generate a customized configuration sync script

Runlayer Host URL \*

Your Runlayer instance URL

Enrollment API Key \*

Created in Settings → Enrollment Keys

Enrollment Username

MDM variable like $EMAIL or $USER\_PRINCIPAL\_NAME

Device Name

MDM variable like $DEVICE_NAME or $SERIAL\_NUMBER

**2. Deploy the Script**

Use your MDM's script or command execution feature:

1. Create a new script/command in your MDM console
2. Paste the generated script contents
3. Configure a recurring execution schedule (at least daily recommended)
4. Assign to target devices
5. Save and deploy

> [!NOTE]
>
> MDM scripts typically run as **root**. The generated script handles this by detecting and running operations as the logged-in user where needed.

## Verification

Open a client application (e.g., Cursor) on a target device and confirm the synced MCP servers appear. If something went wrong, check `/var/log/runlayer/auto_provisioning.log` on the device.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.