×


Install Cockpit Web Console on Ubuntu

Need help to install Cockpit web console on Ubuntu?

The guide will help you.


Linux Cockpit is a web-based interface that provides graphical administrative access to a system. With it, you can monitor system resources, add or remove accounts, monitor system usage, shut down the system and perform quite a few other tasks — all through a very accessible web connection.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Software installations tasks.

In this context, we shall look into the steps to install the Cockpit Web Console on Ubuntu.


Steps to install Cockpit on Ubuntu 20.04 LTS Server

1. Install cockpit package on Ubuntu

As Cockpit package is available in the default repository, we could perform this installation easily with the apt command.

$ sudo apt update
$ sudo apt install cockpit -y

This installs the cockpit package in the system. We can now start its service using the following systemctl command :

$ sudo systemctl start cockpit
$ sudo systemctl status cockpit

The “enabled” and “active: running” in the output shows that Cockpit has been started successfully.


2. Access Cockpit Web Console

Cockpit listens on 9090 TCP port.

i. Thus we need to allow the 9090 port in the firewall for this service to work.

ibmimedia@ubuntu-20-04-server:~$ ss -tunlp | grep 9090
tcp LISTEN 0 4096 *:9090 *:*

ii. To allow the 9090 port in the OS firewall, run the following ‘ufw’ command.

ibmimedia@ubuntu-20-04-server:~$ sudo ufw allow 9090/tcp
Rule added
Rule added (v6)

iii. Now access Cockpit web console using the following URL:

https://<Your-Server-IP>:9090

Then, Use the root credentials or sudo user credentials to log in.


The main page section shows us some information about the machine we are running on, as the hardware, hostname, operating system, and system time.

We also have a dropdown menu that let us perform a power option on the system as restart or shutdown.

iv. On the right, we can see some graphs which let us monitoring crucial system activities, in order: Cpu and memory usage, disk activity, and network traffic.


Let us now discuss some sections available in the console.


i. The logs section

The logs section allows us to filter the logs by a period of time and severity, choosing between problems, notices, warnings, and errors.

To access detailed information about a log message, all we have to do is to click on the corresponding row: we will be redirected to a page containing the log details.


The storage section

Here we have some graphs displaying disks reading and writing activities, and immediately after a status bar indicating the filesystems usage amount.

We have also the option to easily add NFS Mounts and Raid Devices.

We could inspect a specific drive by clicking on the related section on the right in the Drives box.


The network section

This section contains graphs about sent and received packets for each interface and network activity in general.

Details about an interface, such as its MAC address are visible by clicking on an interface row. Here we also have the chance to enable or disable the said interface.

It is also possible to easily add a bond, a bridge, or a VLAN using the dedicated buttons.

On the bottom of the page, the network logs are shown.


The accounts and services sections

The last two available sections are about accounts and services management.

In the former, we can very easily create, delete, or obtain information about the users available on the system.

By clicking on a specific user section we will have the option to change its password, lock its account, and even add authorized public ssh keys.

In the services section, we will be presented with an overview of system daemons and targets.

The web interface grants us the ability to start, stop, enable, or disable each service, showing us its current state.


How to perform an administrative task from Cockpit Web Console?

When we access the dashboard for the first time, it shows basic information about our system like package updates, RAM & CPU utilization and Hardware and system configuration, and so on.

We can perform several administrative tasks from the Cockpit web console.

Some of this include:

a. Apply System Updates

b. Managing KVM Virtual Machine

c. Manage System and Application services

d. Terminal Access


Apply System Updates

From the cockpit web console, we can easily perform the system update. Go to the ‘System Updates’ option, where we will get the available updates for the system.

To install all available updates,  click on the “Install All Updates” option.

We will get the message on the screen to reboot the system after applying the updates. So, go ahead and click on the “Restart System”.


Managing KVM Virtual Machine with cockpit

It is also possible to manage KVM VMs using the cockpit web console. By default, the ‘Virtual Machine’ option is not enabled. To enable this option, install ‘cockpit-machines’ using the apt command:

$ sudo apt install cockpit-machines -y

Once the package is installed, then logout and login to the Cockpit console.


Manage System and Application services

From the ‘services’ tab, we can restart, stop, and enable system and application services. To manage any service, just click on that service.


Terminal Access

To access the terminal of the system from the cockpit dashboard, choose the “Terminal” tab.


[Need urgent assistance to install Cockpit web console on ubuntu? – We're available 24*7. ]


Conclusion

This article will guide you on the steps to #install the #Cockpit web console on #Ubuntu. Basically, Cockpit web console provides a #graphical overview of the core components and overall status of a #Linux #machine.

To access cockpit in Linux:

1. Open the Interface by Opening a web #browser and enter the server's IP address with port 9090 in the address bar. If the web browser is on the Cockpit server, open localhost:9090 or hostname:9090.

2. Log into the Cockpit interface with the same user name and password that you would normally use to log into the #system.