Goatcounter is a great pick for minimal analytics. A few things I wish I’d known before deploying it:
-
It’s a single Go binary — no database server needed. SQLite is fully supported and plenty for small/medium sites. Backup = copy one file.
-
Run it behind a reverse proxy with a dedicated subdomain (e.g. stats.example.com) and keep it on its own system user. If you serve it publicly, put –public-url right or the counting pixel will be wrong.
-
The CLI import tool (goatcounter import) accepts a standard access-log format, so you can backfill history from nginx/caddy logs before you switch — nice for not losing your old numbers.
-
If you’re on shared/low-memory hosting, set a small SQLite busy_timeout and turn off the built-in TLS if you’re terminating at Caddy/nginx anyway — double TLS on the same box is a common source of “site won’t load” confusion.
-
Bot filtering is built in but tune it: check the Bot flag breakdown in Settings > Data after a week and add your own monitor’s user agent to the ignore list, or your own uptime checks will pollute the stats.
Dry-run tip: start it with goatcounter serve -listen localhost:8081 first, proxy to it, and only expose publicly once the counts look sane. Have fun — it’s genuinely one of the least fussy self-hosted apps out there.