selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

LanLens logo

Self-host LanLens

v1.6.0

Self-hosted network inventory and local network scanner

ReleaseOpen SourceOther
Updated10 hours ago
LanguagePython
Setup difficultyModerate
Stars
146
Ports
7765 (HTTP port exposed by nginx for the LanLens web UI), 17765 (Internal FastAPI port behind nginx)
Docker
alexrosbach/lanlens
Install with Docker Compose
Dashboard overview showing discovered devices, network status, and inventory overviewDevice detail page with inventory fields and service contextSegments view organizing routers, switches, servers, and clientsDHCP security awareness viewSNMP target settings for network device pollingEditable CMDB and i-doit CSV export tableNotification rule matrix with channel controls for network change eventsNetwork changes view with filtered device history and before-after contextSNMP poll diagnostics dialog with sanitized troubleshooting details

What is LanLens?

This tool scans your local network using ARP to find devices by MAC and IP address, then builds a searchable inventory with vendor details, online status, and custom documentation fields. It adds SNMP polling, passive protocol discovery (LLDP, CDP, STP, OSPF), a visual topology map, and change notifications. Data can be exported to CMDB or i-doit systems. Deployment uses Docker Compose with host networking for raw ARP access; SQLite stores the data. No cloud account or telemetry is involved. First login uses admin/admin with a forced password change.

Should you self-host LanLens?

LanLens scores 45/100 on selfhost.directory (how scoring works) and ranks #35 of 48 in Network Monitoring. It has 146 GitHub stars.

It shipped 13 stable releases in the past year. The latest, v1.6.0, came out on 24 October 2026. New versions land roughly every 6 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Other-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is mitmproxy (86/100, 46 441 stars). It scores higher overall, so compare the two before you pick. See LanLens vs mitmproxy side by side.

Features

  • CMDB/i-doit export
  • Device Inventory
  • DNS/AXFR integration
  • Multiple DHCP ranges
  • Network device discovery
  • Network segments
  • Network topology map
  • No cloud dependency
  • Notification rules
  • Passive topology discovery
  • REST API
  • Security awareness
  • SNMP polling
  • TLS/HTTPS

LanLens README

How to install LanLens

Install LanLens with Docker Compose

Environment variables
SECRET_KEY, LANLENS_API_TOKEN, LANLENS_API_TOKEN_READ_ONLY, DEFAULT_ADMIN_PASSWORD, LANLENS_PORT, BACKEND_PORT, DB_PATH, TZ

curl -fsSL https://raw.githubusercontent.com/AlexRosbach/LanLens/main/docker-compose.yml -o docker-compose.yml && docker compose up -d

Uses host networking by default for ARP scanning; bridge mode alternative available but ARP scanning disabled

How to configure LanLens

  • BACKEND_PORT17765Internal FastAPI port behind nginx

    Internal FastAPI port behind nginx

  • DB_PATH/data/lanlens.dbSQLite database path

    SQLite database path

  • DEFAULT_ADMIN_PASSWORDadminInitial admin password when no user exists

    Initial admin password when no user exists

  • LANLENS_API_TOKENemptyOptional persistent Bearer token (minimum 32 characters) for REST integrations

    Optional persistent Bearer token (minimum 32 characters) for REST integrations

  • LANLENS_API_TOKEN_READ_ONLYtrueRestrict the persistent API token to GET/HEAD/OPTIONS requests

    Restrict the persistent API token to GET/HEAD/OPTIONS requests

    values: true/false

  • LANLENS_PORT7765HTTP port exposed by nginx

    HTTP port exposed by nginx

  • SECRET_KEYgenerated on first startEncryption/signing key; set manually only when restoring/migrating encrypted credentials

    Encryption/signing key; set manually only when restoring/migrating encrypted credentials

  • TZUTCContainer timezone

    Container timezone

    values: e.g. Europe/Berlin, America/New_York, UTC

LanLens releases & version history

FAQ

Does LanLens show topology hints?

Yes, LanLens combines SNMP context with passive LLDP, CDP, STP/RSTP, OSPF, VRRP, and HSRP hints when the local network exposes those signals.

Can LanLens send network change notifications?

Yes, LanLens has granular notification rules for new devices, IP and hostname changes, online state, archive events, MAC drift warnings, and unknown DHCP observations.

Can LanLens export inventory data?

Yes, LanLens includes CMDB and i-doit export workflows so discovered inventory data can be reviewed before export.

Can LanLens use SNMP and topology signals?

Yes, LanLens can use SNMP targets, IF-MIB interface data, LLDP/CDP hints, and passive discovery signals when available.

Does LanLens help with network changes?

Yes, LanLens highlights scan changes, IP and MAC history, identity drift, unknown DHCP signals, and changes that should be reviewed.

What does LanLens discover?

LanLens discovers local MAC and IP devices, vendor hints, online state, DHCP range context, services, ports, and device history.

Who is LanLens built for?

LanLens fits home labs, small IT environments, MSP-style documentation work, and teams that want practical local network visibility.

What is LanLens used for?

LanLens creates a self-hosted inventory of local network devices, including discovered MAC and IP addresses, device context, services, notes, and documentation fields.

More in Documentation Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…