Why Self-Host Your Web Analytics
Mainstream analytics solutions collect your visitors' data en masse, force a cookie banner, and send everything to third-party servers. Plausible and Umami flip this model: no cookies, no personal data, a lightweight script (under 2 KB), and native GDPR compliance. By self-hosting them on your VPS, you keep 100% of your audience data on your server, you eliminate the dependency on an external service, and you avoid being blocked by ad-blockers by serving the script from your own domain. Plausible is built on Elixir and ClickHouse, a column-oriented database designed for analytics, which makes it very fast but more resource-hungry. Umami, written in Next.js with PostgreSQL or MySQL, is ultra-lightweight and ideal for starting small.
The Benefits of Self-Hosted Analytics
- No cookie banner to display: collection without personal data, GDPR-compliant by default.
- Audience data stored exclusively on your VPS, never shared with a third party.
- Script served from your own domain: a natural way around ad-blockers.
- A tiny tracking script that doesn't slow down your pages' load time.
- Unlimited tracking of sites and page views with no volume-based billing.
- A clean dashboard that can be shared publicly via a link if desired.
| Criterion | Plausible | Umami |
|---|---|---|
| Tech stack | Elixir + ClickHouse | Next.js + PostgreSQL/MySQL |
| Resource footprint | Heavier (ClickHouse) | Very light |
| Recommended RAM | 2 GB minimum | 512 MB to 1 GB |
| Analysis depth | Goals, funnels, UTM campaigns | Essential metrics, custom events |
| Multi-site / multi-user | Yes, team management | Yes, account management |
| Script size | < 1 KB | < 2 KB |
| Ease of deployment | Composed stack (app + ClickHouse + Postgres) | Two containers (app + database) |
| Target profile | In-depth marketing analysis | Simple, frugal start |
Prerequisites by Tool
Self-hosted Plausible (Community Edition) bundles ClickHouse on top of PostgreSQL: plan for a VPS with at least 2 vCPUs and 2 GB of RAM, plus 10 GB of disk, since ClickHouse consumes space as event volume grows. Umami is far more frugal: 1 vCPU and 1 GB of RAM, with a simple PostgreSQL or MySQL database, are enough to track several sites. Both require Docker Compose v2, a dedicated subdomain (stats.mydomain.com), and an HTTPS reverse proxy, since the tracking script must be served over HTTPS to work on secure sites.
Deploy Plausible (or Umami) on a VPS
Get the Stack and the Variables
For Plausible: git clone https://github.com/plausible/community-edition, then configure the .env file (BASE_URL, SECRET_KEY_BASE generated with openssl rand -base64 48). For Umami, start from the official docker-compose.yml.
Declare the Databases
Plausible requires both PostgreSQL and ClickHouse: declare both services with persistent volumes. Umami only needs a postgres:16 (or MySQL) and passes the URL via DATABASE_URL.
Configure the Public Domain
Set BASE_URL=https://stats.mydomain.com for Plausible, or the app variables for Umami. This URL is used to generate the tracking snippet you paste onto your sites.
Launch the Stack
Run docker compose up -d. Plausible applies its migrations at startup; check docker compose logs -f. Umami creates the schema automatically and exposes port 3000.
Reverse Proxy, HTTPS, and First Account
Route stats.mydomain.com through Caddy/Traefik with Let's Encrypt. Log in (change the default admin account immediately for Umami), create a site, and grab the <script> snippet to embed in the <head> of your pages.
To get around ad-blockers that target well-known file names, serve the tracking script through a proxy on your own domain (a neutral sub-path like /js/script.js) rather than from an identifiable analytics domain: because the script is first-party, it slips past filter lists. On the Plausible side, keep an eye on the size of ClickHouse partitions on high-traffic sites and plan a retention policy; on the Umami side, a simple scheduled pg_dump is enough to secure your entire audience history.