This guide will show you how to manage and monitor the status of your Ubuntu Linux server right from the comfort of your web browser using Cockpit.

Why Use Cockpit?

Cockpit is a web-based Linux server administration tool for managing and monitoring your servers remotely. Cockpit allows you to see your server in a web browser and perform system tasks using both graphical and terminal tools.

Also, you can use Cockpit to manage containers, administer storage, configure networks, and inspect system log messages.

How to Install Cockpit on Linux

This guide will cover the installation process on an Ubuntu Linux server. You might also wish to know that other major Linux distros such as Fedora, RHEL, Arch Linux, and Debian also support Cockpit.

Before starting with the installation, update your system's repository list using APT:

        sudo apt update
    

To install Cockpit on your Ubuntu Linux server, run the following command:

        sudo apt install cockpit
    

Cockpit runs on port 9090 which is enabled by default on Ubuntu. If you are using a firewall, make sure that you enable port 9090 using ufw, a command-line tool for managing your Ubuntu firewall.

        sudo ufw allow 9090
    

Also, if you are using a server on web services such as Azure or AWS, make sure that you add inbound port rules to enable port 9090.

Accessing Your Server Using Cockpit

Once Cockpit is up and running, you can access your server from all mainstream web browsers including Firefox, Chrome, and Microsoft Edge on any operating system of your choice.

Launch your favorite browser and go to the following URL:

        https://ipaddress:9090
    

...where ipaddress is the IP address of your Ubuntu server. You can easily check the IP address on your Linux system using the host command.

Your browser may try to warn you that the site is not secure because Cockpit is using a self-signed certificate. To bypass this warning, first, click on the Advanced button. Then, click on Accept Risk and Continue to access the Cockpit interface.

browser warning of a self signed certificate

After accepting to proceed with the self-signed certificate, the browser will display a login screen that looks similar to the one below. Enter your server login name and password. The login page briefly shows you the server name and the server OS that you are using, in this case, Ubuntu Server 20.04 LTS.

cockpit login page for a server in azure

Once logged in, the system will present you with an overview screen for managing your server with Cockpit.

cockpit overview page

As you can see, the Cockpit GUI is very intuitive and provides you with so much power to manage your server and check its status. For example, you can restart the server from the Cockpit Overview page. You are also notified of important things on the front page such as software updates and resources usage.

The sidebar on the left contains the following tabs and each of them displays a particular set of information related to your server.

Overview

The Overview tab is one of the most important pages in Cockpit as it provides you with the most important information of interest related to the server, such as the hostname, CPU usage, and RAM information.

Logs

The Logs page lists all the important system logs that are available on your Ubuntu server. Also, you can filter the logs that you want to look at, by date, severity, or service.

listing of system logs in cockpit

Storage

The Storage page gives you insights on your storage devices and mounted disks, including their sizes as you would have them displayed using the Linux df command tool. Also, the system will display logs related to storage on this page.

Networking

The Networking page displays basic networking information and your IP address. You can also use this page to configure your network bridge or add a VLAN.

Accounts

This page shows you a list of users that are available on your server. You can also use this tab to manage user account settings such as adding a new user account to your server, resetting the password, adding SSH keys, etc.

Services

The Services tab displays important system services. You can also search for services by name or filter services by status i.e. enabled, disabled, or static. Clicking on a service gives you more information about that service and allows you to change its status. Cockpit will also display the logs related to a particular service.

cockpit services page showing linux services

Terminal

Another important feature of Cockpit is that it provides you with a terminal window that allows you to run any Linux command of your choice. This means you will be able to run Linux commands on a tablet or smartphone with ease.

cockpit linux terminal

Improving Server Management With Cockpit

This guide has shown you how to manage your Ubuntu Linux server with Cockpit, a powerful and intuitive web-based tool for managing and monitoring Linux servers.

SSH still remains one of the most common methods for accessing remote servers. Learn how to improve your SSH connections with Mosh and Tmux.