How to install and activate Cockpit web console on RHEL 8

How do I install and enable Cockpit that makes GNU/Linux and RHEL 8 for web management purpose? How do I see and manage my RHEL 8 based server in a web browser and perform system tasks with a mouse?

Introduction: The Cockpit is a free and open source web-based server management tool. By default, Cockpit comes preinstalled on an RHEL 8 server. But, it is not activated. A sysadmin must enable it. One can see the server in a web browser and perform system tasks with a GUI/mouse. It is easy to start containers, administer storage or users, configure networks, and inspect log files on RHEL 8. The Cockpit web interface is user-friendly for new to Linux users and seasoned sysadmins too.

The Cockpit web interface is user-friendly for new to Linux users and seasoned sysadmins too. Of course, you can use ssh to manage your server or use the web interface at any time. There is even an embedded terminal in Cockpit web GUI.

How to install Cockpit web console on RHEL 8

Cockpit is included in the Red Hat Enterprise Linux Extras repository in versions 7.1 and later. It is installed by default on RHEL 8. Here is how to installed it on RHEL 8 using the yum command
$ sudo yum install cockpit

Open the firewall ports:
$ sudo firewall-cmd --add-service=cockpit
$ sudo firewall-cmd --add-service=cockpit --permanent

Sample outputs:

Created symlink /etc/systemd/system/ ? /usr/lib/systemd/system/cockpit.socket.

How to activate Cockpit web console on RHEL 8

Once installed, enable and activate Cockpit web console on RHEL 8, by running the following systemctl command:
$ sudo systemctl enable --now cockpit.socket
By default, Cockpit accepts connections on port TCP port # 9090. Use the ss command to view open port:
$ sudo ss -tulpn | grep :9090
Sample outputs:

tcp    LISTEN   0        128                     *:9090                 *:*      users:(("cockpit-ws",pid=4278,fd=3),("systemd",pid=1,fd=27))

How to use Cockpit web console on RHEL 8

Now that you have Cockpit installed and enabled on RHEL 8, it is time to start using it. All you have to do is fire a web browser and type the following url:
OR use FQDN:
When prompted use your RHEL 8 system user account and password to log into the system:

Press Login button and voila:

Once logged in you will see the Cockpit Dashboard (click to enlarge)

Let us take a quick tour of rest of the Cockpit web UI that one can use manage RHEL 8 box (click to enlarge image):


The Cockpit software is entirely free to use and available under the GNU LGPL. It is perfect for managing the server based upon RHEL 8. However, for a large number of servers or VMs you better use something like Ansible. For more info see Cockpit project home page here.

(adsbygoogle = window.adsbygoogle || []).push({});

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...