GoAccess for Mere Mortals
Every web server keeps a diary. Each time someone — or something — asks for a page, the server writes one line: the address that asked, the page it wanted, whether it got it, and what program it claimed to be. Left alone, that diary is a wall of near-identical lines nobody reads.
GoAccess reads the diary for you. It is a web log analyser: a program that takes a web server's access log and turns it into answers — which pages are popular, which are missing, where visitors came from, which browsers and bots called by, and how much data went out the door. It shows those answers three ways: as a live dashboard in your terminal, as a single self-contained web page you can save or share, and as JSON or CSV for other programs to eat.
One warning, early and plain, because the rest of this guide depends on it: a log line contains a visitor's IP address and the exact pages they read. That is personal data about real people. Analyse logs from servers you run, keep them no longer than you need them, and think before you share a report — the same courtesy you would want from every site that logs your visits.
The lab behind this guide stood up a real web server (nginx 1.24) on a loopback address, served a small invented site, and made twenty-seven real requests at it with three browsers' fingerprints, a phone's, a search bot's and a command-line tool's — including two pages that do not exist and one request the server refused. Then it ran GoAccess 1.8.1 over the resulting log every way the program offers: the terminal dashboard, an HTML report, JSON and CSV output, a custom log format spelled out by hand, a config file, subsets of the log, and the disk-persistence mode that lets reports accumulate across log rotations. Every number in this guide comes from that log, and the log itself is in the lab folder for you to check.
What the lab could not do, it did not
fake. GoAccess has a real-time mode that
updates a web page live over a WebSocket;
that needs a browser, and this lab had
none pointed at it, so that mode is
taught from the documentation and
labelled as such wherever it appears.
The same goes for GeoIP lookups, which
need a country database the lab did not
download. criteria.md keeps the full
ledger.
What this guide covers
- What GoAccess is — the diary, the questions it can answer, and the privacy line that comes with it
- The moving parts — the log, the parser, the panels, the three outputs, and the on-disk storage
- Installing GoAccess — the package install, the version check, and what the build options mean
- Your first report — the terminal dashboard over a real log, and how to read its panels without fooling yourself
- Log formats — presets like COMBINED, spelling a format out by hand, config files, and what a failed line looks like
- The HTML report — one file with everything in it, charts included, and how to check it says what the log said
- JSON and CSV output — reports for other programs: the panel structure, pretty printing, and reading the numbers back with Python
- Filtering and focusing — subsets of the log, excluding an address, hour-by-hour visitors, and the date-range flags GoAccess does not have
- Keeping history —
persistence across log rotations:
--persist,--restore, and the directory that must exist first - Real-time mode — the live WebSocket dashboard, documented rather than run, and how it differs from everything before it
- Recipes — a daily report habit, a missing-pages audit, a bot census, and a before/after comparison
- The neighbours — hosted analytics, the other log analysers, log managers, and grep by hand
- Limits — one log format at a time, visitors counted by fingerprint not by person, no date-range flags, and the rest, stated plainly
- Troubleshooting — the format that silently half-works, the database path that must exist, the 403 that was permissions, and more
- Glossary — the terms, collected in one place
What it doesn't cover
Running GoAccess against other people's servers or logs — the tool reads whatever file you hand it, and the ethics of that are yours to hold (chapter 1 draws the line this guide works to). Log shipping and long-term log storage are a different job; the Loki guide in this series covers a log manager, and chapter 11 explains where the boundary sits. Making the pages themselves faster or fixing the site the log describes is likewise another guide's work — this one reads the diary, it does not rewrite the day.
How to use this guide
Read chapter 1 for the model and chapter
2 before installing anything. Chapters 3
and 4 get you a program and your first
dashboard in one sitting. Chapters 5 to 9
are the working skills, in the order you
will reach for them. The lab's evidence
lives in goaccess-lab/: the real
access.log the guide's numbers come
from, the traffic script that made it,
the nginx configuration that served it,
and the transcripts t00 to t09 of
every run the guide cites.
Part of the series
This guide is one of the For Mere Mortals guides: plain-language guides to the tools programmers and makers use.
Related guides:
- nginx for Mere Mortals
- Caddy for Mere Mortals
- Loki for Mere Mortals
- Prometheus and Grafana for Mere Mortals
License
The writing in this guide is licensed under CC BY 4.0. Code examples and lab scripts are licensed under the MIT License.