Gnat - Self-Hosted Analytics

Gnat - Self-Hosted Analytics

โ—2 โ—10 โ—27
calendar_today โ€ข schedule2 min read

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

Want more #mcp & #golang deep dives?

Join 6,119+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

AAIF Hits 10 Projects. Its CTO on What to Adopt Now and the Security Gaps Left Open

Tom Smithverified - Oct 23

The Sovereign Vault โ€” A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4

Stop Turning Every REST Endpoint into an MCP Tool: A Better Approach to AI Tool Design

zeekwrites - Nov 30

CData's New AI Gateway Puts Context at the Center โ€” Fixes the Three Reasons Enterprise AI Stalls

Tom Smithverified - Sep 28

MCP Is the USB-C of AI. So Why Are You Plugging Everything In?

Ken W. Algerverified - Jun 10
chevron_left
472 Points โ€ข 39 Badges
9Posts
5Comments
9Connections
Full-stack generalist. Shipped 7 SaaS products, currently building Quorel because I got tired of scr... Show more

Related Jobs

Commenters (This Week)

2 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!