Manage Linux Servers via a Modern Dashboard

Quick Answer

Cockpit is a web-based graphical interface for servers. To install Cockpit on AlmaLinux 9, simply run sudo dnf install cockpit -y, open firewall port 9090, and navigate to https://YOUR-VPS-IP:9090 to visually manage your system, services, and resources.

Managing a Linux VPS exclusively through the command line interface (CLI) can be a steep learning curve. Fortunately, Cockpit steps in as the perfect solution: a free, modern Web UI sponsored by Red Hat. This tutorial will show you how to transform a pure terminal environment into an intuitive dashboard on AlmaLinux 9.

Table of Contents

1. What is Cockpit?

Cockpit is an open-source server administration tool that provides an interactive, web-based UI. The best part about Cockpit is that it is non-intrusive. Actions performed in the Cockpit dashboard (like adding users or changing IPs) seamlessly synchronize with the underlying system files and CLI commands.

2. When Should You Use Cockpit?

While SSH remains the ultimate power tool, Cockpit excels in several specific use cases:

  • Rapid Monitoring: View real-time, graphical metrics for CPU, RAM, and Disk I/O without running top or htop.
  • Service Management: Start, stop, and restart systemd services (like Nginx, MySQL, SSH) with a single click.
  • System Logs: Cockpit offers an intelligent log filtering system, making troubleshooting much faster than reading journalctl outputs.
  • Beginner-Friendly: An excellent bridge for new users to learn Linux administration before diving deep into complex shell commands.

3. Step-by-Step Installation on AlmaLinux 9

  • Step 1: Update Your System

    Ensure your AlmaLinux repositories and packages are up to date.

    UPDATE SYSTEM
    sudo dnf update -y
  • Step 2: Install the Cockpit Package

    Cockpit is included in the default AlmaLinux 9 AppStream repository.

    INSTALL COCKPIT
    sudo dnf install cockpit -y
  • Step 3: Enable and Start the Service

    Configure Cockpit to start automatically on system boot.

    ENABLE SERVICE
    sudo systemctl enable --now cockpit.socket
  • Step 4: Open Firewall Port (9090)

    Allow incoming web traffic to access the dashboard through port 9090.

    CONFIG FIREWALL
    sudo firewall-cmd --permanent --add-service=cockpit
    sudo firewall-cmd --reload

4. Verify Cockpit Installation

To ensure the setup was successful, check the status of the Cockpit socket. It should return an active (listening) state.

VERIFY INSTALLATION
sudo systemctl status cockpit.socket

5. How to Access the Web UI

Open your web browser and navigate to: https://YOUR-VPS-IP:9090.

Security Warning Note

Upon your first visit, your browser will display a "Your connection is not private" warning because Cockpit uses a self-signed SSL certificate. This is expected behavior. Click Advanced > Proceed to....

Log in using your root credentials or any user account with sudo privileges.

6. Exploring Main Features and Add-ons

The Cockpit interface is divided into dedicated administrative sections:

Management Area Primary Function
System View overview charts for CPU, RAM, and Network. Apply Software Updates.
Services Manage systemd processes, cron jobs, and sockets visually.
Networking Configure static IPs and manage firewall rules intuitively.
Terminal Access a fully functional command-line interface directly within the web browser.

Extend Cockpit with Modules (Add-ons):
You can significantly boost Cockpit's capabilities by installing extra packages:

INSTALL ADD-ONS
# Manage Docker/Podman Containers
sudo dnf install cockpit-podman -y

# Manage Disk Partitions & RAID
sudo dnf install cockpit-storaged -y

7. Security Recommendations for Cockpit

Since Cockpit grants full system control over the web, security is paramount. Consider applying these settings:

  • Disable Root Login: It is highly recommended to create a new user with sudo access and use that for login. Cockpit allows you to disable direct root logins to prevent brute-force attacks.
  • IP Whitelisting (Rich Rules): Instead of opening port 9090 globally, restrict access strictly to your office IP address.
    sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="YOUR_OFFICE_IP" port protocol="tcp" port="9090" accept'

8. Conclusion

Cockpit represents the perfect balance between the user-friendliness of a Web UI and the deep control of the Linux command line. Deploying this tool on AlmaLinux 9 drastically reduces the daily administrative overhead for sysadmins and developers.

Select the Optimal Server Solution

Need a pristine AlmaLinux 9 environment to freely install your management tools? Experience unparalleled hardware power with Enterprise SSD storage and high-end processors at VietHosting.

More Technical Guides

Explore additional technical guides and practical tutorials to optimize performance and manage your server infrastructure efficiently.