• Posted: 06-07-2025
  • Last Updated: 10-08-2025
  • Category: VPS Guides

Managing a Virtual Private Server (VPS) from the command line can be challenging, especially for beginners. Fortunately, Cockpit, a powerful and free web-based management tool, allows you to perform administrative tasks visually right from your browser, without needing to memorize complex commands.

This guide will walk you through installing and using Cockpit on your AlmaLinux 9 server.

Table of Contents

1. What is Cockpit?

Cockpit is an open-source management tool developed by Red Hat. It offers a modern web interface to handle administrative tasks on a Linux server, including:

  • Monitoring CPU, RAM, disk, and network usage in real-time.
  • Managing services (start/stop/restart).
  • Configuring the firewall, managing user accounts, and viewing system logs.
  • Applying system updates with a single click.
  • Accessing a full-featured Terminal within the browser.

2. Install Cockpit on AlmaLinux 9

The installation process is simple and consists of just a few steps.

  • Step 1: Update Your System

    Always ensure your system is up-to-date before installing new software.

    sudo dnf update -y
  • Step 2: Install Cockpit

    Use the DNF package manager to install it.

    sudo dnf install cockpit -y
  • Step 3: Open Port 9090 in the Firewall

    Cockpit listens on port 9090. You need to allow traffic through this port via firewalld.

    sudo firewall-cmd --permanent --add-service=cockpit
    sudo firewall-cmd --reload
  • Step 4: Enable and Start the Cockpit Service

    Enable the service to ensure it starts automatically on boot.

    sudo systemctl enable --now cockpit.socket

3. Access the Cockpit Web Interface

Open a web browser on your computer and navigate to the following address:

https://your-vps-ip:9090
  • Your browser will display a warning about a self-signed SSL certificate. This is normal; simply accept the risk and proceed.
  • Log in with your root account or any other user with sudo privileges on your VPS.

4. Useful Features

Here are a few of the main functional areas you'll use frequently in the Cockpit interface:

Feature Description
System Get an overview of system resources, hardware, and OS information.
Services Manage the status of system services (e.g., sshd, httpd).
Logs Check system logs to diagnose issues.
Terminal Access a fully functional command-line interface directly in your browser.
Networking Manage network interfaces, firewall rules, and view connection details.
Storage Manage disk partitions, filesystems, and storage devices.

5. Security Recommendations

To enhance the security of your VPS, consider these additional steps:

  • Create a new user account with sudo privileges and use it instead of logging in as root.
  • Configure the firewall to allow access to port 9090 only from your IP address.
  • Set up a valid SSL certificate (e.g., from Let's Encrypt) to remove the browser warning.

6. Conclusion

Cockpit is an excellent tool that simplifies server administration, making it especially useful for users who are not command-line experts. With just a few simple installation steps, you can manage your AlmaLinux VPS visually and professionally.

If you're looking for a powerful platform to deploy your projects, check out our KVM VPS services at VietHosting, where we support the latest operating systems, including AlmaLinux 9.

Share:
Rating:

( Total: 1 ratings. Average 5, scale: 1 to 5 )