Your web server already knows who visited your site, when they arrived, which pages they read, and where they came from. It writes all of that into a text file, one line per request. Most site owners never open those files, and that is a missed opportunity.

GoAccess is a free, MIT-licensed log analyzer written in C. It reads the access log your nginx, Apache or Caddy server already writes and turns it into a live terminal dashboard or a single self-contained HTML report. The current release is 1.12, published on 16 September 2026.

Log file analytics means reading those logs directly instead of running JavaScript in your visitors’ browsers. No tracking snippet, no cookies, no consent banner. Your server does what it already does, and you finally read the output.

I rebuilt this guide on a test box in November 2026. Every log format, command and config below ran against a 30-day synthetic access log, and I’ll be honest about the limits too.

Lab: 2 vCPU (pinned with taskset) · AlmaLinux 10.2 · GoAccess 1.12 and 1.8.1 built from source · nginx 1.26.3 · 760,299-line synthetic log · 4 Nov 2026

Log Analytics vs JS Analytics: Key Differences

Why Log File Analytics Deserves a Second Look

The usual privacy-first analytics workflow installs a JavaScript snippet on every page. The snippet loads, fires a request to your analytics server, and records a visit. It works, and tools like Plausible, Umami, and Matomo covered in our self-hosted analytics guide do this well. But the snippet is still client-side code running in your visitor’s browser.

Log-based analytics flips this around entirely. Your web server (nginx, Apache, Caddy) already logs every incoming HTTP request before a browser even finishes loading your page. No JavaScript involved. No client-side dependency. No chance for an ad-blocker to suppress it.

That has some concrete advantages:

  • Zero JavaScript on visitors’ devices. Nothing to block, nothing to slow down page load.
  • Inherently server-side. You analyze logs you already control, on infrastructure you already own.
  • Works on any static site. Even a plain HTML file served from nginx produces access logs you can analyze.
  • Captures everything the server sees, including resource requests, 404s, redirect chains, and crawler traffic.

For context on how this fits alongside cookie-free approaches generally, read our piece on how cookie-free analytics works and why it matters.

What GoAccess Does

GoAccess is an open-source, real-time log analyzer, released under the MIT license since version 1.0 in 2016. It reads your existing web server access log, in whatever format nginx, Apache, or Caddy wrote it, and produces either a rich terminal dashboard or a self-contained static HTML report. You can find it and its documentation at goaccess.io.

Diagram: web server logs flow into the GoAccess parser, which outputs a terminal dashboard, a static HTML report, or a real-time dashboard over WebSocket port 7890, with optional on-disk persistence

The terminal view is a live, ncurses-style dashboard. You pipe a log file to GoAccess and get sorted panels: unique visitors, most-requested URLs, response codes, referrers, browsers, operating systems. It refreshes in real time if you tail a live log.

The HTML export is a single file with embedded JavaScript for client-side interactivity. That JavaScript only runs in your own browser when you open the report, never on your visitors’ devices.

There is no separate application to install, no database to configure, no background service to keep running. GoAccess reads a file and produces output. That simplicity is its greatest strength.

GoAccess at a glance: release 1.12 from 16 September 2026, MIT license and free, one C binary, 15 built-in log format presets, terminal, HTML, JSON and CSV output, no JavaScript on your pages, 760,299 log lines parsed in 9.6 seconds on 2 cores with 78 MB of RAM, unique visitor counted as IP plus date plus user agent
The last two rows come from my own test run, not from the project’s feature list.
GoAccess Setup in 4 Steps

Setting Up GoAccess: A Real Walkthrough

Install GoAccess

Distribution packages work, but they lag behind upstream. This is what the main repositories shipped when I checked on 4 November 2026:

Repository GoAccess version
Ubuntu 22.04 LTS 1.5.5
Ubuntu 24.04 LTS 1.8.1
Debian 12 (bookworm) 1.7
Debian 13 (trixie) 1.9.3
EPEL 9 and 10 (RHEL, AlmaLinux, Rocky) 1.11
Upstream source and the official Debian/Ubuntu repository 1.12

The gap matters. The AI Crawlers category and the UTM Campaigns panel shown later arrived in 1.12, and 1.8.1 has no VCOMBINED_PORT preset at all.

On Debian/Ubuntu:

apt install goaccess

On RHEL/AlmaLinux/Rocky, enable EPEL first:

dnf install epel-release
dnf install goaccess

For the current release on Debian or Ubuntu, the project runs its own repository. These are the commands from the GoAccess download page:

wget -O - https://deb.goaccess.io/gnugpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/goaccess.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/goaccess.gpg arch=$(dpkg --print-architecture)] https://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/goaccess.list
sudo apt-get update
sudo apt-get install goaccess

Or build it from source, which is what I did for the lab. Besides gcc and make, the only package I needed was the ncurses headers: ncurses-devel on AlmaLinux, libncurses-dev on Debian and Ubuntu.

wget https://tar.goaccess.io/goaccess-1.12.tar.gz
tar -xzvf goaccess-1.12.tar.gz
cd goaccess-1.12/
./configure --enable-utf8
make
sudo make install

Add --enable-geoip=mmdb (with libmaxminddb-dev) if you want a countries panel, and --with-zlib if you want GoAccess to read .gz archives directly. Our notes on privacy-friendly geolocation cover which free databases to point it at.

On Windows, the project points to Cygwin or the Windows Subsystem for Linux. There is also an official Docker image, allinurl/goaccess, if you would rather not install anything on the host.

Understand Your Log Format

GoAccess needs to know how your server formats its log lines. The default nginx combined log format looks like this:

192.168.1.10 - - [12/Jun/2026:14:23:01 +0200] "GET /about/ HTTP/2.0" 200 4218 "https://example.com/" "Mozilla/5.0 ..."

GoAccess 1.12 has 15 built-in presets. You pass the name with --log-format, for example --log-format=COMBINED. The ones most people need:

Format name Preset Use for
Combined (nginx default) COMBINED nginx, Apache combined log
Common Log Format COMMON Apache common log
Virtual host with port VCOMBINED_PORT Apache vhost_combined, version 1.12+
Virtual host VCOMBINED Apache vhost_combined, older versions
Caddy (JSON) CADDY Caddy structured logs
W3C Extended W3C IIS logs
Custom your own format string Any non-standard format

If you use the default nginx log format, the COMBINED preset works directly. The nginx log module documentation describes the exact field order if you need to write a custom format string. Apache’s mod_log_config documentation covers the same for Apache deployments.

Log Format Strings I Tested on GoAccess 1.12

I generated one synthetic 30-day log and wrote it out in four shapes. Each one below produced 760,299 valid requests and zero failed ones.

nginx, default combined. No log_format line is needed on the nginx side. Use the preset:

goaccess access.log --log-format=COMBINED

nginx with response time. Append $request_time to the default fields, and GoAccess fills its time-served columns (average, cumulative and maximum). The nginx side:

log_format timed '$remote_addr - $remote_user [$time_local] '
                 '"$request" $status $body_bytes_sent '
                 '"$http_referer" "$http_user_agent" $request_time';
access_log /var/log/nginx/access.log timed;

The matching GoAccess side. A custom format always needs its own date and time format:

goaccess access.log \
  --log-format='%h - %^ [%d:%t %^] "%r" %s %b "%R" "%u" %T' \
  --date-format=%d/%b/%Y \
  --time-format=%H:%M:%S

Apache, other_vhosts_access.log. Debian and Ubuntu write virtual host logs in the vhost_combined format, which starts with host:port. GoAccess 1.12 has a preset for exactly that:

goaccess other_vhosts_access.log --log-format=VCOMBINED_PORT

On the 1.8.1 that Ubuntu 24.04 ships, that preset doesn’t exist, and the error is misleading: No time format was found on your conf file. Use VCOMBINED there. In my test it parsed the host:port lines without a single failure.

Caddy JSON. Caddy writes one JSON object per request. A minimal site block that sends the access log to a file:

example.com {
    log {
        output file /var/log/caddy/access.log
    }
}

Then point GoAccess at that file with the CADDY preset:

goaccess /var/log/caddy/access.log --log-format=CADDY

On lines shaped like the example in Caddy’s logging documentation, both 1.12 and 1.8.1 parsed everything. Version 1.12 also updated the preset to the current Caddy structure, so newer is safer.

Run a Basic Analysis

The simplest invocation reads your access log and opens the terminal dashboard:

goaccess /var/log/nginx/access.log --log-format=COMBINED
GoAccess 1.12 terminal dashboard on a 30-day test log: 760,299 total and valid requests, 0 failed, 146,875 unique visitors, 169.80 MiB log, a bar chart of hits per day with one spike of 64K, and the requested files panel below
The terminal dashboard on my 30-day test log. The tall bar is the day a post hit a link aggregator.

How fast is it? On two pinned cores, a single parsing thread got through all 760,299 lines in 13.5 seconds. Adding -j 2 cut that to 9.6 seconds, with memory peaking at 78 MB. The project recommends 2 to 4 threads.

To generate a static HTML report instead of the terminal view:

goaccess /var/log/nginx/access.log \
  --log-format=COMBINED \
  --output=/var/www/html/report.html
GoAccess 1.12 static HTML report for example.com: overall analyzed requests 760,299, failed 0, unique visitors 146,875, log size 169.8 MiB, a line chart of unique visitors per day including spiders, and the requested files panel
The static HTML report from the same log. One file of about 2 MB that opens offline in any browser.

To analyze multiple rotated log files at once, which is what you almost always want for historical data:

zcat /var/log/nginx/access.log.*.gz | \
  goaccess /var/log/nginx/access.log - \
  --log-format=COMBINED \
  --output=/tmp/full-report.html

That command combines the live log with all compressed rotated files. On two gzipped archives plus plain files it took 400,000 lines in and reported 400,000 valid requests. It’s the command I use most for a full month of traffic.

Version 1.11 and later can read .gz files directly, but only when built with --with-zlib. Run goaccess --version to see the configure flags of your binary. Without zlib, a .gz argument just produces format errors, so the zcat pipe is the safe default.

Use a Configuration File

Typing flags every time gets tedious. GoAccess reads ~/.goaccessrc first and then the global /etc/goaccess/goaccess.conf (a source build looks in /usr/local/etc/goaccess/ instead). A minimal working config for nginx:

log-format COMBINED
log-file /var/log/nginx/access.log
output /tmp/report.html
exclude-ip 127.0.0.1

With that in place, a bare goaccess command uses all defaults from the file. If your format is custom, put date-format and time-format lines in the same file.

The Real-Time Dashboard

The static report is a snapshot. When you want to watch traffic as it happens, during a deploy, a newsletter send, or a spike you are trying to diagnose, GoAccess can serve a live page that updates itself:

goaccess /var/log/nginx/access.log \
  --log-format=COMBINED \
  -o /var/www/html/report.html \
  --real-time-html --daemonize

Under the hood, GoAccess writes the HTML file once, then keeps running as a small WebSocket server (port 7890 by default) and pushes updates to every open browser tab. The --daemonize flag sends it to the background, and it only works together with --real-time-html.

Do not leave the report or the port open to the world, because it is your raw traffic. Bind GoAccess to localhost and let nginx carry the WebSocket over TLS. Here is the tested pair, with the report at stats.example.com:

goaccess /var/log/nginx/access.log \
  --log-format=COMBINED \
  -o /var/www/stats/index.html \
  --real-time-html --daemonize \
  --addr=127.0.0.1 --port=7890 \
  --ws-url=wss://stats.example.com:443/ws \
  --origin=https://stats.example.com
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    server_name stats.example.com;
    # listen 443 ssl, certificates and basic auth as on your other sites
    root /var/www/stats;

    location /ws {
        proxy_pass http://127.0.0.1:7890;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Host $host;
        proxy_read_timeout 1h;
    }
}

I ran the proxy block on a local nginx 1.26.3 in front of GoAccess 1.12. TLS and basic auth are left out because they are the same as on any other site you host.

Two details cost me time. First, write the port into --ws-url, even the default 443. The report’s script uses the URL as written only when it contains a port. Otherwise it swaps in the --port value and the browser goes to stats.example.com:7890, bypassing nginx. Without the port, zero WebSocket requests reached my proxy.

Second, --origin is a real check. A handshake with the matching Origin header got 101 Switching Protocols. The same request from another origin got a 400.

Keeping It Running: systemd and Log Rotation

A dashboard that dies with your SSH session is not much of a dashboard. Two pieces of plumbing make GoAccess a permanent resident on a real server: a systemd unit, and an answer to log rotation.

The unit file is short. Save this as /etc/systemd/system/goaccess.service:

[Unit]
Description=GoAccess real-time dashboard
After=network.target

[Service]
ExecStart=/usr/bin/goaccess /var/log/nginx/access.log \
  --log-format=COMBINED \
  -o /var/www/stats/index.html \
  --real-time-html --addr=127.0.0.1 --port=7890 \
  --ws-url=wss://stats.example.com:443/ws \
  --origin=https://stats.example.com \
  --restore --persist --db-path=/var/lib/goaccess/
Restart=on-failure

[Install]
WantedBy=multi-user.target

Create the database directory first (mkdir -p /var/lib/goaccess), then systemctl enable --now goaccess. The --persist flag writes parsed data to disk on shutdown and --restore loads it back on start, so a restart does not wipe your history. If the database grows past what you actually look at, --keep-last=90 recycles anything older than 90 days.

I tested the restart behavior on the lab box. After a restore, feeding the same 100,000-line file again added nothing, and 10,000 freshly appended lines were counted once. Version 1.12 also refuses to restore a database if --http-method or --http-protocol changed since it was created, so keep those flags stable.

Log rotation is the part that silently bites people. When logrotate compresses access.log into access.log.1.gz and creates a fresh empty file, the long-running GoAccess process can be left following the old, now-renamed file handle. The boring, reliable fix is a restart hook in your logrotate config for nginx:

postrotate
    systemctl try-restart goaccess
endscript

With --restore and --persist in the unit, that restart takes a couple of seconds and loses nothing. For the months rotated away before you set any of this up, stop the service and feed the archives through once with both flags:

systemctl stop goaccess
zcat /var/log/nginx/access.log.*.gz | \
  goaccess - --log-format=COMBINED --restore --persist --db-path=/var/lib/goaccess/
systemctl start goaccess

Both flags matter. In the lab, --persist without --restore replaced a database holding 210,000 requests with the 100,000 lines from one archive. An earlier version of this guide showed exactly that command, so check yours if you copied it.

If the box running this also hosts the rest of your stack, our notes on scaling self-hosted analytics cover where the memory actually goes.

IP Anonymization: The GDPR Detail You Cannot Skip

Raw server logs contain full IP addresses. Under the GDPR, an IP address can be personal data, so storing full addresses with no purpose and no end date creates exposure, even if you never look at them. There are three practical layers, and they solve different problems.

Mask the address before nginx writes it. This is the only option that keeps full IPs off your disk. The map below zeroes the last octet of IPv4 and keeps the first 48 bits of IPv6, so the last 80 bits become zero:

map $remote_addr $remote_addr_anon {
    ~^(?P<ip>\d+\.\d+\.\d+)\.\d+$     $ip.0;
    ~^(?P<ip>[^:]+:[^:]+:[^:]+):       $ip::;
    ~^(?P<ip>[^:]+:[^:]+)::            $ip::;
    ~^(?P<ip>[^:]+)::                  $ip::;
    default                            ::;
}

log_format privacy '$remote_addr_anon - $remote_user [$time_local] '
                   '"$request" $status $body_bytes_sent '
                   '"$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log privacy;

I sent eight test addresses through it. 10.20.30.40 was logged as 10.20.30.0, and 2001:db8:85a3:8d3:1319:8a2e:370:7348 as 2001:db8:85a3::. Short forms like 2001:db8::1 came out as 2001:db8::. GoAccess parsed the masked log with the COMBINED preset and zero failures, because the masked values are still valid addresses.

An earlier version of this guide had an IPv6 pattern that only cleared the last group of the address. The map above is the corrected and tested one. Caddy users can do the same inside Caddy with the ip_mask log filter.

Mask in the report only. GoAccess has --anonymize-ip. By default it shows IPv4 as /24 and IPv6 as /64. The man page says 80 bits for IPv6, but the source code and my test both show 64. --anonymize-level=2 widens that to /16 and /48, and level 3 to /8 and /32. The log file on disk keeps full addresses either way.

Keep raw logs for a short, documented time. The GDPR’s storage limitation principle (Article 5(1)(e)) says personal data should be kept no longer than you need it. Deleting raw logs after 7 to 14 days with logrotate is a common choice for small sites. Write down why you keep them, as our piece on legitimate interest versus consent explains.

What Log File Analytics Cannot Do

This is where log-based analytics genuinely falls short, and you should know it before you make it your only source.

Bot Noise Is Real

Your access logs include every request your server handled: real visitors, search crawlers, AI crawlers, vulnerability scanners, uptime monitors and feed readers. GoAccess sorts known bots by user agent, and version 1.12 split them further.

GoAccess 1.12 Browsers panel: Chrome, Safari, Firefox, Crawlers with 48,848 hits, Edge, AI Crawlers with 32,005 hits and 16,069 visitors, and Uptime with 8,818 hits
Version 1.12 gives AI crawlers their own row. GPTBot, ClaudeBot and PerplexityBot land there, while Common Crawl’s CCBot stays under Crawlers.

Because I generated the test log myself, I know exactly which lines are people. That makes it a good place to see what each flag removes. The bot share is my own choice, so read the mechanics, not the percentages.

Setting Unique visitors Still counted besides people
Default 146,875 Search and AI crawlers, uptime checks, Mastodon link previews
--ignore-crawlers 110,247 Uptime checks, Mastodon link previews
plus --unknowns-as-crawlers 105,003 About 1,600 Mastodon link previews
Real people in the log 103,398 Nothing

One more detail surprised me. A scanner posing as Chrome 91 sent 10,596 requests to paths like /wp-login.php and /.env and added zero visitors. GoAccess leaves 4xx responses out of the unique visitor count unless you pass --4xx-to-unique-count.

A bot that fakes a browser and requests real pages would still be counted, and no flag can catch it. Our article on bot traffic detection in privacy-first analytics covers filtering strategies in more detail.

Client-Side Events Are Invisible

If a user clicks a button, fills a form, or navigates between sections of a single-page application without triggering a new HTTP request, your logs see nothing. Log analytics is fundamentally page-load analytics. You get URL hits, not interactions.

This means you cannot track:

  • SPA route changes that do not produce a full page request
  • Form submissions handled entirely by JavaScript
  • Scroll depth, click heatmaps, or engagement time
  • Custom conversion events

Campaign tags are the exception, because they travel in the URL. Version 1.12 replaced the old keyphrases panel with a UTM Campaigns panel that reads utm_source, utm_medium, utm_campaign, utm_content and utm_term straight from the request line. In my test log it grouped the newsletter and Mastodon links correctly. Our guide to UTM parameters without cookies covers how to tag links.

For everything else, you need a JavaScript-based analytics tool, even a privacy-first one. Log analytics works best as a complement to a client-side tool, not as its replacement for complex applications.

Sessions Are Approximated

Log files do not know that two requests from the same address 30 seconds apart came from the same person. GoAccess counts one unique visitor per combination of IP address, date and user agent.

A reader who comes back the next day counts again. Everyone behind one office NAT with the same browser counts once. One person on a laptop and a phone counts twice.

That is also the whole answer to “hits vs visitors” in GoAccess. Hits are every request, including CSS, JavaScript and images. Visitors are those IP, date and user agent combinations.

Where Log Analytics Genuinely Shines

Despite those caveats, there are situations where log file analytics is exactly the right tool.

Static sites and documentation. If you run a Hugo, Jekyll, or Gatsby site with no JavaScript framework, logs give you complete traffic data without any tracking layer.

Debugging and SEO checks. 404 rates, slow responses, and whether Googlebot or GPTBot fetched a new URL are all in your logs, and GoAccess surfaces them clearly.

Air-gapped and privacy-maximalist setups. If outbound connections are restricted, or even a self-hosted analytics ping is too much, reading local files is the only option that works at all.

Common Mistakes to Avoid

A few things that catch people out when they first set up log-based analytics:

Not excluding your own IP. Your own visits during development inflate the numbers. Add --exclude-ip YOUR_IP to your GoAccess invocation.

Analyzing only the current log file. Nginx and Apache rotate logs, usually daily, into access.log.1 and older .gz archives. Run GoAccess on access.log alone and you see only the newest slice of traffic.

Forgetting the time zone. GoAccess shows times exactly as your server wrote them. My test log is in UTC, and with --tz=Europe/Warsaw the hour that started at 00:00 moved to 02:00.

Treating raw visitor counts as gospel. Check the Crawlers and AI Crawlers rows and use the crawler flags from the table above before you decide anything based on traffic volume.

Troubleshooting: The Errors I Actually Hit

No time format was found on your conf file. I got this in three ways. GoAccess ran without any --log-format, a custom format had no --date-format and --time-format, or the preset name didn’t exist in that version (VCOMBINED_PORT on 1.8.1). Presets like COMBINED set the date and time for you.

Format Errors - Verify your log/date/time format. The preset doesn’t match the file. I triggered it by pointing COMBINED at a Caddy JSON log, and every line failed on its first field, the client address. Compare head -1 of your log with your log_format, and add --invalid-requests=bad.log to keep the failing lines for inspection.

Rotated .gz files show up as failed lines. Your binary was built without zlib. Pipe the archives through zcat as shown above.

The live report loads but never updates. Open the browser console. If the page tries port 7890 on your domain, add the port to --ws-url. If the handshake returns 400, the page origin doesn’t match --origin.

GoAccess vs AWStats: Two Generations of Log Analytics

AWStats is what people usually mean when they say “we already have log analytics”. It has shipped with cPanel servers for two decades. The comparison with GoAccess comes down to architecture and age rather than a feature checklist.

AWStats is a Perl script from 2000. It parses logs incrementally on a cron schedule, accumulates monthly databases, and renders reports as CGI pages or static HTML. Its strengths are the multi-year archive you get without thinking about it and its extra inputs, such as mail and FTP server logs. Its weaknesses are an interface from the 2000s, no real-time view, and slow full rebuilds.

GoAccess is the modern take: a C program that chews through hundreds of thousands of log lines in seconds, with a live dashboard and JSON/CSV export. Its history is only as deep as the log files you still have, unless you set up --persist as described above.

Both tools read exactly the same files, so trying GoAccess next to an existing AWStats install costs nothing and breaks nothing. My rule: keep AWStats if you inherited it and rely on its long archive, and pick GoAccess for anything you set up today. If you really want a GoAccess alternative with goals and a polished UI, that is no longer a log-analysis problem. See our self-hosted analytics guide for that class of tools.

GoAccess vs. Client-Side Privacy Analytics: When to Use Which

Requirement Log analytics (GoAccess) JS-based privacy analytics
Zero JS on visitor’s device Yes No (tiny snippet required)
Works with ad-blockers Yes (server-side) Partially (self-hosted helps)
Client-side events No Yes
SPA route tracking No Yes
Bot filtering Partial (user-agent) Better (JS doesn’t run in most bots)
Real-time dashboard Terminal or HTML report Web UI
Setup complexity Low (one binary) Medium (app + DB + DNS)
GDPR: raw IPs Needs anonymization Handled by tool

The honest answer is that these approaches complement each other rather than compete. I run GoAccess for infrastructure-level checks, such as 404 rates, crawler verification and traffic spikes that might indicate a server issue, and a client-side tool for conversion-oriented metrics where accuracy about real users matters.

What You End Up With

Log file analytics with GoAccess is not a replacement for a purpose-built analytics tool, but it deserves a place in your stack. Follow this guide and you end up with:

  • A dashboard built from data your server already writes, with zero JavaScript on your pages.
  • A tested log format for nginx, Apache or Caddy, and an HTML report you can open offline.
  • A live view behind your own nginx, bound to localhost and checked by origin.
  • Masked addresses in the log itself, not only in the report.
  • Visitor counts you can read with care, because you know what each crawler flag removes.

Deal with bot noise and raw IP addresses, and log-based analytics is about as privacy-respecting as web measurement gets. If you want the client-side complement for sessions, events and funnels, our self-hosted analytics complete guide compares the main options.