Deployment guide

GoAccess

Overview

GoAccess is a fast, open-source, real-time web-log analyzer. It parses your nginx, Apache or CDN access logs and renders an interactive HTML dashboard that updates live in the browser over a WebSocket as new requests arrive. The dashboard covers unique visitors, requested files, HTTP status codes, referrers, operating systems, browsers, geo location and bandwidth.

This SecureAnyCloud image compiles the pinned GoAccess 1.10.2 from its official source release and runs it as a dedicated goaccess system user under systemd. An nginx reverse proxy fronts the generated report on port 80, adds a per-VM HTTP Basic Auth gate and proxies the live-update WebSocket. A unique dashboard password is generated on the first boot of every VM.

Out of the box, GoAccess analyzes the VM's own nginx access log, so the dashboard is populated the moment you sign in. Repointing it at your real logs is a one-line change.

What you get:

  • GoAccess 1.10.2 compiled from source (UTF-8, GeoIP2 and OpenSSL support) running as the goaccess systemd service
  • A live-updating HTML dashboard on :80, fronted by nginx with the GoAccess WebSocket proxied for real-time updates
  • Per-VM HTTP Basic Auth (user admin) protecting the dashboard, with a unique password generated on first boot
  • A dashboard that ships analyzing the VM's own nginx access log, so it is populated on first view
  • A dedicated Azure data disk at /var/lib/goaccess holding the persisted parse database, the report and the password file
  • goaccess.service and nginx.service as systemd units, enabled and active
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet and subnet in the target region.

Standard_B2s (2 vCPU / 4 GiB RAM) is a comfortable starting point, because GoAccess is light on resources.

In the network security group (NSG), allow inbound 22/tcp from your management network and 80/tcp for the dashboard. Also allow 443/tcp if you add TLS.

GoAccess serves plain HTTP on port 80. In production, terminate TLS in front of it with your own domain and switch the live-update WebSocket to secure wss (see Maintenance).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, and search the Marketplace for GoAccess by SecureAnyCloud. Select Create.

On Basics, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then choose Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:goaccess-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name goaccess \
  --image sac1647283583153:goaccess-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name goaccess --port 80 --priority 1010

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

systemctl is-active goaccess.service nginx.service

Both services report active. GoAccess parses the log and serves its live-update WebSocket on the loopback connector 127.0.0.1:7890. nginx fronts the HTML report on port 80, adds the per-VM HTTP Basic Auth gate, and proxies the WebSocket at /ws.

GoAccess's persisted parse database and the generated report live on the dedicated Azure data disk mounted at /var/lib/goaccess.

Step 5 - Retrieve your dashboard password

nginx protects the GoAccess dashboard with HTTP Basic Auth. The username is admin. A unique password is generated on the first boot of your VM and written to a root-only file:

sudo cat /root/goaccess-credentials.txt

This file contains GOACCESS_USERNAME, GOACCESS_PASSWORD and the GOACCESS_URL to open in a browser. The password is stored on disk only as a bcrypt hash in /var/lib/goaccess/.htpasswd, so no plaintext password ships in the image.

Store the password somewhere safe.

Step 6 - Confirm the health endpoint

nginx serves an unauthenticated health endpoint for load balancers and probes:

curl -s http://localhost/healthz

The endpoint returns ok. It never requires authentication, so it is safe to use for an Azure Load Balancer health probe.

Step 7 - Confirm authentication and the live-update WebSocket

Because a password is set on first boot, an unauthenticated request to the dashboard returns HTTP 401. Nobody can reach your analytics without the password.

The following commands read the per-VM password from the credentials file and prove the round trip. An unauthenticated request is rejected, the correct password authenticates, and the live-update WebSocket upgrades:

PW=$(sudo grep '^GOACCESS_PASSWORD=' /root/goaccess-credentials.txt | cut -d= -f2-)
echo "unauth : $(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1/)"
echo "authed : $(curl -s -o /dev/null -w '%{http_code}' -u admin:$PW http://127.0.0.1/)"
echo "ws : $(curl -s -m 5 -o /dev/null -w '%{http_code}' -H 'Connection: Upgrade' -H 'Upgrade: websocket' -H 'Sec-WebSocket-Version: 13' -H "Sec-WebSocket-Key: $(openssl rand -base64 16)" http://127.0.0.1/ws)"

The output is unauth : 401, then authed : 200, then ws : 101, which means the WebSocket handshake succeeds. The /ws endpoint carries only the incremental parse data that drives the live update. The report page itself stays behind the password.

Step 8 - Sign in to the dashboard

Browse to http://<vm-public-ip>/. When your browser prompts for a username and password, enter admin and the password from Step 5.

GoAccess opens on the overview. The General Statistics summary at the top shows total requests, valid requests, unique visitors, requested files, referrers, not-found URLs, bandwidth and processing time. Each analysis panel follows.

Because the image ships analyzing the VM's own nginx log, the dashboard is already populated. It updates live as new requests arrive.

Step 9 - Read the requests and static-files panels

Scroll down to the Requested Files and Static Requests panels. Each shows the top URLs by hits and visitors, the HTTP method and protocol, the bytes served and the percentage of traffic.

These panels are the fastest way to see what is actually being requested from your site.

Step 10 - Read the visitor hostnames and operating-system panels

Further down, the Visitor Hostnames and IPs and Operating Systems panels break your traffic down by client IP and by platform (Windows, Linux, macOS, Android, iOS, crawlers). Use them to see who is reaching your site and from what.

The Browsers panel just below does the same by user agent (Safari, Chrome, Edge, Firefox and more).

Step 11 - Read the referrers and HTTP status-code panels

The Referring Sites panel shows where your traffic comes from. The HTTP Status Codes panel groups requests by response code (2xx success, 3xx redirection, 4xx client errors, 5xx server errors), so you can spot error spikes at a glance.

Add a GeoLite2 database (see Maintenance) to populate the Geo Location panel and map visitors by country.

Step 12 - Repoint GoAccess at your own logs

Out of the box, GoAccess analyzes this VM's own nginx access log at /var/log/nginx/access.log. To analyze your real site's logs, edit the log path on the ExecStart line of the service unit and restart the service:

sudo systemctl edit --full goaccess.service
# change the log path on the ExecStart line
sudo systemctl restart goaccess.service

GoAccess reads the standard COMBINED log format by default, which nginx and Apache both emit. For a different format, add a matching --log-format to the ExecStart line.

You can also point GoAccess at several log files at once by listing them on the command line.

Step 13 - Confirm data lives on the dedicated disk

GoAccess's persisted parse database, the generated report and the per-VM password file are kept under /var/lib/goaccess on the dedicated Azure data disk. Your analytics therefore survive OS changes, and you can resize the disk independently:

findmnt /var/lib/goaccess

The mount is backed by a separate Azure data disk that is captured into the image and re-provisioned on every VM.

Maintenance

  • Password: The dashboard password is set on first boot and stored as a bcrypt entry in /var/lib/goaccess/.htpasswd. To change it, run sudo htpasswd -B /var/lib/goaccess/.htpasswd admin, then sudo systemctl reload nginx.
  • Your own logs: Repoint GoAccess at your real nginx, Apache or CDN access logs by editing the log path on the ExecStart line of goaccess.service (Step 12). The persisted parse database under /var/lib/goaccess keeps historical data across restarts via --persist/--restore.
  • GeoIP: The binary is built with GeoIP2 support, but no GeoLite2 database ships because MaxMind's licence does not allow redistribution. Download a GeoLite2-Country or GeoLite2-City .mmdb from MaxMind. Then add --geoip-database /path/to/GeoLite2-City.mmdb to the ExecStart line to populate the geo panel.
  • TLS and secure WebSocket: GoAccess serves plain HTTP on port 80 with a ws:// live-update WebSocket. In production, front it with TLS (for example, certbot with your own domain). Then set the report's --ws-url to wss://<your-domain>/ws and proxy /ws over :443 so live updates flow over a secure WebSocket.
  • Real-time WebSocket URL: GoAccess bakes the WebSocket URL into the report on first boot from the VM's public IP. If the VM's public IP changes, re-run first boot (sudo rm /var/lib/sac/data/goaccess-firstboot.done && sudo systemctl start goaccess-firstboot.service), or edit /etc/goaccess/goaccess.env and restart goaccess.service.
  • Storage: All GoAccess state lives under /var/lib/goaccess on the data disk. Back up that volume to protect your persisted analytics.
  • Security patches: unattended-upgrades remains enabled, so the OS continues to receive security updates automatically.

Support

SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com for help.

Deploy on Azure

Launch GoAccess Real-Time Web Log Analyzer on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure