# Vnstat

Vnstat is a network traffic monitor that uses the network interface statistics provided by the kernel as information source. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/806/vnstat

## Description

vnStat is a network traffic monitor that uses the network interface statistics provided by the kernel as information source. This means that vnStat won't actually be sniffing any traffic and also ensures light use of system resources regardless of network traffic rate. By default, traffic statistics are stored on a five minute level for the last 48 hours, on a hourly level for the last 4 days, on a daily level for the last 2 full months and on a yearly level forever. The data retention durations are fully user configurable. Total seen traffic and a top days listing is also provided. See the official webpage or the GitHub repository for additional details and output examples. An example of the included image output is also available.

## Platform availability

Available on 1 of 9 platforms: Unraid.

## Health score

73/100 (Good), based on 4 of 4 factors.
- Maintained: 88 (last commit 19 days ago)
- Popular: 65 (1,786 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 100 (64 MB minimum RAM, runs on ARM)

## Links

- GitHub: https://github.com/vergoh/vnstat
- Docker Hub: https://hub.docker.com/r/vergoh/vnstat
- Unraid: https://ca.unraid.net/apps/vnstat-0pha83m1l72yri?q=Vnstat

## Common questions

### Does vnStat sniff packet contents?

No, vnStat uses the network interface statistics provided by the kernel. It does not sniff traffic, and this keeps system resource use light regardless of network traffic rate.

### Why might vnStat not start after reboot on modern Ubuntu?

Use the systemd service file instead of the older Upstart file so vnStat starts automatically. Choosing the older file can leave the traffic monitor stopped after a restart.

### How can I confirm vnStat installed correctly?

Run vnstat --version after installing. This confirms the command is available and the expected version is present, which avoids chasing missing stats caused by an incomplete install.

### What happens to vnStat data after a power cut?

One report says a power cut or unplugging can cause vnStat to lose stats and corrupt the data, requiring a reset. A normal reboot was reported not to cause the issue.

### Can vnStat be used to track WAN data usage on a router?

It has been used on GL.iNet routers to track WAN data usage. This is useful when the connection has usage caps or fees.

---
Source: Our Local Host (https://ourlocalhost.com/app/806/vnstat), the self-hosted and open-source app directory.
