Self-hosted Google Analytics alternatives: choosing and deploying Umami or Plausible
Compare Umami and Plausible, two open-source, cookie-free web analytics tools, then deploy one on your own server with Zenavo, secure the first account, add the tracking script, check the data and back it up.
This post is also available in 简体中文, 繁體中文, 日本語, Español and Bahasa Indonesia.
Most sites want a few answers: how many visitors came today, where from, and which pages they read. Google Analytics answers them, but it's complex to set up, the data lives with a third party, and it usually comes with a cookie banner.
Umami and Plausible are open-source web analytics tools with clean dashboards. They use no cookies by default and keep the data in your own database. Zenavo has a template for each, so either runs on a server you rent or own within minutes.
Pick one
| Umami | Plausible Community Edition | |
|---|---|---|
| Services | Umami + PostgreSQL | Plausible + PostgreSQL + ClickHouse |
| Memory | Small; shares a small server with other apps | The template asks for about 2 GB |
| Good for | Personal sites, several small sites, least upkeep | Higher traffic, or if you like Plausible's reports |
| First sign-in | A default admin account; change its password at once | Register the first account |
| Not needed | Needed (SMTP) for invites and password resets |
If in doubt, start with Umami: it's lighter, and backing it up or moving it involves a single PostgreSQL. Consider ClickHouse-based Plausible when traffic outgrows PostgreSQL.
Neither uses cookies, but whether you still need a privacy notice or consent depends on your local law and what you collect; check for yourself. Some ad blockers block these scripts too, so counts run a little below real visits.
Deploy Umami
Connect a Linux server to Zenavo, open the Umami template, choose the server and deploy. It creates two services:
- postgresql: PostgreSQL 17, data in a
/var/lib/postgresql/datavolume, password generated; - umami:
ghcr.io/umami-software/umami:postgresql-lateston HTTP port3000, connected throughDATABASE_URL, with a generatedAPP_SECRET.
On the umami service's Networking tab, bind a domain such as stats.example.com to port 3000, set up DNS and wait for HTTPS (Domains & HTTPS).
Sign in as soon as the domain works. Umami's default admin is admin with the password umami. Change it right away under Settings → Profile, and turn on two-factor authentication under Security. Until you do, anyone who finds the address can sign in with the default password.
Then add your site under Settings → Websites and copy the tracking code it shows.
Deploy Plausible
Open the Plausible template. Before deploying, it asks for the Site URL: the full address you will open Plausible at, such as https://stats.example.com. It creates three services:
- postgresql: accounts and site settings;
- clickhouse: the visit events, with threads and logs turned down for small servers;
- plausible: Community Edition
v3.1.0on HTTP port8000, which creates and migrates its databases on start.
After deploying, bind the same domain to the plausible service. If the Site URL and the domain differ, sign-in and the script address break; to change the address, edit the BASE_URL variable and redeploy.
ClickHouse needs a CPU with SSE 4.2 (x86) or NEON (ARM). Common cloud servers have it; very old machines may fail to start it.
Open the site and register the first account. Plausible CE defaults to DISABLE_REGISTRATION=invite_only: after the first account, people join only by invitation.
Invitations and password resets need email. Add SMTP settings to the plausible service's Variables, such as MAILER_EMAIL, SMTP_HOST_ADDR, SMTP_HOST_PORT, SMTP_USER_NAME and SMTP_USER_PWD, then redeploy. Plausible's configuration page explains each one. Keep the SMTP password in the variables only, never in a repository.
Once signed in, click Add a website, enter the domain to track, and copy the tracking code it shows.
Install the script and check it works
Put the copied <script> in the <head> of every page. In Next.js, Vue and similar frameworks, add it to the shared layout; in WordPress, Ghost and other CMSs, use the theme's or site's header code setting.
Open your site on a phone or in a private window. The visit should appear within seconds in Umami's Realtime view or Plausible's current visitors. If nothing shows up:
- check in the browser's developer tools Network panel that the script request returns 200;
- try again with ad blockers off;
- make sure the site's domain matches the website added in Umami or Plausible.
Back up
All the stats live in databases. For Umami, back up the postgresql service. For Plausible, accounts are in postgresql and visit events in clickhouse's volume; keep both.
Back up PostgreSQL directly from the database service's Backup & Restore tab. ClickHouse is a volume, so stop the project while backing it up. For data that matters, download a backup to keep, and restore it once into a new project to be sure it works. See Backup & Restore.
FAQ
Can I import my Google Analytics history?
Plausible CE can import Google Analytics 4 history once you create OAuth credentials in Google Cloud and add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to the plausible service's variables; see Plausible's import guide. For Umami, check its current documentation.
Can one Umami track several sites? Yes. Add each site under Websites; each gets its own tracking code.
If analytics goes down, does my site break? No. A script that fails to load doesn't stop the page; visits during that time just aren't counted.
Plausible never finishes starting? Look at the clickhouse and plausible services' logs. Usually the server is short of memory, or its CPU lacks the instructions ClickHouse needs.
Start from the Umami template or the Plausible template: secure the admin account first, then install the script, confirm data arrives, and back it up.
This is what coding agents read, at https://zenavo.app/blog/umami-vs-plausible.md.
Could not load the Markdown. Open it directly: https://zenavo.app/blog/umami-vs-plausible.md