Lansweeper-Network-Discovery

Lansweeper-Network-Discovery

Docker app from 007Darkmatter5's Repository

Overview

Unofficial container for Lansweeper Network Discovery. It runs the Hub and the IT Sensor together: the sensor scans your network, and the Hub sends what it finds to your Lansweeper Site. Not affiliated with or supported by Lansweeper. The image installs the official Linux packages from Lansweeper's apt repository when it is built, and is rebuilt when Lansweeper releases a new version. To link it to your Site, paste the linking code from your Site (Discovery > Discovery systems > Link discovery system) into Linking Code, or link it from the web UI after the first start. The web UI uses a self-signed certificate. First start: open https://your-server:59526/ (the Setup Port) and set the admin password. The Hub only allows this from the server itself, so the container relays that port locally until the password is set, then closes it. After that, use the WebUI link. Host networking is required for discovery to see your LAN. Keep appdata on cache or an SSD: the Hub uses a SQLite database, and SQLite over a network share is unreliable.

Lansweeper Network Discovery for Unraid

Unofficial Docker image and Unraid Community Apps template that runs the Lansweeper Network Discovery Hub and IT Sensor in one container.

The image contains no redistributed Lansweeper files. At build time it pulls the official lansweeper-network-discovery-hub and lansweeper-network-discovery-it-sensor packages from Lansweeper's signed apt repository (https://download.lansweeper.com/debian). The repository's public signing key is in keys/ (taken from Lansweeper's lansweeper-repository package).

How it works

  • The packages' install scripts assume systemd, so they are not run. rootfs/usr/local/bin/entrypoint.sh does the same setup: it renders appsettings.json from the template, generates hub.ini and the sensor ID, and writes the linking code and hub code files.
  • The apps keep their state next to their binaries, so /config/hub and /config/it-sensor hold both. When the image version changes, the new binaries are copied over and the state files are kept, just like an apt upgrade.
  • Both processes run under a small supervisor with tini as PID 1. Their logs go to /config/*/logs and to the container log.

Layout of /config

Path Contents
hub/ Hub binaries, appsettings.json, hub.db, ssl/, logs/, cloudtoken.txt
it-sensor/ Sensor binaries, appsettings.json, logs/
lib/ Mounted at /var/lib/.lansweeper (machine identity)

Environment

Variable Default Purpose
LINKING_CODE – Links the Hub to your Site. Applied once, and again only if the value changes.
HUB_PORT 59525 Port for the Hub's HTTPS web UI and the sensor endpoint
SETUP_PORT 59526 First-run port for setting the admin password; closes once it's set. 0 turns it off.
PASSIVE_ONLY – true/false. On a fresh install, empty means false.
ENABLE_SENSOR true Set to false for a Hub-only container
HUB_CODE – Sensor pairing code, if the Hub asks for one
HUB_HOSTNAME host's FQDN Hostname the Hub binds to and advertises
LOG_LEVEL Information Serilog minimum level
LOG_TO_CONSOLE true Also send app logs to docker logs

Run manually

docker build -t lansweeper-network-discovery .
docker run -d --name lansweeper --network host \
  --cap-add NET_RAW --cap-add NET_ADMIN \
  -e LINKING_CODE=xxxxx \
  -v /mnt/cache/appdata/lansweeper-network-discovery:/config \
  lansweeper-network-discovery

Then open https://<server>:59525/. The certificate is self-signed.

First login

The Hub only lets you set the initial admin password from the server itself (localhost). While no password is set, the container relays SETUP_PORT (59526) to the Hub over loopback. Open https://<server>:59526/ once and set the password. The container closes the port as soon as the Hub records the password (AuthOptions.ChangePasswordOnLogin turns false). After that, log in at https://<server>:59525/.

Until the password is set, anyone on your network who reaches the setup port could set it, as with most first-run setup pages. Set SETUP_PORT=0 to turn the relay off. After AuthenticationTool reset, restart the container to reopen the setup port.

Unraid

The Community Applications template lives in 007darkmatter5/unraid-templates as templates/lansweeper-network-discovery.xml. The template's icon is served from this repo at docs/icon.png.

The workflow publishes ghcr.io/007darkmatter5/lansweeper-network-discovery, and it rebuilds daily when Lansweeper releases a new version. The package must be public for Unraid to pull it.

Notes

  • Networking: use host (or br0 with its own IP). On a bridge network, discovery can't see the LAN.
  • appdata: the Hub uses SQLite (hub.db). If you see locking errors on /mnt/user, use a pool path such as /mnt/cache/appdata/....
  • The container runs as root with only NET_RAW and NET_ADMIN added. Inside the container this replaces the packages' setcap and sudoers setup.
  • amd64 only, because Lansweeper publishes amd64 packages only.
  • Locked out of the web UI: run docker exec -w /config/hub <container> ./AuthenticationTool reset (the tool also has enable and disable commands).
  • The sensor scans the subnets of every host interface, including Tailscale (100.x). Limit the scan ranges in the Hub UI if you don't want that.
  • There's no systemd in the container, so /usr/local/bin/systemctl is a no-op stand-in. The sensor only uses it to list the host's services.

Install Lansweeper-Network-Discovery on Unraid in a few clicks.

Find Lansweeper-Network-Discovery in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for Lansweeper-Network-Discovery Review the template variables and paths Click Install

Requirements

A Lansweeper Site (https://app.lansweeper.com). amd64 only.

Related apps

Details

Repository
ghcr.io/007darkmatter5/lansweeper-network-discovery:latest
Last Updated2026-09-24
First Seen2026-09-24

Runtime arguments

Web UI
https://[IP]:[PORT:59525]/
Network
host
Shell
bash
Privileged
false
Extra Params
--cap-add=NET_RAW --cap-add=NET_ADMIN --stop-timeout=60

Template configuration

App DataPathrw

Hub database, certificate, settings and logs, and the sensor's settings. Put this on cache or an SSD.

Target
/config
Default
/mnt/user/appdata/lansweeper-network-discovery
Value
/mnt/user/appdata/lansweeper-network-discovery
Linking CodeVariable

Optional. Linking code from your Lansweeper Site. Applied once; changing it applies the new code. Leave empty to link from the web UI instead.

Target
LINKING_CODE
Hub HTTPS PortVariable

Port for the Hub web UI and the sensor connection. With host networking this is the port on the server.

Target
HUB_PORT
Default
59525
Value
59525
Setup PortVariable

Open https://your-server:59526/ once to set the admin password. The port is only open until the password is set. Set to 0 to disable it.

Target
SETUP_PORT
Default
59526
Value
59526
Passive OnlyVariable

Leave empty to use active scanning on first start and keep whatever you set in the Hub UI after that. true = listen passively only, false = active scanning.

Target
PASSIVE_ONLY
Enable IT SensorVariable

Run the IT Sensor alongside the Hub. Set to false for a Hub only.

Target
ENABLE_SENSOR
Default
true
Value
true
Hub CodeVariable

Optional. Hub code for pairing the sensor, if the Hub UI asks for one.

Target
HUB_CODE
Hub HostnameVariable

Optional. Hostname the Hub listens on and advertises. Defaults to the server's hostname.

Target
HUB_HOSTNAME
Log LevelVariable

Verbose, Debug, Information, Warning or Error.

Target
LOG_LEVEL
Default
Information
Value
Information
TimezoneVariable

Timezone for log timestamps.

Target
TZ
Default
Etc/UTC
Value
Etc/UTC