{
  "id": 8803966,
  "title": "Bot-free self-hosted analytics with GoatCounter on NixOS",
  "url": "https://urgent.news/2026/09/20/bot-free-self-hosted-analytics-with-goatcounter-on-nixos",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-20T22:51:03.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://vincent.bernat.ch/en/blog/2026-goatcounter"
  },
  "original_language": "en",
  "account": "In 2016, the author removed Google Analytics from their blog to protect personal data, relying on GoAccess to analyze server logs. After a couple of years, the statistics became inaccurate due to AI scrapers inflating visitor numbers. The author then switched to GoatCounter, an open-source, privacy-friendly web analytics platform. To filter bots more aggressively, they implemented a function that requires user interaction and use a CSS fallback for browsers with JavaScript disabled. With a single binary and an SQLite database, GoatCounter is lightweight and privacy-friendly, among alternatives like Umami, Plausible, and Rybbit. The author replaced the JavaScript client with a short function to register hits, increasing accuracy by capturing fewer than 200 human visitors daily. Five web servers across Europe and North America serve the blog, but GoatCounter runs on only one of them. A local proxy on each server stores hits in memory and sends them to the upstream backend, ensuring accurate visitor tracking even if GoatCounter is down. The author chooses to expose the proxy endpoint on their website's domain to evade ad blockers, acknowledging that privacy-friendly services like GoatCounter are acceptable in this regard. The author runs their servers on NixOS, a Linux distribution with built-in configuration management, and deploys GoatCounter using Colmena, a stateless deployment tool for NixOS. Each container runs a stripped-down NixOS instance, with persistent data stored on the host. A NixOS module encapsulates GoatCounter's configuration, service definition, and secrets, allowing the author to customize GoatCounter while maintaining flexibility for future changes.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}