GoAccess, A Real-Time Dashboard for Nginx Proxy Manager

GoAccess supports themes

The Nginx Proxy Manager generate logs of every connection made. With this data, created a docker image that provides a real-time data dashboard. It can be run easily alongside the Nginx Proxy Manager.

GitHub - GregYankovoy/docker-goaccess: goaccess reverse proxied through nginx for ease of use
goaccess reverse proxied through nginx for ease of use - GitHub - GregYankovoy/docker-goaccess: goaccess reverse proxied through nginx for ease of use

If you have not set up Nginx Proxy Manager, check out my guide at the link below.

Nginx Proxy Manager, A Reverse Proxy Management System
Guide on setting up Nginx Proxy Manager

How to install GoAccess?

Run the command below at your Nginx Proxy Manager server terminal.

docker run --name goaccess -p 7889:7889 -v ~/nginx-proxy-manager/data/logs:/opt/log -v ~/goaccess:/config -d gregyankovoy/goaccess
This is download and runs the docker image

What does each of these means?

  • docker run --name goaccess to run a docker container and set the name as goaccess
  • -p 7889:7889 is to host the docker image at the 7889 port
  • -v ~/nginx-proxy-manager/data/logs:/opt/log, to bind the Nginx logs to the docker container log at /opt/log
  • -v ~/goaccess:/config, to bind the image config directory to the goaccess directory at your home directory
  • -d gregyankovoy/goaccess, to run the container in the background and print container ID

You can check if the docker container is running by running docker ps command.

Add the log file to GoAccess

Now, the config file will be created at ~/goaccess/config/. Let's configure the config file.

mv goaccess.conf goaccess.conf.backup
Backup the original file
nano goaccess.conf
Create a new goaccess.conf file

For Nginx Proxy Manager, add the following lines to the goaccess.conf file.

time-format %H:%M:%S
date-format %d/%b/%Y
log_format [%d:%t %^] - %s %^ - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] [Sent-to %^] "%u" "%R"
real-time-html true
log-file /opt/log/proxy-host-1_access.log
log-file /opt/log/proxy-host-2_access.log
log-file /opt/log/proxy-host-3_access.log
You can edit the log file line depending on the number of hosts you have

Save the file and restart your goaccess docker image.

docker restart goaccess

Navigate to your GoAccess page. Replace 127.0.0.1 with your IP address.

http://127.0.0.1:7889