Umami Cloud is hosted Umami, and Umami is MIT-licensed, so the cheapest replacement is running the same software on your own server. Building your own is realistic too: a cookie-free tracker, a collect endpoint and a dashboard over SQLite fit in one sitting. What the subscription buys is a server you never have to look after, plus email reports, the streaming API and, on Business, session replays and heatmaps.
Before you buildUmami Cloud's Hobby plan is free for one site up to 100K events a month, and self-hosting the real Umami is free and quicker than building. Build only if you want something smaller you fully understand.
Build me a small self-hosted web analytics service to replace Umami Cloud.
Requirements:
- Node.js 22 + TypeScript, one Fastify process on port 4300; events in
better-sqlite3 at ./data/analytics.db, indexed on (site_id, ts).
- Tracker: /script.js under 2 KB, no cookies, sent with navigator.sendBeacon.
Count a pageview on load and on history.pushState and popstate (single-page
apps), plus custom events via window.track("signup", { plan: "pro" }).
- Collect endpoint POST /api/send with CORS limited to each site's domains. Drop
bots with isbot, read browser, OS and device with ua-parser-js, keep referrer
host and UTM tags. A visitor is a SHA-256 of a daily salt + site + IP + user
agent; the salt rotates at midnight UTC and raw IPs are never stored.
- Country from a local GeoLite2 file via @maxmind/geoip2-node (license key in
.env); without a key, leave country empty.
- Dashboard at /: visitors, pageviews, bounce rate and visit duration for today,
7, 30 and 90 days; a uPlot chart; top pages, referrers, countries, browsers,
devices, UTM campaigns and custom events, each clickable as a filter.
- Several sites with their own snippet. The dashboard sits behind one password
(argon2 hash in .env); an optional read-only share link per site.
- A daily job deletes events older than RETENTION_DAYS (default 730).
- No accounts beyond that password, no telemetry; my server, my data.
- Out of scope: session replay, heatmaps, funnels and team roles.
- README: Docker Compose with Caddy for HTTPS on a small VPS, the snippet tag,
and how to back up the SQLite file.Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Umami Cloud.
Add a weekly email report to the analytics service in this folder. Requirements: - Every Monday at 08:00 server time, send one email per site with last week's visitors, pageviews, top 5 pages and top 5 referrers, each with the change against the week before. - Send with nodemailer through SMTP settings in .env; plain HTML, no images. - A /reports page previews the email and has a Send now button. - Update the README.
Add an importer for Umami Cloud exports to the analytics service in this folder. Requirements: - Accept the gzip-compressed CSV files from Umami Cloud's Settings > Data > Export (one website per export). - Read each file's header first, show me the column mapping and ask before importing; decompress with node:zlib and stream rows, never load a whole file into memory. - Map pageviews and custom events onto the existing tables under a site I choose; keep timestamps in UTC. - Running it twice must not duplicate rows. - Update the README with the export steps.
Add goals and funnels to the analytics service in this folder. Requirements: - A goal is a page path pattern or a custom event name; show daily conversions and conversion rate per goal. - A funnel is 2-5 ordered goals; count visitors (by the daily visitor hash) who reach each step on the same day and show the drop-off between steps. - Say in the UI that daily-rotating hashes mean a funnel can't span days. - Update the README.
The software is free, so the bill is for not running a server: someone else handles uptime, upgrades, a growing database and backups. Hobby is free, so most people only start paying when traffic, retention or a team outgrows it.
Estimate · Free on a server you already run; otherwise a small VPS at about $4-6 a month. GeoLite2 is free with a MaxMind account. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Hobby | $0 | $0 | 100K events a month, 1 website, 6 months of data, community support; no API, data import or email reports. |
| Pro | $20 | — | 1 million events a month, then $0.00003 per event; up to 20 websites and 10 team members; 2 years of data; API, MCP and email reports. |
| Business | $200 | — | 10 million events a month, then $0.00002 per event; unlimited websites and members; 5 years of data; 5,000 session replays, heatmaps, white-labeling, streaming API. |
| Enterprise | custom | — | SAML SSO, uptime SLA, audit log, custom retention, invoice billing. |
Hobby is free for one website up to 100K events a month, with 6 months of data.
Yes. An AI coding agent such as Claude Code, Codex or Cursor can build a usable personal version in one session with the prompt on this page, running on your own machine.
About $20 a month on the Pro plan, $240 a year (checked 2026-10-13).
Hosting, upgrades and backups handled for you; Email reports and the streaming API, which are Cloud-only; Session replays and heatmaps on Business; Funnels, retention, journeys and attribution reports; Servers in the US and EU with GDPR and CCPA compliance already sorted. If any of those matter to you, keep paying.
Yes: Umami (self-hosted) (open source), Plausible Community Edition (open source), GoatCounter (open source).