How to Install Cockpit on Rocky Linux 8

Cockpit is one of the best web-based server management dashboards because of its ease of use and installation. It also offers a great dashboard by which you can catch server-related information in real time. It also gives access to CPU load, a variety of processes, filesystem statistics, and other data. This server management tool provides great flexibility in managing Linux servers remotely and locally. With Cockpit, you can address network problems quickly. It also includes superuser control, such as remote reboot or shutdown of the server. Cockpit is a GUI-web-based tool that includes the following features:

  • Storage administration and journal inspection options.
  • Configuration options for the network interface and SELinux.
  • User accounts management.
  • Monitor and manage system services.
  • System subscription management and software update options.
  • Multiple diagnostic reports creation.

Hence, it is good to have Cockpit in the system to handle servers in Linux. The following guide will explain the complete method to install and use Cockpit on Rocky Linux.

How to Install and Use Cockpit in Rocky Linux

Let’s start with updating the system according to the newest performance dependencies available for the Rocky Linux.

$ sudo dnf update

Update packages

Rocky Linux is based on the RHEL distribution, so installing software packages from EPEL may also be necessary. You can update those packages via the following command:

$ sudo dnf install epel-release

Enable EPEL

Once you update the system, execute the below command to download and install the Cockpit via dnf:

$ sudo dnf install cockpit

Install Cockpit

After installing the Cockpit, run the below command to start and enable the Cockpit service command:

$ sudo systemctl start cockpit.socket
$ sudo systemctl enable cockpit.socket

Start Cockpit

The systemctl start works to start the Cockpit service, which means a user needs to execute the same command every time the server restarts or shuts down. That’s why we have used systemctl enable command so that the Cockpit service will run even if the server system is restarted or shut down.

To check that the Cockpit service is running correctly, please run the following command:

$ sudo systemctl status cockpit.socket

Cockpit has been started and is working fine

Now let’s configure the firewall as Cockpit runs on port 9090 for HTTP access. So please execute the following command for it:

$ sudo firewall-cmd --permanent --zone=public --add-service=cockpit

Firewall configuration

Also, use the below command to reload the firewall to make changes successfully:

$ sudo firewall-cmd --reload

Apply changes in the firewall

To check the firewall configuration, use the following command:

$ sudo firewall-cmd --list-all

List firewall rules

As Cockpit is a web-based service, you need the IP address of the active server to access it. To check the IP address, run the following command:

$ ifconfig

Get system IP address

As you can see in the above image, our system IP is Now use the below link to access the Cockpit through the browser:


(Please put your IP address instead <ip_address> while accessing the link)

Once you open the link, you will get the following warning: click on the Advanced button to proceed.

Accept self-signed ssl certificate

In the next section, click on Accept and Continue, and then you will be redirected to the Login Page.

In the Login Page, enter the credentials of your system to proceed.

Cockpit login

Click on Turn on Administrative access and enter the password to get the admin privileges.

Turn on admin access

Enter admin password

Now that you have successfully configured Cockpit in the system, let’s perform basic tasks.

You can use the terminal through the Cockpit terminal, so click on the Terminal option from the Left panel:

Open Terminal

Open the syslogs by clicking on the Logs option:

Syslog viewer

To reboot or shut down the system, go to the Overview section and click Reboot at the top right corner.

System health check

Click on Networking to configure the network & firewall on the system:

network configuration


So it was brief information on the easiest way to install and use Cockpit in Rocky Linux. We hope you got the complete details about the Cockpit, as we included everything. Cockpit is a fantastic tool for handling tasks with an easy-to-use interface.