Cockpit w EuroLinux 9

Cockpit in EuroLinux 9

Imagine how great it would be if, in order to configure a new Linux server, you don’t have to memorize and issue commands. There is a dedicated tool for this – Cockpit. In this article we will show you how to install it and tell you about its features.

Imagine how great it would be if, in order to configure a new Linux server, you don’t have to memorize and issue commands. There is a dedicated tool for this – Cockpit. Today we will show you how to install it and tell you about its features.

Cockpit is a lightweight and simple web-based tool for managing Linux servers from a friendly graphical interface. It makes it easy to perform tasks such as running containers, administering storage, configuring networks or checking logs. Through the use of APIs, it allows an entire team of administrators to manage systems in their preferred way.

Features

Here’s a list of examples of the features Cockpit offers:

  • inspecting and changing network settings
  • firewall configuration
  • storage management (including RAID and LUKS partitions)
  • managing virtual machines
  • downloading and running containers
  • reviewing system logs
  • inspecting the hardware on which the system runs
  • upgrading software
  • performance monitoring
  • managing user accounts
  • managing systemd-based services
  • using the browser-based terminal.

Installation

The installation of the tool is simple and comes down to calling the following commands:

sudo dnf install -y cockpit'*'
sudo systemctl enable --now cockpit

Usage

As part of the blog post, we assume that the tool has been installed on the same computer from which we will be connecting to it via the browser. Accordingly, in the browser we enter as address: https://127.0.0.1:9090, we confirm the security exception and log in with the same credentials as for the operating system.

Cockpit

We will be greeted by the following screen:

Cockpit

This is a dashboard that presents information about the server. With it, we can quickly and easily assess the status of the system.

Server management

Creating a new administrator

Let’s create a sample administrative account so that you don’t have to log into Cockpit as root. Naturally, for security reasons, the best practice is to use non-root users to log into Cockpit and SSH.

Go to the Accounts tab and click on the Create new account button.

Cockpit

Fill out the form. We enter the details of the new administrator and the password for this account.

Cockpit

Tick the Server administrator option:

Cockpit

A new administrative account has just been created.

Terminal

Cockpit provides a standard terminal shell. This shell and the processes running in it have the same privileges as if the user had logged in via SSH.

Cockpit

Firewall

Another configuration item when setting up a new server is a firewall. It makes our server more secure. Cockpit allows administrators to enable and manage firewall rules. It also allows you to manage firewalld zones, which we wrote about in this article.

Cockpit

The interface allows adding services to the firewall configuration – with all the ports they use. To illustrate, let’s look at the RH-Satellite-6 rule. It opens ports for the EuroMan platform.

Cockpit

System updates

Let’s configure system updates. To do this, we go to the Software updates tab, which looks as follows:

Cockpit

This dashboard presents some interesting options:

  • immediate installation of security patches only or all patches
  • configuration of automatic updates
  • kernel live patching configuration.

Cockpit

Let’s configure the last two options.

We set up automatic updates and reboot the server every day at 6:00 a.m., installing all updates – not just the security ones.

Cockpit

We also set the kernel patching option for both the current kernel and those installed in the future.

Cockpit

Summary

In this tutorial, we showed you how to install and configure the Cockpit web console. We also showed how to perform various management and configuration tasks from a web browser.

Authors

The blog articles are written by people from the EuroLinux team. We owe 80% of the content to our developers, the rest is prepared by the sales or marketing department. We make every effort to ensure that the content is the best in terms of content and language, but we are not infallible. If you see anything that needs to be corrected or clarified, we'd love to hear from you.