Obiz Solutions

What is GoAccess?

GoAccess is an open-source access log analyzer that reads log files directly (Apache, Nginx, CloudFront, or a custom format) and outputs a dashboard: top pages, unique visitors (estimated by IP), referrers, browser/OS breakdown, status codes, bandwidth… Unlike Google Analytics or Plausible, GoAccess runs no JS in the visitor’s browser — it works entirely from existing logs, so it has zero impact on page load and needs no cookie consent.

Why it fits a static site like this one

A site built with Astro and deployed via S3 + CloudFront is already optimized for “next to zero JS” — adding a tracking script like GA would work against that. GoAccess reads straight from CloudFront access logs (every request hitting the edge, see the AWS setup guide for how to enable them), with no extra code added to the site at all.

Install

# macOS
brew install goaccess

# Ubuntu/Debian
sudo apt install goaccess

Windows: there’s no native Windows build of GoAccess, so run it through WSL or Docker instead:

# Option 1 — WSL (recommended, full feature set, native Linux performance)
wsl --install                 # if WSL isn't installed yet
wsl -d Ubuntu                 # open an Ubuntu shell inside WSL
sudo apt update && sudo apt install goaccess   # run inside WSL

# Option 2 — Docker, no need to install WSL/goaccess directly
docker run --rm -v ${PWD}:/srv/data allinurl/goaccess `
  /srv/data/cf-logs/*.log -o /srv/data/report.html `
  --log-format=... --date-format=... --time-format=...

With WSL, every command later in this guide runs exactly as it would on Linux/macOS (from inside the WSL shell). With Docker, swap the log/report paths for their equivalents under /srv/data (mounted from the current directory).

Basic usage

For common standard log formats (Apache Combined, Nginx…), GoAccess ships with built-in presets:

goaccess access.log --log-format=COMBINED -o report.html

Open report.html for an interactive dashboard right away (filter by date, drill into any section).

Reading CloudFront logs

CloudFront logs don’t match a built-in preset once you select the full field set (33 fields by default — see the Setup and deploy guide), so a custom --log-format is needed, with %^ skipping each field not used:

# pull the logs down from S3 first
aws s3 sync s3://YOUR_BUCKET-logs/cf-logs/ ./cf-logs/

goaccess cf-logs/*.log \
  --log-format='%d\t%t\t%^\t%b\t%h\t%m\t%^\t%U\t%s\t%R\t%u\t%q\t%^\t%^\t%^\t%^\t%^\t%^\t%T\t%^\t%^\t%^\t%^\t%^\t%^\t%^\t%^\t%^\t%^\t%^\t%^\t%^\t%^' \
  --date-format='%Y-%m-%d' --time-format='%H:%M:%S' \
  -o report.html

Terminal mode vs. HTML report

Besides writing an HTML file (-o report.html), GoAccess can also run directly in the terminal as a live dashboard — handy for a quick look without opening a browser:

goaccess cf-logs/*.log --log-format=... # (no -o)

To keep the dashboard current (e.g. daily), put the sync + goaccess commands above in a cron job that overwrites report.html.

When to reach for GoAccess

  • A static site that shouldn’t add JS tracking (keeps the “zero JS” philosophy of Astro/static sites intact)
  • Access logs already exist (CloudFront, Nginx, Apache…) — GoAccess reuses them, no new infrastructure needed
  • Fine with a dashboard that isn’t perfectly real-time (depends on how often CloudFront delivers logs, usually every few dozen minutes)

Not a fit if detailed behavior tracking is needed (funnels, event tracking, heatmaps) — a client-side tool like Plausible/GA is still necessary for that.

Further reading

Official docs: goaccess.io