how to use GoAccess with Caddy

dec 26 2021

updated jun 21 2022

GoAccess is a simple and lightweight tool for viewing webserver access log files; it can subsitute a lot of the things that you'd normally need something like Google Analytics for. however, Caddy does not create logs by default. luckily, this is an easy Caddyfile change.

/etc/caddy/Caddyfile {
  root * /var/www
  log {
    output file /var/log/caddy/access.log

once you add the log directive to your Caddyfile, simply run GoAccess, and you'll get a nice way to view the logs in your terminal.

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