Post

Bot-free self-hosted analytics with GoatCounter on NixOS

Vincent Bernat describes a privacy-oriented analytics deployment that cuts bot noise without cookies or stored IP addresses, then packages the whole setup as NixOS modules across five servers.

The design uses a custom GoatCounter client that records a hit only after user interaction, a CSS fallback for JavaScript-disabled readers, local proxies that buffer and batch events, systemd-nspawn containers, Colmena deployment, and Litestream backups for the SQLite database. The result counted fewer than 200 humans per day where GoAccess reported roughly 2,000 crawler-heavy visits. The trade-off is deliberate: interaction-based filtering also omits RSS readers and can be bypassed by sophisticated browsers.

The Lobsters discussion had one useful wrinkle: the author notes that EasyPrivacy blocks hosted GoatCounter, prompting the question of whether hiding the tracker endpoint is acceptable even when the analytics are privacy-friendly.