How to Install GoAccess Log Analyzer on Ubuntu 24.04

GoAccess is an open-source log analyzer and interactive viewer that runs in a terminal. It provides real-time analytics for your web server logs. In this article, we will guide you through the process of installing GoAccess on Ubuntu 24.04.

Step 1: Update your package list

Before you install any new software on Ubuntu, it is always a good idea to update your package list to make sure you have the latest version of the software. You can do this by running the following command:

sudo apt update

Step 2: Install GoAccess

Once your package list is updated, you can install GoAccess by running the following command:

sudo apt install goaccess

Step 3: Configure your web server logging

GoAccess requires access to your web server logs in order to analyze them. By default, Apache logs are located in the directory /var/log/apache2/ and Nginx logs are located in the directory /var/log/nginx/. You can configure GoAccess to analyze these logs by running the following command:

sudo goaccess /path/to/your/log/file

Step 4: Run GoAccess

Once you have configured GoAccess to analyze your web server logs, you can run the following command to start the log analysis process:

goaccess /path/to/your/log/file

GoAccess will then generate a real-time web interface displaying various analytics about your web server logs.

Step 5: Customize your GoAccess configuration

You can customize your GoAccess configuration by creating a configuration file at /etc/goaccess/goaccess.conf. In this file, you can specify various options such as the log format, output format, time format, and colors.

Step 6: Access the GoAccess web interface

By default, GoAccess provides a web interface that you can access in your browser. To do this, run the following command:

goaccess -c

This will start a web server that you can access at http://localhost:7890 to view your web server log analytics in a graphical interface.

In conclusion, installing GoAccess on Ubuntu 24.04 is a relatively simple process. By following the steps outlined in this article, you can have real-time analytics for your web server logs up and running in no time. Happy analyzing!