All apps · 0 apps
Lansweeper-Network-Discovery
Docker app from 007Darkmatter5's Repository
Overview
Readme
View on GitHubLansweeper 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.shdoes the same setup: it rendersappsettings.jsonfrom the template, generateshub.iniand the sensor ID, and writes the linking code and hub code files. - The apps keep their state next to their binaries, so
/config/huband/config/it-sensorhold both. When the image version changes, the new binaries are copied over and the state files are kept, just like anapt upgrade. - Both processes run under a small supervisor with
tinias PID 1. Their logs go to/config/*/logsand 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(orbr0with 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_RAWandNET_ADMINadded. Inside the container this replaces the packages'setcapand 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 hasenableanddisablecommands). - 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/systemctlis 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.
Requirements
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/007darkmatter5/lansweeper-network-discovery:latestRuntime 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
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
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
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
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
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
Run the IT Sensor alongside the Hub. Set to false for a Hub only.
- Target
- ENABLE_SENSOR
- Default
- true
- Value
- true
Optional. Hub code for pairing the sensor, if the Hub UI asks for one.
- Target
- HUB_CODE
Optional. Hostname the Hub listens on and advertises. Defaults to the server's hostname.
- Target
- HUB_HOSTNAME
Verbose, Debug, Information, Warning or Error.
- Target
- LOG_LEVEL
- Default
- Information
- Value
- Information
Timezone for log timestamps.
- Target
- TZ
- Default
- Etc/UTC
- Value
- Etc/UTC