Gnat - Self-Hosted Analytics

Gnat - Self-Hosted Analytics

2 5 17
calendar_today agoschedule2 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

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

The Sovereign Vault — A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4

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

Ken W. Algerverified - Jun 10

Gnat, self-hosted analytics as a single Go binary, with a built-in MCP server

Raphael - Aug 14

Why Self-Hosted AI Workflow Automation Matters?

Med Marrouchi - Jun 26

A Love Story in Code: Building My Self-Hosted Photo Album

kitfu10 - Mar 20, 2025
chevron_left
397 Points24 Badges
6Posts
6Comments
1Connections
Full-stack generalist. Shipped 7 SaaS products, currently building Quorel because I got tired of scr... Show more

Related Jobs

View all jobs →

Commenters (This Week)

1 comment
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!