Areas we serve

Self-Hosted GoatCounter: Simple Web Stats Without the GA4 Maze

Matomo has a setting for everything. Google Analytics has a product roadmap. Sometimes you just want to know which posts got traffic this week without exporting personal data to a ad-tech graph.

GoatCounter is the deliberately small answer. Built in Go by Martin Tournoij (arp242), ~6k GitHub stars, fully open source, and designed around one idea: meaningful stats without tracking people. You can pay for the hosted service at goatcounter.com or run the same code on your own server with no license games.

What it actually does

GoatCounter is page-view analytics, not a full marketing suite. Drop in a lightweight script (~3.5 KB), use a noscript pixel, hit the HTTP API from your app middleware, or import nginx/Apache/Caddy logs later. The dashboard shows paths, referrers, campaigns, browsers, locations, and screen sizes — enough to answer "is anyone reading this?" and "where did they come from?"

Privacy is structural, not a checkbox:

  • No persistent user IDs — unique visits use a salted hash, not cookies (see upstream's session docs if you need the nitty-gritty).
  • Configurable collection — turn off fields you do not want; many sites skip a cookie banner entirely when configured conservatively (still your lawyer's call).
  • Export everything — your SQLite or Postgres rows, your CSV, your decision to leave.

The UI is intentionally boring in a good way: accessible, screen-reader friendly, and free of the GA4 maze. Self-hosting is a single static binary (or Docker image arp242/goatcounter) with SQLite for small sites or PostgreSQL when page counts spread across many URLs.

Why self-host?

Data residency. Page paths and referrers can leak business strategy. Keeping the stats DB on a Canadian VPS next to your site is a clean PIPEDA story compared to default US analytics regions.

Independence. Hosted GoatCounter is generous; self-hosting means no plan change can take your history. Back up goatcounter-data or your Postgres volume like any other app DB.

Alignment with your stack. Same box that serves WordPress or static HTML can run stats.yourdomain.ca behind TLS. Built-in ACME support (goatcounter serve -tls=tls,rdr,acme) or put nginx in front on port 8080 — your call.

Complements log tools. We wrote about GoAccess for raw access logs; GoatCounter is the visitor-friendly layer when you want referrers and campaigns without parsing logs by hand. Some teams run both; some pick one.

What running it takes

Quick path: download a release binary, goatcounter serve, open the wizard on port 8080, create a site with goatcounter db create site -vhost=stats.example.com. Docker users mount a named volume (SQLite + ACME certs live there — do not use throwaway anonymous volumes).

Sizing notes from upstream:

  • SQLite is fine for personal blogs and small business sites.
  • Postgres when paths explode — millions of hits on five URLs is easy; millions of hits across a million unique paths stresses SQLite harder.
  • Updates — run migrations (-automigrate or goatcounter db migrate all) before you assume a binary swap is enough.

Health check endpoint: /status for your monitor. Lock down the admin UI; public counting endpoints are not a substitute for auth on settings.

Who it's for (and who should skip it)

Good fit: developers, bloggers, newsletters with a site, small shops that left GA and want something they can read the source of, privacy-conscious orgs that still need basic traffic charts.

Maybe skip it: if you need ecommerce funnels, ad conversion pixels, and CRM integrations, reach for a heavier platform (or accept SaaS). If you refuse any JavaScript and will not import logs, GoAccess alone may suffice. If you need multi-property enterprise rollups with SSO, GoatCounter will feel tiny — that is by design.

Hosting it in Canada

A 1–2 GB VPS with SQLite covers many Swift Host clients; busier multi-site setups get Postgres on the same host or a small managed DB. We help with TLS, subdomain DNS, and backups of the data directory.

Tell us your traffic ballpark and whether you want script, pixel, or log import if you want a stats subdomain wired without touching production WordPress.

Want analytics without the surveillance economy? Talk with Swift Host — we are in St. Albert and actually answer the phone.

Tags:
  • GoatCounter
  • Web Analytics
  • Privacy
  • Go
  • Self-Hosted
  • GDPR

Need Help With Your Hosting?

Tell us about your application — we respond within 1 hour with honest recommendations.