A few months back I was crawling the web for a side project and came across an analytics platform's data that had exposed users' raw IPs. It wasn't malicious, just careless. But it stuck with me: most people using these tools have no idea their visitors' data is sitting around like that.
That's the moment that pushed me to build Gnat, a self-hosted analytics tool that doesn't cut corners on privacy, but also doesn't force you into a painful setup to get it.
No third party, no phoning home
Gnat runs entirely on infrastructure you control. No third party in the loop, no API calling home anywhere, no data leaving your server. Completely free and open source.
One binary, zero bloat
Most self-hosted analytics tools make you choose: something lightweight with barely any real analysis, or something with real depth that also means Docker, a multi-service stack, and its own ops burden.
Gnat is a single Go binary. No CGO, no Docker, no multi-service stack. The dashboard is compiled straight into the executable.
tar xzf gnat-vX.Y.Z-linux-amd64.tar.gz
cd gnat-vX.Y.Z-linux-amd64
./gnat
That's the whole install.
Live demo: https://gnat-np2m.onrender.com/dashboard (password: vJzTMw0bjTtWHyNpBCPGaZqE, feel free to poke around, it's a shared demo instance so please be gentle with it)
Visit my portfolio here and see it appear on the analytics dashboard https://var-raphael.vercel.app
Real analytical depth
- Pageviews and custom events via JSON POST, no per-language SDKs
- Funnels, cohorts, retention curves
- Auto-discovered path analysis
- SQLite by default, or Postgres/MySQL if that's how you already run infrastructure
- CSV, JSON, and raw SQL export, it's your data
Built for the agent era
Gnat ships with a native MCP server. Claude or any MCP-compatible agent can query your analytics directly, no separate API glue.
Where it's at
Early days, v0.1.0, and I'm actively building on it. Multi-site support, SSO/team access, and managed hosting are on the roadmap but not built yet.
Licensed under AGPLv3, free to self-host and modify for any purpose, including commercially, but if you run a modified version as a service for others, the source has to stay open under the same terms.
I'd love feedback, issues, and contributors, especially if you've felt the same Docker-and-multi-service fatigue trying to self-host analytics.
Repo: https://github.com/var-raphael/Gnat