How to Install ntopng with Redis on AlmaLinux 9 Using Docker

Estimated reading: 3 minutes 1044 views

Introduction

This guide explains how to install and run ntopng Community Edition on AlmaLinux 9 using Docker, with Redis as the backend database.

ntopng is a powerful network traffic monitoring and analysis tool that provides real-time visibility into network usage, protocols, and hosts through a modern web interface.

Using Docker provides:

  • Clean and isolated deployment

  • Easy upgrades and maintenance

  • Automatic restart after system reboot

  • No dependency conflicts with the host OS

This guide assumes:

  • You are logged in as root

  • AlmaLinux 9 is installed

  • The system has Internet access

  • The primary network interface is eth0


Architecture Overview

  • Docker: Container runtime

  • Redis: Backend database for ntopng

  • ntopng: Network traffic analyzer

  • eth0: Physical network interface being monitored

  • Port 3000: ntopng Web UI

Step 1: Update the System

dnf update -y
dnf install -y curl wget yum-utils

Explanation:

  • Ensures the system is fully up to date

  • Installs required utilities for repository management


Step 2: Install Docker Engine

2.1 Add the Docker Repository

dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Explanation:

  • AlmaLinux is RHEL-compatible, so the CentOS Docker repository is used


2.2 Install Docker Components

dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

Explanation:

  • docker-ce: Docker Engine

  • docker-ce-cli: Docker CLI

  • containerd.io: Container runtime

  • docker-compose-plugin: Optional multi-container support


2.3 Enable and Start Docker

systemctl enable --now docker
systemctl status docker

Docker should display:

Active: active (running)

Step 3: Identify the Network Interface

ntopng must capture traffic from the physical network interface.

ip link show

Example output:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000

Step 4: Run Redis Container

Redis must be running before ntopng starts.

docker run -d \
  --name redis \
  --restart always \
  -p 6379:6379 \
  redis:alpine

Explanation of Options

  • -d: Run container in the background

  • –name redis: Assign a container name

  • –restart always: Automatically restart on failure or reboot

  • -p 6379:6379: Expose Redis service

  • redis:alpine: Lightweight Redis image

Verify Redis

docker exec -it redis redis-cli ping

Expected output:

PONG

Step 5: Run ntopng Container

docker run -d \
  --name ntopng \
  --net=host \
  --privileged \
  --restart always \
  ntop/ntopng:latest \
  -i eth0 \
  -r 127.0.0.1:6379 \
  -w 3000 \
  --community

Explanation of Options

Option Description
–net=host Allows direct access to host network interfaces
–privileged Required for packet capture
–restart always Ensures service survives reboots
-i eth0 Interface being monitored
-r 127.0.0.1:6379 Redis backend location
-w 3000 Web UI port
–community Community Edition mode

Step 6: Verify ntopng Status

docker ps
docker logs ntopng

Healthy logs include:

  • ntopng started

  • Listening on port 3000

  • No Redis connection errors


Step 7: Access ntopng Web Interface

Open a browser and navigate to:

http://<SERVER_IP>:3000

Default Credentials

  • Username: admin

  • Password: admin

You will be prompted to change the password on first login.


Common Management Commands

docker restart ntopng
docker logs -f ntopng

Conclusion

You have successfully deployed ntopng Community Edition with Redis on AlmaLinux 9 using Docker.

This configuration provides:

  • Real-time network visibility

  • A stable Redis backend

  • Automatic service recovery after reboot

  • A clean, containerized deployment model

This setup is suitable for labs, VPS environments, and production monitoring systems.
For advanced usage, consider Docker Compose, persistent Redis storage, or multi-interface monitoring.

Share this Doc

How to Install ntopng with Redis on AlmaLinux 9 Using Docker

Or copy link

CONTENTS