This repository provides a minimal, reproducible Docker Compose setup for collecting NetFlow data from MikroTik devices using netflow2ng and visualizing it with ntopng Community. The intent is to keep the implementation simple and focused on observability, not container networking complexity.
Both services run with network_mode: host to avoid UDP/NAT edge cases and to simplify flow ingestion. This setup was deployed inside a Proxmox LXC running Docker.
- Docker with the Docker Compose plugin installed
- A host reachable by your MikroTik devices for NetFlow export
- MikroTik devices configured to export NetFlow to this host’s IP address
.
├── compose.yaml
├── .env.example
├── .gitignore
└── README.md
-
Copy the environment template and adjust it for your environment:
cp .env.example .env
-
Edit
.envand update:NTOP_SUBNETSto match your VLANs or routed networks- Any input or mode flags as needed
-
Start the stack:
docker compose up -d
-
Verify containers are running:
docker ps docker logs netflow2ng --tail=50 docker logs ntopng --tail=50
NETFLOW2NG_ARGS=--tlvenables TLV support.- This flag is required for compatibility with newer ntopng versions and avoids the need for a licensed nProbe instance.
NTOP_INPUTdefines the input source for ntopng.- Default:
tcp://127.0.0.1:5556
- Default:
NTOP_SUBNETSmaps subnets to friendly labels in the UI using the-mflag.NTOP_MODE_FLAG=--communityensures ntopng runs in Community mode.
By default, the ntopng web UI is available at:
http://<host-ip>:3000
To stop and remove the containers:
docker compose down- On MikroTik CRS devices, NetFlow is only generated for traffic that traverses the CPU. Pure hardware-switched traffic will not appear.
- Host networking is intentional to ensure reliable UDP flow ingestion.
- This setup mirrors enterprise observability patterns in a lightweight home lab environment.
This repository is provided as-is. Refer to upstream project licenses for usage terms:
- ntopng: https://github.com/ntop/ntopng
- netflow2ng: https://github.com/synfinatic/netflow2ng