---
title: "Install IT Agent on macOS | Lansweeper Platform"
slug: "install-it-agent-macos"
description: "Install the Lansweeper IT Agent on macOS to discover and track assets. Run an interactive or silent install and link the agent to your site."
updated: 2026-07-08T13:41:38Z
published: 2026-07-08T13:41:38Z
canonical: "docs.lansweeper.com/install-it-agent-macos"
stale: true
---

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

# Install IT Agent - MacOS

Use the IT Agent Discovery to identify and track assets that connect to your network. You can install it interactively or silently, depending on your deployment needs.

## Prerequisites

- Review the [IT Agent requirements](/docs/discovery-agent-requirements)
- Review the supported operating systems

## Supported operating systems

- macOS 10.15 (current and previous release, x64). Rosetta is required on Apple Silicon until native ARM builds are available.

## Install the agent

Interactive (GUI)PKG DeploymentDMG DeploymentDeployment script

Recommended for most users.

1. In your preferred site, go to **Discovery** > **Systems** > **Download installers/packages**.
2. Select **IT Agent Discovery** > **Download IT Agent disk image**.
3. Open the installation file.

> [!NOTE]
> NOTE
> 
> If the software is blocked, go to **System Preferences** > **Security & Privacy** > **Open Anyways**.
4. In the setup wizard, choose an installation directory, then select **Next**.
5. In your site, select **Systems** > **Link discovery system** > **Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
6. Paste the copied linking code into the installer and select **Next**.
7. Select **Next** again to start the installation.

1. In your preferred site, go to **Discovery** > **Systems** > **Download installers/packages**.
2. Select **IT Agent Discovery** > **Download IT Agent package** and **Download IT Agent package silent installation configuration** to download both files.
3. In your site, select **Systems** > **Link discovery system** > **Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
4. On your computer, open the downloaded **IT Agent package silent installation configuration** file.
5. In the file, replace `cloudtokenvalue` with your copied linking code. If the computer requires a proxy server, remove the `#` for `proxyserver=myproxyserver.domain.local` and `proxyport=8080`.

```bash
#!/bin/sh
```
6. Enter the following command:

```bash
sudo LansweeperITAgent-PreinstallScript_stable.sh
```
7. Enter the following command, replacing` X.X.X` in` Lansweeper-IT-agent-discovery-X.X.X` with the version number of your installer.

> [!NOTE]
> Installer version
> 
> The version numbers for your installer can be found in your Lansweeper site. Go to **Discovery** > **Download installers/packages** > **IT Agent Discovery** > **Version** and locate your installer.

```bash
sudo installer -pkg Lansweeper-IT-agent-discovery-X.X.X-osx-installer.pkg -target /
```

1. In your preferred site, go to **Discovery** > **Systems** > **Download installers/packages**.
2. Select **IT Agent Discovery** > **Download IT Agent disk image** to download the installer.
3. In your site, select **Systems** > **Link discovery system** > **Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
4. In an elevated command prompt, enter the following command to mount the DMG file:

```bash
hdiutil attach Lansweeper-IT-agent-discovery-0.9.0-16-osx-installer.dmg
```
5. To navigate the volume, enter:

```bash
cd "/Volumes/Lansweeper IT Agent Discovery"
```
6. Enter the following command, replacing` X.X.X` in` Lansweeper-IT-agent-discovery-X.X.X-X-osx-installer.dmg` with the version number of your installer. If the computer requires a proxy server, add parameters `--proxyserver proxyserveraddress` and `--proxyport 8080`.

> [!NOTE]
> Installer version
> 
> The version numbers for your installer can be found in your Lansweeper site. Go to **Discovery** > **Download installers/packages** > **IT Agent Discovery** > **Version** and locate your installer.

```bash
sudo Lansweeper-IT-agent-discovery-X.X.X-X-osx-installer.app/Contents/MacOS/installbuilder.sh --mode unattended --accepteula 1 --path "/Library/Application Support/Lansweeper IT Agent Discovery" --cloudtoken cloudtokenvalue
```

1. Copy the following script:

```plaintext
#!/bin/bash
# ==============================================
# Lansweeper IT Agent Discovery Silent Installer (macOS)
# ==============================================
# --- 1. Set Cloud Token Variable ---
CLOUDTOKEN="cloudtokenvalue"   # Replace with your linking code
# --- 2. Define Download URLs ---
INSTALLER_URL="https://download.lansweeper.com/stable/MAC/it-agent-discovery-pkg/latest"
CONFIG_URL="https://download.lansweeper.com/stable/MAC/pkg-scripts/it-agent-discovery-stable/latest"
# --- 3. Define Local File Paths ---
WORKDIR="/tmp/lansweeper-install"
INSTALLER_PKG="WORKDIR/it-agent-config.sh"
# --- 4. Prepare Work Directory ---
rm -rf "WORKDIR"
# --- 5. Download Installer and Config ---
echo "Downloading Lansweeper IT Agent Discovery installer..."
curl -L "INSTALLER_PKG"
echo "Downloading Lansweeper config script..."
curl -L "CONFIG_SCRIPT"
# --- 6. Insert Cloud Token into Config ---
echo "Updating config script with cloud token..."
sed -i.bak "s/cloudtokenvalue/CONFIG_SCRIPT"
rm -f "You can't use 'macro parameter character #' in math modeCONFIG_SCRIPT.bak" # --- 7. Apply Config Script --- echo "Applying configuration..." sudo bash "CONFIG_SCRIPT"
# --- 8. Run Silent Install ---
echo "Running silent installation..."
sudo installer -pkg "You can't use 'macro parameter character #' in math modeINSTALLER_PKG" -target / # --- 9. Cleanup --- rm -f "INSTALLER_PKG"
echo "Installer removed."
echo " Lansweeper IT Agent Discovery installation completed."
```
2. On your site, select **Systems** > **Link discovery system** > **Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
3. In the first section of the script, replace `cloudtokenvalue` with your copied linking code.
4. Save your file as a Bash script, for example: `install-ls-it-agent.sh`.
5. Make the script executable by running: `chmod +x install-ls-it-agent.sh`.
6. Run the script with elevated permissions:` sudo ./install-ls-it-agent.sh`.

## Next steps

Now that your IT Agent is installed, you can [create a discovery action](/docs/create-an-it-agent-discovery-action) to specify when discovery should occur.
