> ## 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.

# Mosyle Deployment

> Deploy automatic configuration provisioning to macOS devices managed by Mosyle Business

## Prerequisites

* Mosyle Business admin access
* Enrollment key from Runlayer
* 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.

**Mosyle-specific configuration tips:**

* `ENROLLMENT_USERNAME`: Use the Mosyle variable `%Email%` to provide the user's identity. Leave empty to use the device username.
* `ENROLLMENT_DEVICE_NAME`: Use the Mosyle variable `%DeviceName%` to identify the device. 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. Create a Custom Command**

1. Under the **Management** tab, select **Custom Commands**
2. Click **Add new profile**
3. Provide a **Name** (e.g., "Runlayer Config Sync"), check **Enable variables for this profile**, and paste the generated script into the code box
4. Switch to the **Execution Settings** tab and configure the execution frequency (at least daily recommended)

**3. Assign and Deploy**

* Click **Add assignment** to assign the profile to target devices
* Click **Save** and monitor execution status

## 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.