Umami: Self-Hosted Analytics That Respects Your Readers
Google Analytics gives you 400 reports, 90% of which you will never open. Umami gives you one dashboard with everything that matters: pageviews, referrers, devices, and countries. One Docker container, one Postgres database, zero tracking cookies.
If you're running a blog or a product site and the extent of your analytics needs is "how many people read this and where did they come from," Umami does that without the compliance overhead, the performance hit, or the $0-to-suddenly-$50/month pricing trajectory of managed alternatives.
The Google Analytics Problem
Google Analytics 4 is a powerful tool built for marketing teams at mid-size companies. It tracks user journeys across multiple touchpoints, builds audience segments for ad targeting, and generates attribution models across channels. If you're spending $50K/month on Google Ads and need to justify the spend, GA4 is the right tool.
If you're a solo builder with a blog and a landing page, GA4 is a surveillance system pointed at your readers for Google's benefit, not yours.
The tracking script is ~45KB. It sets cookies. It requires a GDPR consent banner in the EU, a CCPA notice in California, and similar disclosures in a growing list of jurisdictions. Every one of those banners degrades the reading experience and introduces legal exposure you didn't need.
And the data flows to Google, where it feeds their advertising models. Your readers' behavior becomes Google's training data. That tradeoff made sense in 2010 when there were no alternatives. It doesn't make sense now.
What Umami Does
Umami is an open-source, privacy-focused analytics platform. The entire thing runs in a single Docker container backed by Postgres or MySQL. The tracking script is under 2KB. It collects no personal data, sets no cookies, and stores everything in your own database.
The dashboard shows you:
- Pageviews and unique visitors: By day, week, month, or custom range
- Referrers: Where your traffic comes from, with actual URLs
- Pages: Which posts get read, sorted by views
- Devices and browsers: Desktop vs mobile, Chrome vs Safari vs Firefox
- Countries and languages: Geographic distribution of your audience
- Events: Custom tracking for button clicks, form submissions, whatever you wire up
That's it. There's no funnel analysis, no cohort builder, no multi-touch attribution model. For a solo builder publishing content and shipping products, these six categories cover every question you'd actually ask.
Installation
Umami runs as a Docker container alongside a Postgres database. If you're already running Postgres for other things, Umami just connects to it. If not, a docker-compose file handles both.
Create a docker-compose.yml:
version: '3'
services:
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://umami:your-secure-password@db:5432/umami
APP_SECRET: replace-me-with-a-random-string
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: your-secure-password
volumes:
- umami-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U umami"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
umami-db:
Then:
docker compose up -d
Umami is now running on port 3000. Default login is admin / umami. Change that immediately.
Add the tracking script to your site's <head> tag. Umami generates the snippet for you in the dashboard under Settings > Websites > Edit > Tracking Code. It looks like this:
<script defer src="https://your-umami-domain.com/script.js"
data-website-id="your-website-id"></script>
One line. Under 2KB loaded. No cookies set.
The Gotcha
Umami counts unique visitors using a hash of the IP address, user agent, and website ID, regenerated daily. This means the same person visiting on Monday and Tuesday counts as two unique visitors. For daily metrics, the numbers are accurate. For weekly or monthly uniques, they're inflated compared to what a cookie-based system would report.
This is the fundamental tradeoff of cookieless analytics. You get privacy compliance without banners, but you lose precise user-level tracking across sessions. For a content site, this tradeoff is almost always worth it. You care about trends and relative performance, not whether visitor #4,827 came back on Thursday.
The other gotcha: ad blockers. Umami's default script path (/script.js) gets caught by some ad blocker lists. The fix is to proxy the script through your own domain using a reverse proxy rule or Umami's built-in TRACKER_SCRIPT_NAME environment variable:
environment:
TRACKER_SCRIPT_NAME: custom-name
This changes the script filename to something ad blockers don't recognize. It won't catch every blocker, but it recovers a meaningful percentage of blocked pageviews. In my experience, roughly 15-25% of technical audiences run ad blockers that would otherwise suppress analytics entirely.
Real-World Numbers
Running Umami alongside Postgres 16 on a Mac Mini M4:
- Container memory usage: ~80MB idle, ~120MB under normal traffic
- Database size after 30 days: ~15MB for a site doing 500-1,000 pageviews/day
- Script load time: Under 20ms from the same server
- Dashboard response: Instant for date ranges under 90 days
The resource footprint is negligible. This is a service you start once and forget about. I check the dashboard when I publish something new to see how it performs relative to other posts. That takes about 30 seconds.
Umami also exposes a REST API, which means you can pull your analytics data programmatically. If you want to build a custom dashboard, feed data into a spreadsheet, or trigger alerts when traffic spikes, the API gives you everything the web UI shows.
Umami vs the Alternatives
| Feature | Google Analytics | Umami | Plausible | Fathom |
|---|---|---|---|---|
| Price | Free (you are the product) | Free (self-hosted) | $9/mo or self-hosted | $15/mo |
| Cookies | Yes | No | No | No |
| GDPR banner needed | Yes | No | No | No |
| Self-hostable | No | Yes | Yes | No |
| Tracking script size | ~45KB | ~2KB | ~1KB | ~5KB |
| Dashboard complexity | High | Low | Low | Low |
| Data ownership | Google's servers | Your server | Your server or theirs | Their servers |
| API access | Yes (complex) | Yes (simple) | Yes | Yes |
Plausible is the closest competitor. It's also privacy-focused, also cookieless, and also available as a self-hosted option. The main differences: Plausible's managed tier starts at $9/month, and its self-hosted version requires more configuration. Umami's Docker setup is simpler out of the box. If you're already comfortable with Plausible, there's no compelling reason to switch. If you're starting fresh, Umami's zero-config Docker deployment is hard to beat.
Fathom is the polished commercial option. Good product, clean UI, but $15/month adds up across multiple sites, and you can't self-host. For a solo builder running three or four properties, that's $60/month for something Umami does for free on hardware you already own.
What You Give Up
Umami doesn't do conversion funnels. If you need to track a five-step signup flow and see where users drop off at each stage, you need something else. Umami's event tracking can approximate this, but it's manual and not nearly as polished as dedicated funnel tools.
Umami doesn't do real-time user session replay. You won't see heatmaps or screen recordings. If those matter to your product decisions, tools like Hotjar or FullStory serve that need.
Umami doesn't integrate with ad platforms. There's no Google Ads connector, no Facebook pixel equivalent, no attribution modeling. If paid acquisition is your growth channel, you need the tracking infrastructure those platforms require.
For content sites, landing pages, documentation, and product marketing pages where the question is "what's getting read and where do people come from," none of those gaps matter. You're measuring attention, not conversion pipelines.
Analytics for People Who Respect Their Readers
The analytics industry spent fifteen years convincing website owners that they needed to track everything. Every click, every scroll depth, every mouse movement, every cross-site journey. Most of that data sits in dashboards nobody opens, powering reports nobody reads, justifying ad spend on campaigns that may or may not work.
Umami represents the opposite philosophy. Track the minimum needed to make good decisions. Keep the data on your own server. Don't slow down your site. Don't make your readers dismiss a cookie banner before they can read the first paragraph.
One container. One database. No cookies, no banners, no monthly bill, no data leaving your infrastructure. The metrics you need, nothing you don't, running on hardware you already own.