How to Install Cockpit Web Console on Ubuntu 20.04 Server

Cockpit is a free and open source web console tool for Linux administrators and used for day to day administrative and operations tasks. Initially Cockpit was only available for RHEL based distributions but now a days it is available for almost for all Linux distributions. In this article we will demonstrate how to install Cockpit on Ubuntu 20.04 LTS Server (focal fossa) and what administrative tasks can be performed with Cockpit Web Console.

Installation of Cockpit on Ubuntu 20.04 LTS Server

Since Ubuntu 17.04, cockpit package is available in the default package repositories. So the installation has become straight forward using apt command,

$ sudo apt update
$ sudo apt install cockpit -y

apt-install-cockpit-ubuntu-20-04-lts-server

Once cockpit package is installed successfully then start its service using the following systemctl command,

$ sudo systemctl start cockpit

Run the following to verify the status of cockpit service,

$ sudo systemctl status cockpit

cockpit-service-status-ubuntu-20-04

Above output confirms that cockpit has been started successfully.

Access Cockpit Web Console

Cockpit listen its service on 9090 tcp port, in case firewall is configured on your Ubuntu server 20.04 then you have to allow 9090 port in firewall.

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

Run following ‘ufw’ command to allow cockpit port in OS firewall,

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

Now access Cockpit web console using following url:

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

Cockpit-Ubuntu-20-04-Login-Console

Use the root credentials or sudo user credentials to login, in my case ‘pkumar’ is the sudo user for my setup.

Cockpit-Dashboard-Ubuntu-20-04

Perfect above screen confirms that we have successfully able to access and login cockpit dashboard. Let’s see what are the different administrative task that can be performed from this dashboard.

Administrative Task from Cockpit Web Console on Ubuntu 20.04 LTS Server

When we first time login to dashboard, it shows basic information about our system like package updates, RAM & CPU utilization and Hardware and system configuration etc.

1)    Apply System Updates

One of important administrative task is to apply system updates, from cockpit web console we can easily do this, go to the ‘System Updates’ option where we you will get the available updates for your system, example is shown below,

Software-Updates-Cockpit-Ubuntu-20-04-Server

If you wish to install all available updates, then click on “Install All Updates” option

Apply-Updates-Cockpit-Ubuntu-20-04

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

2)    Managing KVM Virtual Machine with cockpit

It is also possible that we can manage KVM VMs using cockpit web console but by default ‘Virtual Machine’ option is not enabled. To enable this option install ‘cockpit-machines’ using apt command,

$ sudo apt install cockpit-machines -y

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

Virtual-Machines-Ubuntu-20-04-Cockpit

3)    View System Logs

From the ‘Logs’ tab we can view our system logs. System logs can also be viewed based on its severity.

Logs-ubuntu-20-04-cockpit

4)    Manage Networking with Cockpit

System networking can easily be managed via networking tab from cockpit web console. Here we can view our system Ethernet cards speed. We have the features like creating bonding and bridge interface. Apart from this we can also add VLAN tagged interfaces on our system.

Networking-ubuntu-20-04-cockpit

5)    Manage System and Application services

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

Services-cockpit-Ubuntu-20-04-server

6)    Manage Local Accounts

If you want to manage local account then choose ‘Accounts’ tab from web console, here you can create new local accounts and change the parameters of existing users like password reset, roles and lock account.

Manage-Accounts-Cockpit-ubuntu-20-04

7)    Terminal Access

If you wish to access terminal of your system from cockpit dashboard then choose “Terminal” tab.

Cockpit-Terminal-Ubuntu-20-04

That’s all from this tutorial, I hope you got an idea on how to install and use Cockpit Web console effectively on Ubuntu 20.04 LTS Server. Please don’t hesitate to share your valuable feedback and comments.

Also Read How to Install Cockpit Web Console on Debian 10

Also Read : How to Fix ‘Repository does not have a release file’ Error in Ubuntu

Leave a Comment