cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This documentation is for the new preview UI. It’s still being refined and is subject to change. For documentation for the old UI, see Knowledge Base.

Article link copied to clipboard
Updated
Published
3 min read

Use the IT Agent Discovery to identify and track assets that connect to your network.

Prerequisites

Supported operating systems

.deb packages:

  • Debian 12 (x64, current stable and previous release)

  • Ubuntu 22.04 LTS (x64, current LTS and previous LTS)

.rpm packages:

  • Alpine Linux 3.19 (x64, current and previous stream release)

  • Azure Linux 3.0 (x64, current and previous stream release)

  • CentOS Stream 9 (x64, current and previous stream release)

  • Fedora 40 (x64, current and previous release)

  • openSUSE Leap 15.6 (x64, current and previous release)

  • Red Hat Enterprise Linux 8 (x64, current and previous minor release)

  • SUSE Linux Enterprise Server (SLES) 15 SP6 (x64, current and previous service pack)

Install the agent

  1. On your preferred site, navigate to Discovery > Systems > Download Installers/Packages.

  2. Select IT Agent Discovery > Download the Lansweeper repository package for the Linux Debian OS.

  3. Open a terminal and install the package:

    sudo dpkg -i ./lansweeper-repository.deb
    sudo apt update
  4. On your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.

  5. Install the agent. Replace cloudtokenvalue with your actual linking code and run:

    sudo env LINKING_CODE=cloudtokenvalue apt install lansweeper-it-agent

    If you're using a proxy server, add the PROXY_SERVER and PROXY_PORT parameters:

    sudo env LINKING_CODE=cloudtokenvalue PROXY_SERVER=<your_proxy_server> PROXY_PORT=<your_proxy_port> apt install lansweeper-it-agent.x86_64
  1. On your preferred site, navigate to Discovery > Systems > Download Installers/Packages.

  2. Select IT Agent Discovery > Download Lansweeper repository package for the Linux Red Hat OS.

  3. Open a terminal and install the repository package you copied to your machine:

    sudo yum install ./lansweeper-repository-x.0.0-0.x86_64.rpm
    sudo yum update
  4. On your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.

  5. Install the agent. Replace cloudtokenvalue with your actual linking code and run:

    sudo env LINKING_CODE=cloudtokenvalue yum install lansweeper-it-agent.x86_64

    If you're using a proxy server, add the PROXY_SERVER and PROXY_PORT parameters:

    sudo env LINKING_CODE=cloudtokenvalue PROXY_SERVER=<your_proxy_server> PROXY_PORT=<your_proxy_port> yum install lansweeper-it-agent.x86_64
  1. Copy the following script:

    #!/bin/bash
    set -e
    
    # ----------------------------
    # Lansweeper IT Agent Installer Script
    # ----------------------------
    
    # Set your cloud token here
    cloudtoken="cloudtokenvalue"
    
    # Check system architecture
    ARCH=$(uname -m)
    if [[ "$ARCH" != "x86_64" && "$ARCH" != "amd64" ]]; then
        echo "   Lansweeper IT Agent Discovery is only available for amd64 (x86_64)."
        echo "   You are running: $ARCH"
        echo "   Please use an x86_64 VM or Docker container with --platform linux/amd64."
        exit 1
    fi
    
    # Check curl/wget
    if ! command -v curl &>/dev/null && ! command -v wget &>/dev/null; then
        echo "   Neither curl nor wget found. Please install one of them."
        echo "   Example (Debian/Ubuntu): sudo apt install curl -y"
        echo "   Example (RHEL/Fedora):   sudo yum install curl -y"
        exit 1
    fi
    
    # Detect distro family
    if [ -f /etc/debian_version ]; then
        PKGTYPE="deb"
        INSTALLER_URL="https://download.lansweeper.com/deb-repository/stable/latest"
        INSTALLER_PATH="/tmp/lansweeper-it-agent.deb"
        INSTALL_CMD="sudo dpkg -i $INSTALLER_PATH || sudo apt-get install -f -y"
    elif [ -f /etc/redhat-release ] || [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then
        PKGTYPE="rpm"
        INSTALLER_URL="https://download.lansweeper.com/rpm-repository/stable/latest"
        INSTALLER_PATH="/tmp/lansweeper-it-agent.rpm"
        INSTALL_CMD="sudo rpm -i $INSTALLER_PATH || sudo yum install -f -y"
    else
        echo " Unsupported Linux distribution."
        exit 1
    fi
    
    echo " Downloading Lansweeper IT Agent Discovery installer for $PKGTYPE..."
    
    # Download installer
    if command -v curl &>/dev/null; then
        curl -L -o "$INSTALLER_PATH" "$INSTALLER_URL"
    else
        wget -O "$INSTALLER_PATH" "$INSTALLER_URL"
    fi
    
    echo " Installing Lansweeper IT Agent Discovery with cloud token..."
    
    # Create config file with cloudtoken
    CONFIG_PATH="/etc/lansweeper-it-agent/itagent.conf"
    sudo mkdir -p /etc/lansweeper-it-agent
    cat <<EOF | sudo tee "$CONFIG_PATH" >/dev/null
    {
      "cloudtoken": "$cloudtoken"
    }
    EOF
    
    # Silent install
    eval "$INSTALL_CMD"
    
    # Remove installer
    rm -f "$INSTALLER_PATH"
    
    echo "   Installation completed."
    echo "   Cloud token has been set in: $CONFIG_PATH"
    echo "   If your token changes, re-run this script to update it."
    
  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 to specify when discovery should occur.