---
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."
status: "update"
updated: 2026-07-29T07:59:36Z
published: 2026-07-29T07:59:36Z
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.

> [!TIP]
> Open beta
> 
> The traffic sensor is currently in open beta. Some features and requirements may still change as we refine the product.

## Prerequisites

- Review the [Discovery hub and sensor requirements](/v1/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 LTS (x64, current LTS and previous LTS)
- Ubuntu 24.04 LTS (x64, current LTS and previous LTS)

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

For ease of configuration and management during the beta phase, we strongly recommend deploying **one dedicated hub per traffic sensor**, with the **hub and traffic sensor installed on the same 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 will immediately start to monitor traffic for new assets. Discovered assets will begin appearing in your site 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)

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