--- title: "Install the traffic sensor on Linux | Lansweeper Platform" slug: "install-the-traffic-sensor" description: "Install the Lansweeper traffic sensor on Linux to passively monitor network communications and discover assets from the traffic they generate." tags: ["Lansweeper Platform", "Discovery and scanning", "Traffic sensor"] status: "update" updated: 2026-10-14T16:08:43Z published: 2026-10-14T16:08:43Z canonical: "docs.lansweeper.com/install-the-traffic-sensor" --- > ## 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 the traffic sensor - Linux Install the traffic sensor on a Linux host by working through the prerequisites and steps below. ## Prerequisites - Review the [Traffic sensor requirements](/docs/traffic-sensor-requirements) - Review the supported operating systems ## Supported operating systems We currently only support the following operating systems: **.deb packages**: - Ubuntu 22.04, 24.04, 26.04 LTS (x64) **.rpm packages:** - Red Hat Enterprise Linux 9 (x64, current and previous minor release) ## Access checklist Before you start the installation and capture setup, confirm you have the access and permissions below. - **Host access**: SSH access to the sensor host, or console access - **Privileges**: a user account with `sudo` or `root` - **Package install rights**: permission to install required packages (for example `apt` access) ## Install the sensor and hub You can install the traffic sensor on the same machine as the hub, or link it to an existing hub on another machine. UbuntuRed Hat 1. In your preferred site, go to **Discovery** > **Systems** > **Download installers/packages**. 2. Select **Network Discovery** > **Download Lansweeper repository package** for the **Linux Debian** OS. Alternatively, open a terminal and run: ```bash curl -L -o lansweeper-repository.deb https://download.lansweeper.com/deb-repository/stable/latest ``` 3. Open a terminal and install the package you copied to your machine: ```bash sudo dpkg -i ./lansweeper-repository.deb sudo apt update ``` 4. In your site, select **Systems** > **Link discovery system** > **Create new code**. Specify an expiration date, then select **Apply** and copy the generated code. > [!NOTE] > NOTE > > The expiration date indicates when the linking code can no longer be used to establish a new connection between a site and your discovery system. Any existing connection between the system and your site will remain active after the expiration date. 5. Install the Network Discovery hub. Replace `YourCloudTokenHere` with your actual linking code and run: ```bash sudo env LINKING_CODE=YourCloudTokenHere apt install lansweeper-network-discovery-hub ``` 6. Install the sensor. Replace `YourCloudTokenHere` with your actual linking code, and `YourHubInstance` with the domain name where your hub is installed and run: ```bash sudo env HUB_CODE=YourCloudTokenHere HUB_INSTANCE=localhost HUB_PORT=59525 apt install lansweeper-network-discovery-traffic-sensor ``` If the sensor is **not** installed on the same host as the hub, replace `localhost` with your hub’s IP address or FQDN. 1. In your preferred site, go to **Discovery** > **Systems** > **Download installers/packages**. 2. Select **Network Discovery** > **Download Lansweeper repository package** for the **Linux Red Hat** OS. Alternatively, open a terminal and run: ```bash curl -L -o lansweeper-repository.rpm https://download.lansweeper.com/rpm-repository/stable/latest ``` 3. Open a terminal and install the package you copied to your machine: ```bash sudo dnf install ./lansweeper-repository.rpm sudo dnf update ``` 4. In your site, select **Systems** > **Link discovery system** > **Create new code**. Specify an expiration date, then select **Apply** and copy the generated code. > [!NOTE] > NOTE > > The expiration date indicates when the linking code can no longer be used to establish a new connection between a site and your discovery system. Any existing connection between the system and your site will remain active after the expiration date. 5. Install the Network Discovery hub. Replace `YourCloudTokenHere` with your actual linking code and run: ```bash sudo env LINKING_CODE=YourCloudTokenHere dnf install lansweeper-network-discovery-hub ``` 6. Install the sensor. Replace `YourCloudTokenHere` with your actual linking code, and `YourHubInstance` with the domain name where your hub is installed and run: ```bash sudo env HUB_CODE=YourCloudTokenHere HUB_INSTANCE=localhost HUB_PORT=59525 dnf install lansweeper-network-discovery-traffic-sensor ``` If the sensor is **not** installed on the same host as the hub, replace `localhost` with your hub’s IP address or FQDN. ## Next steps Now that your hub and sensor are installed, the traffic sensor starts inspecting network traffic right away. It records the assets it finds, the connections between them, and their connections to external services such as SaaS applications. The sensor syncs this data to your site, and discovered assets appear there shortly after installation. ### View assets discovered by the traffic sensor To see a filtered view of all assets discovered by your traffic sensor: 1. Go to **Discovery > Systems** and select your traffic sensor. 2. Under **Summary**, locate the **Assets** section. 3. Select **Open details** to view all assets detected by this sensor. ## Frequently asked questions (FAQ) ### The sensor install command fails with "Unable to locate package ... .deb", what do I do? See [Troubleshoot the traffic sensor - Linux](/docs/troubleshoot-the-traffic-sensor) for the fix, then rerun the sensor install command above. ### How can I uninstall the traffic sensor on Linux machines? **Ubuntu** On the host where the sensor is installed, run: ```bash apt purge lansweeper-network-discovery-traffic-sensor ``` All information flows will stop after uninstalling the sensor. **Red Hat** On the host where the sensor is installed, run: ```bash dnf remove lansweeper-network-discovery-traffic-sensor ``` All information flows will stop after uninstalling the sensor. ### Will data be sent to the Lansweeper Platform right after installation? Yes. The traffic sensor starts capturing data immediately after installation. Data is stored in the hub as an intermediate location, and the hub continuously syncs it to the Lansweeper Platform in groups. You can manually enable or disable the hub and/or sensor from sending data to the Platform at any time. Go to **Discovery** > **Systems**, open the detail page of the hub or sensor, and toggle the state to enabled or disabled. This is not configurable on a schedule. ### How do I confirm the sensor is processing traffic? Curl the sensor's metrics endpoint and check the flow and packet counters: ``` curl -s http://127.0.0.1:8000/metrics | grep -E "^sensor_(flows_count|packets_count) " ``` Expected output: ``` sensor_flows_count 173472 sensor_packets_count 288513 ``` These counts are cumulative since the sensor service last started. Run the command twice about a minute apart, if the numbers are incrementing, the sensor is actively processing data. The Network Discovery component that every sensor connects to. The hub holds the sensor configuration, collects the data the sensors gather, and syncs it to your Lansweeper Platform site.