How to Install Darkstat on Ubuntu 24.04, 22.04 or 20.04

Darkstat is a lightweight and efficient network traffic analyzer that provides real-time monitoring and detailed network usage statistics. It captures network traffic and generates web-based reports with information on traffic flows, bandwidth usage, and network connections. Darkstat is ideal for system administrators and network engineers who need a simple yet powerful tool to monitor network performance and diagnose potential issues.

To install Darkstat on Ubuntu 24.04, 22.04, or 20.04 using the command-line terminal, follow the steps outlined in this guide. Using the default Ubuntu repositories ensures you get a reliable and up-to-date version of Darkstat, ready to provide comprehensive insights into your network traffic.

Install Darkstat via APT Command

To install Darkstat, a network traffic analyzer, utilize the apt package manager available in Ubuntu’s official repositories. Execute the command below in your terminal:

sudo apt install darkstat

Verify Darkstat Service Status

Once Darkstat installation completes, confirm its operational status with the following command:

systemctl status darkstat

This command queries and displays the Darkstat service status. A successful query will show Darkstat as active and running, indicating a successful installation and startup.

Configure Darkstat

Identify the Network Interface

To tailor Darkstat’s monitoring, select the network interface it will observe. This interface could be an Ethernet connection, a Wi-Fi link, or a virtual network interface established by VPN services.

Discover the desired network interface’s name by executing:

ip link

This command lists all network interfaces available on your system. Identify the one you intend to monitor, noting its name. For this guide, we’ll assume the interface name is eth0.

Edit Darkstat Configuration

Access Darkstat’s configuration file to customize its settings:

sudo nano /etc/darkstat/init.cfg

In the configuration file, activate Darkstat to launch at system startup by modifying the line:

#RUN_DARKSTAT=no

to:

RUN_DARKSTAT=yes

Specify the network interface for Darkstat to monitor by adjusting:

#INTERFACE=""

to include your chosen interface name, here exemplified as eth0:

INTERFACE="eth0"

Optionally, alter the PORT setting to choose a different port for Darkstat’s web interface. The default port is 667, but you may set it to any preferred value. After making your adjustments, save and exit the editor by pressing CTRL+X, then Y to confirm.

Restart Darkstat Service

Apply the configuration changes and restart Darkstat to activate monitoring:

sudo systemctl restart darkstat

This restart makes Darkstat monitor the specified interface and start automatically on boot using the updated settings.

Accessing the Darkstat Dashboard

With Darkstat configured, its web interface is a powerful tool for monitoring your network traffic. To access it, open any web browser on your Ubuntu machine and navigate to your system’s IP address on port 667. For instance, if your system’s IP address is 192.168.1.100, you would enter:

http://192.168.1.100:667

Upon doing so, Darkstat’s web interface will present itself, showcasing detailed insights into your system’s network traffic. This interface includes several tabs and options, allowing comprehensive traffic analysis and monitoring.

Conclusion

With Darkstat successfully installed on your Ubuntu system, you now have a powerful real-time network traffic analysis tool. Its web-based interface lets you easily monitor bandwidth usage, traffic flows, and network connections. Regularly check for updates and refer to the Darkstat community and documentation for support if needed. Utilize Darkstat to ensure your network operates efficiently and to identify and resolve any potential issues quickly.

Leave a Comment