Docs

Installation

NetLens runs as a Dockerized NfSen stack. The install script builds the image, creates your bind-mounted data folders, and starts the service on port 8070.

Prerequisites

  • A Linux VPS or host with Docker Engine and the Docker Compose plugin.
  • UDP access to the exporter ports you plan to use (2055/2056 by default).
  • Enough disk space for raw flow files and RRD statistics.

Network requirement

Allow the selected UDP ports in both your cloud firewall and host firewall. The web interface uses TCP 8070.

Deploy the stack

install
# Clone the repository
git clone https://github.com/rezwanvaiya2-0/netlens.git
cd netlens

# Build and start NetLens
sudo ./install.sh

./install.sh is exactly docker compose up -d --build. The --build flag is only needed on the first run — after that, restarting only requires docker compose up -d (no rebuild). Your sources, config, and data all persist thanks to the data folders next to docker-compose.yml.

Open the dashboard

Visit http://<YOUR_IP>:8070/nfsen.php. The web UI is password-protected:

FieldDefault
Usernameadmin
Passwordchange-me-now

Change the default password

Replace the default credential immediately — one command, takes effect instantly, no restart needed:
change password
docker exec netlens htpasswd -b /var/nfsen/etc/.htpasswd admin YourNewPass123

Verify the service

verify
docker compose ps
docker logs --tail=50 netlens
ss -lunp | grep -E '2055|2056|8070'

The container should be running, the UDP listeners should be present, and the web UI should load without an authentication loop.

Data folders (created on first start)

FolderInside the containerWhat it holds
nfsen-data//var/nfsen/profiles-dataRaw flow records (captured NetFlow files)
nfsen-stat//var/nfsen/profiles-statRRD graph files (the charts in the Web UI)
nfsen-var//var/nfsen/varLogs, cache, runtime files
nfsen-etc//var/nfsen/etcnfsen.conf (router sources config)

The folders are created automatically on first start, and the entrypoint seeds the default config + demo source when nfsen-etc/ is empty. Learn more on the Data Folders page.

Timezone

The container defaults to Asia/Dhaka (set via the TZ environment variable in docker-compose.yml).

Next steps

  • Connect a router on a new port — see the guide.
  • Set data retention from the web UI.
  • Integrate with LibreNMS over a read-only NFS share.