Self-hosting is an ops decision
Every tool here is open source and self-hostable, so the question isn’t whether you can own your data; it’s what running the tool costs you in operations, and what the free build gives you. Weigh four things:
- Footprint: how many services you have to stand up and keep alive.
- Infrastructure: a lightweight script and one database, or a columnar event store and a queue.
- Maintenance: updates, backups, and scaling as your volume grows.
- Edition: which features, SSO among them, the free self-hosted build leaves out.
We build Pug, so it is listed first, and its entries say what it needs and what it lacks. This roundup focuses on the self-hosting experience. For a feature-by-feature look at what each tool measures, see the best open source analytics tools.
What it takes to run
| Tool | What you run | Memory | Install |
|---|---|---|---|
| Pug | One Go binary and a static dashboard, on PostgreSQL 15+, ClickHouse, NATS JetStream, and Dragonfly or Redis 7+ | Ballparks: 10 GB for dev or staging; ClickHouse 16 GB and PostgreSQL 8 GB for small production | pug start on one node; binaries or GHCR images in production |
| PostHog | Web, worker and plugin containers, on ClickHouse, Kafka, ZooKeeper, PostgreSQL, Redis, MinIO and Caddy | 16 GB | A Docker Compose script; no new Kubernetes deployments |
| GoatCounter | One static binary, on SQLite or PostgreSQL | Not documented | A prebuilt binary, Docker or Docker Compose |
| Umami | A Node.js 20.19+ app, on PostgreSQL 12.14+ | Not documented | Docker, Docker Compose, a pnpm build or a third-party Helm chart |
| Plausible | The app, on PostgreSQL and ClickHouse; the CPU needs SSE 4.2 or NEON | At least 2 GB | Docker Compose |
| Rybbit | A Next.js client and a Node.js backend, on PostgreSQL, ClickHouse and Redis, with Caddy optional | At least 2 GB | A setup script, or Docker Compose by hand |
| Matomo | Matomo 6 on PHP 8.1+ and a web server, with MySQL 8.0+ or MariaDB 10.6+ | 2 GB up to 100k page views a month; 8 GB up to 1M | The release zip and its web installer, or Docker |
Free builds and prices compared
| Tool | License | Free build leaves out | SSO on your servers | Hosted instead |
|---|---|---|---|---|
| Pug | AGPL-3.0 | Nothing: no plans or limits | Google Workspace or OIDC, free; no SAML | 100k events a month free, then $1 a month plus $20 per million, falling with volume |
| PostHog | MIT, except ee/ | Every paid-plan feature, and support | GitHub and GitLab; no Google, and SAML needs an enterprise license | 1M analytics events a month free, then $0.00005 an event |
| GoatCounter | EUPL 1.2, slightly modified | Nothing, per its README | None documented | Free for reasonable public use; no paid plan |
| Umami | MIT | Email reports and the streaming API | None documented; SAML SSO is on Cloud Enterprise | 100k events a month free; Pro is $20 a month with 1M |
| Plausible | AGPL-3.0 or later | Funnels, user journeys, ecommerce revenue goals and the sites API; two releases a year | Not in the Community Edition | From $9 a month for 10k pageviews, after a 30-day trial |
| Rybbit | AGPL-3.0 | Web Vitals (Cloud only) | None documented; SSO is on Cloud Enterprise | From $13 a month billed yearly for 100k pageviews, after a 7-day trial |
| Matomo | GPL v3 or later | Funnels, heatmaps and A/B tests, as paid plugins; bundles from €230 a month billed yearly | Login SAML plugin at US$2,669 a year, or the Enterprise bundle | From €22 a month for 50,000 hits |
Product analytics: heavier, but behavioral
Pug
Open-source (AGPL-3.0) product analytics with unified profiles and autocapture, built to be self-hosted. There are
two deployables: the pug Go binary (the API server, every worker, migrations and the CLI) and the
dashboard, which is static files. They need four stores you may already run, or managed equivalents: PostgreSQL
15+, ClickHouse, NATS JetStream, and Dragonfly or any Redis 7+. pug start runs the server and every
worker in one process on a small node; in production each role is its own container image on GHCR, for amd64 and
arm64, on a VM, a container platform or Kubernetes. The SDKs (Web, Android, iOS, Flutter, Node, Go and Ruby) need one
option, endpoint, to point at your server.
A self-hosted server has no plans or limits. SSO through Google Workspace or your own OIDC provider (Okta, Entra ID,
Keycloak) works on it, it serves its own MCP endpoint at /mcp, and the Web SDK defaults to cookieless
tracking, so no identifier is stored on the device until a visitor consents. It has no session replay, feature
flags, experiments or surveys. If you’d rather not run it, Pug Cloud runs the same code, and a month of 1M events
costs $19.00 there. Best for: product analytics you own without service sprawl.
See self-hosted product analytics with Pug, the
setup guide and
Pug’s self-hosting requirements.
PostHog
Open source (MIT outside its ee/ directory) and very broad: analytics, replay, flags, experiments. The
catch for self-hosters is in PostHog’s own self-hosting docs. They
offer no customer support and no guarantees for self-hosted instances, keep every paid-plan feature on PostHog
Cloud, and no longer support new Kubernetes deployments, which leaves the Docker Compose “hobby” deploy, sized at 4
vCPUs, 16GB of RAM and more than 30GB of storage. Its
open-source disclaimer recommends PostHog
Cloud for most companies and says the single-machine deploy is unlikely to scale past a couple hundred thousand
events without significant effort. Best for: teams that want breadth and will accept the ops. Details:
PostHog alternative, or
the best PostHog alternatives product by product.
Web analytics: lightest to run
GoatCounter
Web analytics in one statically compiled binary, under a slightly modified EUPL 1.2 (GoatCounter’s license). Its only dependency is somewhere to store a SQLite file or a PostgreSQL connection: SQLite works for most smaller sites, PostgreSQL performs better on larger ones, and the README puts the bottleneck in how many different pages the views spread over, not how many views there are (GoatCounter’s README). It counts unique visits without cookies or persistently stored personal data, and reports browsers, locations, screen sizes, referrers and campaigns. There is no paid edition: goatcounter.com is free for reasonable public use and funded by donations (GoatCounter’s pricing). Best for: pageview counts with the smallest stack here.
Umami
A cookieless web-analytics tool on Node.js and one PostgreSQL database (Umami’s install docs): two services, one of the smallest stacks here. Funnels, journeys and retention are in the self-hosted build, session replays (v3.1) and heatmaps (v3.2) come to self-hosted installs as well as Cloud, and a read-only MCP server ships from v3.4, off by default (Umami Cloud vs self-hosted). Best for: a minimal, low-maintenance traffic dashboard. If you outgrow it, see Umami vs product analytics.
Plausible
Cookieless web analytics with a light script. The Community Edition runs from a Docker Compose file with PostgreSQL and ClickHouse, and its README recommends at least 2 GB of RAM (Plausible Community Edition): a bit more to run than Umami, and still modest. It comes with basic bot filtering and without premium support (Plausible’s self-hosting page). Best for: clean traffic analytics without cookie banners. Compare it as a Plausible alternative.
Rybbit
Cookieless web analytics under AGPL-3.0 (Rybbit’s license) with funnels, goals, journeys, retention and session replays on top; Web Vitals are the one feature its README marks Cloud only (Rybbit’s README). A setup script starts it with Docker Compose: a Next.js client, a Node.js backend, PostgreSQL, ClickHouse and Redis, plus Caddy if you want it to terminate TLS. The guide asks for at least 2GB of RAM, and an ARM server must be ARMv8.2-A or newer for ClickHouse (Rybbit’s self-hosting docs, manual setup). Best for: web analytics with funnels and replays, if you’ll run a ClickHouse stack for it.
Matomo
The fullest open-source web analytics platform and the closest to Google Analytics, on PHP with MySQL or MariaDB (Matomo’s requirements). More capability means more to operate. Its MCP server is a free plugin, off until an administrator enables it (Matomo’s MCP plugin), and its AI Chatbots reports, which count AI chatbot requests through server-side integrations for Cloudflare, Amazon CloudFront and WordPress, need the BotTracking plugin activated when you self-host (Matomo’s AI Chatbots docs). Best for: a complete GA replacement for web and marketing. See the Matomo alternative.
How to choose
If you only need website traffic, the lightest tools (GoatCounter, Umami, Plausible) are the easiest to run; Rybbit adds funnels and replays on a ClickHouse stack, and Matomo is the fullest GA replacement if you accept more ops and paid plugins. If you need product behavior (funnels, retention, and a profile per person), you’re into product analytics, where the event store makes the stack heavier. There, the difference is the edition: PostHog keeps its paid features on its cloud, and Pug’s free build has all of them. Whatever you choose, self-hosting keeps every event on your own infrastructure. If you’re moving off Google, our how to replace Google Analytics 4 guide walks through it.