--- 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." tags: ["Lansweeper Platform", "Discovery and scanning", "IT Agent"] status: "update" updated: 2026-11-19T21:04:10Z published: 2026-11-19T21:04:10Z canonical: "docs.lansweeper.com/install-it-agent-macos" --- > ## 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). Runs natively on both Intel (x64) and Apple Silicon (arm64) Macs, so Rosetta is no longer required. ## 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 PreinstallConfig="/tmp/LansweeperITAgent-Preinstall.cfg" # Don't change this path! [ -f $PreinstallConfig ] && chmod 744 $PreinstallConfig cat > $PreinstallConfig << EOF mode=unattended accepteula=1 path=/Library/Application Support/Lansweeper IT Agent Discovery cloudtoken=cloudtokenvalue #proxyserver=myproxyserver.domain.local #proxyport=8080 EOF chmod 744 $PreinstallConfig ``` 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: ```bash #!/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/lansweeper-it-agent-discovery.pkg" CONFIG_SCRIPT="$WORKDIR/it-agent-config.sh" # --- 4. Prepare Work Directory --- rm -rf "$WORKDIR" mkdir -p "$WORKDIR" # --- 5. Download Installer and Config --- echo "Downloading Lansweeper IT Agent Discovery installer..." curl -L "$INSTALLER_URL" -o "$INSTALLER_PKG" echo "Downloading Lansweeper config script..." curl -L "$CONFIG_URL" -o "$CONFIG_SCRIPT" # --- 6. Insert Cloud Token into Config --- echo "Updating config script with cloud token..." sed -i.bak "s/cloudtokenvalue/$CLOUDTOKEN/g" "$CONFIG_SCRIPT" rm -f "$CONFIG_SCRIPT.bak" # --- 7. Apply Config Script --- echo "Applying configuration..." sudo bash "$CONFIG_SCRIPT" # --- 8. Run Silent Install --- echo "Running silent installation..." sudo installer -pkg "$INSTALLER_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.