# Install vnstat with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Console-based network traffic monitor. Version 2.13 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:vnstat
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install vnstat
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install vnstat
```

  Evidence: MacPorts ports tree: net/vnstat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add vnstat
```

  Evidence: Alpine Linux edge package indexes: vnstat from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install vnstat
```

  Evidence: Debian stable package indexes: vnstat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install vnstat
```

  Evidence: Fedora Rawhide package metadata: vnstat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#vnstat
```

  Evidence: nixpkgs package indexes: pkgs/by-name/vn/vnstat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S vnstat
```

  Evidence: Arch Linux sync databases: vnstat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install vnstat
```

  Evidence: openSUSE Tumbleweed package metadata: vnstat from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:vnstat
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/vnstat>
- **Version:** 2.13
- **Source summary:** Console-based network traffic monitor
- **Homepage:** <https://humdi.net/vnstat/>
- **Repository:** <https://github.com/vergoh/vnstat>
- **Upstream docs:** <https://humdi.net/vnstat/man/vnstat.html>
- **License:** GPL-2.0-only
- **Source archive:** <https://humdi.net/vnstat/vnstat-2.13.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- vnstat (cli)
- vnstatd (cli)
- vnstati (cli)
- vnstat (alias)
- vnstatd (alias)
- vnstati (alias)

## Dependencies

- gd

## Uses from macOS

- sqlite

## Install behavior

- Post-install hook: not defined
- Service: declared
- Caveats: To monitor interfaces other than "en0" edit $HOMEBREW_PREFIX/etc/vnstat.conf
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.13
- Local data: ok
- Upstream repository: https://humdi.net/vnstat/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

vnStat is a console-based network traffic monitor for Linux and BSD systems. Its central design choice is to read network-interface statistics from the kernel instead of sniffing packets, which keeps resource use low regardless of traffic volume.

### Project history

Teemu Toivola's changelog records vnStat 1.0 as the initial public release on 23 September 2002. Early releases added multiple-interface support, a new database structure, parseable output, daily and monthly estimates, FHS-compliant paths, 64-bit counter handling, an FAQ, and sample PPP scripts.

The project settled into its long-running home in March 2004, when version 1.3 moved the webpage to humdi.net and added a man page. Later releases broadened it from a cron-updated text tool into a service-oriented monitor: version 1.7 in April 2009 added daemon support, PNG image output, XML output, and BSD support; version 1.12 in August 2014 added example systemd, launchd, and upstart integration while deprecating cron update examples.

Version 2.0, released in October 2018, was a major internal transition: the old C-struct dump database was replaced with SQLite, with import support for legacy databases from versions 1.3 through 1.18. The 2.x series continued to add modern outputs and retention controls, including JSON/XML improvements, five-minute resolution data, query ranges, alerts, merge support, and image-output enhancements.

### Adoption history

vnStat's adoption comes from its fit with always-on servers, routers, VPS hosts, and BSD/Linux machines where long-term interface totals matter more than packet-level inspection. The upstream README also documents an official container workflow and signed source-release verification, signs of a mature utility maintained for both traditional installations and containerized environments.

### How it is used

Operators use `vnstat` for text queries, `vnstatd` as the background collector, and `vnstati` for image output. The README describes configurable retention at five-minute, hourly, daily, and yearly levels, plus total traffic and top-days listings; the changelog shows that JSON, XML, one-line, alert, and CGI-oriented outputs were added for scripts and dashboards.

### Why package nerds care

vnStat is package-nerd significant because it is boring in the best way: it gives reproducible traffic accounting without packet capture privileges or heavy monitoring infrastructure. It is a common answer when someone wants long-term bandwidth totals that survive reboots and can be queried from shell scripts.

### Timeline

- 2002-09-23: vnStat 1.0 initial public release.
- 2003-07-13: Version 1.1 adds multiple-interface support and a new database structure.
- 2004-03-08: Version 1.3 moves the webpage to humdi.net and includes a man page.
- 2009-04-12: Version 1.7 adds daemon support, PNG image output, XML output, and BSD support.
- 2014-08-30: Version 1.12 adds service-manager examples and deprecates cron update examples.
- 2018-10-21: Version 2.0 replaces the legacy database format with SQLite.
- 2025-02-08: Version 2.13 adds database merge support and more query/image-output improvements.

### Related projects

- vnStat sits near tools such as `ifconfig`, `/proc/net/dev`, BSD interface counters, and graphing/reporting front ends. Its own suite includes `vnstatd` for collection and `vnstati` for image rendering.

### Sources

- vnStat CHANGES: https://raw.githubusercontent.com/vergoh/vnstat/master/CHANGES
- vnStat README: https://raw.githubusercontent.com/vergoh/vnstat/master/README.md
- vnStat homepage: https://humdi.net/vnstat/


## Security Notes

broad file, network, media, or database tool signal. formula declares a Homebrew service.

- **Geiger risk:** orange / medium
- broad file, network, media, or database tool signal
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/vnstat.conf, ~/.vnstatrc
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** vnstat
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - vnstat - 2.13-1: normalized package name match | Debian stable package indexes: vnstat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | console-based network traffic monitor | https://humdi.net/vnstat/
- Debian apt - vnstati - 2.13-1: normalized package name match | Debian stable package indexes: vnstati from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | image output support for vnStat | https://humdi.net/vnstat/
- Nix - vnstat: normalized package name match | nixpkgs package indexes: pkgs/by-name/vn/vnstat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - vnstat - 2.12-1: normalized package name match | Ubuntu 24.04 LTS package indexes: vnstat from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | console-based network traffic monitor | https://humdi.net/vnstat/
- Ubuntu apt - vnstati - 2.12-1: normalized package name match | Ubuntu 24.04 LTS package indexes: vnstati from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | image output support for vnStat | https://humdi.net/vnstat/
- apk - vnstat - 2.13-r1: normalized package name match | Alpine Linux edge package indexes: vnstat from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Console-based network traffic monitor | https://humdi.net/vnstat
- apk - vnstat-doc - 2.13-r1: normalized package name match | Alpine Linux edge package indexes: vnstat-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Console-based network traffic monitor (documentation) | https://humdi.net/vnstat
- apk - vnstat-openrc - 2.13-r1: normalized package name match | Alpine Linux edge package indexes: vnstat-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Console-based network traffic monitor (OpenRC init scripts) | https://humdi.net/vnstat
- apk - vnstat-systemd - 2.13-r1: normalized package name match | Alpine Linux edge package indexes: vnstat-systemd from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Console-based network traffic monitor (systemd files) | https://humdi.net/vnstat
- dnf - vnstat - 2.13-2.fc44: normalized package name match | Fedora Rawhide package metadata: vnstat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Console-based network traffic monitor | http://humdi.net/vnstat/
- dnf - vnstat-vnstati - 2.13-2.fc44: normalized package name match | Fedora Rawhide package metadata: vnstat-vnstati from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Image output support for vnstat | http://humdi.net/vnstat/
- pacman - vnstat - 2.13-2: normalized package name match | Arch Linux sync databases: vnstat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A console-based network traffic monitor | https://humdi.net/vnstat/
- zypper - vnstat - 2.13-1.4: normalized package name match | openSUSE Tumbleweed package metadata: vnstat from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Network Traffic Monitor | https://humdi.net/vnstat
- zypper - vnstat-cgi - 2.13-1.4: normalized package name match | openSUSE Tumbleweed package metadata: vnstat-cgi from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Graph Visualization CGI Script for vnstat | https://humdi.net/vnstat
- MacPorts - vnstat: normalized package name match | MacPorts ports tree: net/vnstat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [gd](https://www.automicvault.com/pkg/brew/gd/) - Runtime dependency declared by Homebrew.
- [nload](https://www.automicvault.com/pkg/brew/nload/) - Shares av.db curated category or tags: bandwidth, cli, console, monitoring, network-monitoring.
- [bwm-ng](https://www.automicvault.com/pkg/brew/bwm-ng/) - Shares av.db curated category or tags: bandwidth, cli, console, monitoring, network-monitoring.
- [bmon](https://www.automicvault.com/pkg/brew/bmon/) - Shares av.db curated category or tags: bandwidth, cli, monitoring, network-monitoring, networking.
- [ifstat](https://www.automicvault.com/pkg/brew/ifstat/) - Shares av.db curated category or tags: bandwidth, cli, monitoring, network-monitoring, networking.
- [iftop](https://www.automicvault.com/pkg/brew/iftop/) - Shares av.db curated category or tags: bandwidth, cli, monitoring, network-monitoring, networking.
- [mrtg](https://www.automicvault.com/pkg/brew/mrtg/) - Shares av.db curated category or tags: bandwidth, cli, monitoring, network-monitoring, networking.
- [nethogs](https://www.automicvault.com/pkg/brew/nethogs/) - Shares av.db curated category or tags: bandwidth, cli, monitoring, network-monitoring, networking.
- [dnstop](https://www.automicvault.com/pkg/brew/dnstop/) - Shares av.db curated category or tags: cli, console, monitoring, networking.

## Combined YAML source

View the package source record on GitHub. [combined/vnstat.yml](https://github.com/automic-vault/db/blob/main/combined/vnstat.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
