Cockpit : A Server Management Tool for Linux

Janmejay Singh
Blockchain Research Lab
6 min readJan 10, 2023

Are you fed up memorising the Linux command line inputs? Are you interested in controlling or observing a server via the internet remotely? Cockpit is the only where to look.

COCKPIT: A SERVER MANAGEMENT TOOL

Cockpit is a web-based graphical interface for servers, intended for anyone who wants to monitor multiple servers at a time from one interface.

It is a free and open-source web-based system management tool for Linux and allows users to easily monitor and manage their servers remotely through a web browser, without the need for command-line access.

Cockpit makes Linux more accessible. While using command-line, one needs to remember the commands but cockpit provides a web browser or a web based interface to access the server and use the basic pointing devices to manage the system. With the advent of this new advancement, tasks like starting containers, managing storage, setting up networks, and reviewing logs have become smoother.

FEATURES OF COCKPIT

The following are some of the significant features:

  • Because the cockpit is modular, it can be expanded by adding new modules. Even your own modules can be created.
  • It can support multiple servers from a single dashboard.
  • It is not intrusive. This indicates that Cockpit gets along just fine with other management solutions.
  • It uses a systemd socket, and it doesn’t use any memory when it is not in use.
  • The UI of Cockpit is very user friendly.
  • Cockpit builds upon existing functionality; it doesn’t require a configuration by default.
  • It doesn’t store the state or data of servers anywhere. It utilizes the same API command-line tools use.
  • It has no special privileges and doesn’t run as root. It establishes a session as the user who is currently logged in and shares their permissions. So, to perform administrative tasks, the user needs permission to use sudo or Policykit to escalate privileges.
  • It’s free to use and available under the GNU LGPL(Lesser General Public License).

In addition to its wide range of features, Cockpit is also designed to be lightweight and easy to install. It can be installed on a variety of Linux distributions, and does not require any special dependencies or libraries.

BENEFITS OF USING COCKPIT

“With Linux, I am in control of my computer. With Windows, my computer is in control of me.”

It was previously stated but now Cockpit makes managing our Linux system very easy. Even multiple servers can be managed simultaneously. With this tech, managing Linux takes less time and we no longer need to memorize each and every command.

One of the main benefits is that it provides a user-friendly interface that makes it easy for even novice users to manage a Linux server. It is also lightweight and can be easily installed on most Linux distributions and allows users to perform a wide range of tasks, including:

  • Monitoring system resources such as CPU usage, memory usage, and network activity
  • Viewing system logs and events
  • Managing users and groups
  • Configuring firewall rules
  • Viewing and managing storage devices
  • Updating software packages
  • Managing and monitoring services

The system tooling used in Cockpit and on the command line are the identical. You are free to switch between Cockpit and other options. Even the built-in terminal in Cockpit comes in handy when connecting from a non-Linux device.

GETTING STARTED WITH COCKPIT

Cockpit can be installed on the following major distributions and works almost everywhere:

  • Fedora
  • RedHat Enterprise Linux
  • Fedora Core OS
  • CentOS
  • Debian
  • Ubuntu
  • Clear Linux
  • Archlinux
  • Tumbleweed
  • SUSE Linux Enterprise Micro

Once Cockpit is operational, you can access systems using any operating system’s main web browser (including Windows, MacOS, and Android).

Installing Cockpit on your Linux server :

To use Cockpit, you will need to have a Linux server running and have a web browser installed on your local machine. Once you have those prerequisites in place, you can install Cockpit by following these steps:

  1. Update your package manager’s package list :
sudo dnf update  #(on Fedora)
sudo apt-get update #(on Ubuntu)

2. Install the Cockpit package:

sudo dnf install cockpit #(on Fedora)
sudo apt-get install cockpit #(on Ubuntu)

3. Enable the Cockpit service:

sudo systemctl enable --now cockpit.socket

4. Open your web browser and navigate to https://your-server-ip:9090 to access the Cockpit interface.

Cockpit’s Login Prompt on Fedora (*cockpit-project.org)

Accessing the Cockpit web interface :

Once you have logged in to Cockpit, you will be able to perform a variety of tasks such as managing users and groups, viewing system logs, and configuring firewall rules. You can also use Cockpit to monitor resource usage, such as CPU and memory usage, and to view a list of running processes. Following are the list of services which you can access with help of Cockpit :

  1. Monitoring System Resources with Cockpit
  • Viewing CPU, memory, and network usage
  • Viewing system logs and events
  • Setting up alerts and notifications
Connecting to Debian Server (*cockpit-project.org)

2. Managing Users and Groups

  • Adding, modifying, and deleting user accounts
  • Managing user permissions and access controls
  • Setting up SSH keys for secure remote access

3. Configuring Network Settings

  • Setting up network interfaces and IP addresses
  • Configuring firewall rules and port forwarding
  • Monitoring network activity and bandwidth usage
Managing the Logs

4. Managing Storage Devices

  • Viewing and managing disk partitions and file systems
  • Setting up RAID arrays and LVM configurations
  • Monitoring disk usage and performance

5. Updating Software Packages

  • Viewing available software updates
  • Installing and removing software packages
  • Managing package repositories and sources

6. Managing and Monitoring Services

  • Viewing and controlling system services
  • Enabling and disabling services at boot time
  • Setting up service dependencies and dependencies.

WHAT CAN WE ACHIEVE BY EFFECTIVE LINUX SERVER MANAGEMENT ?

Effective Linux server management is important for a variety of reasons. Some of the benefits of having a well-managed Linux server include:

  1. Enhanced security: Servers that are properly configured and kept up-to-date are less likely to be exposed to security risks like malware, hacking, and data leaks.
  2. Increased dependability: Regular upkeep and updates can ensure that your server is always accessible when you need it and help prevent server downtime.
  3. Enhanced performance: A Linux server’s speed and efficiency can be increased with proper optimization, which will benefit your users and clients.
  4. Reduced costs: You can save money in the long term by using proper server administration to prevent expensive repairs and downtime.

For your server to run smoothly and securely, as well as to deliver the services it does, efficient Linux server management is crucial.

Cockpit also includes a number of built-in tools for managing and configuring various aspects of a Linux system. These tools include a terminal emulator, a network configuration tool, and a system log viewer.

CONCLUSION

Overall, Cockpit is a powerful and user-friendly tool for managing and monitoring Linux servers. It provides a convenient and easy-to-use interface for performing a wide range of tasks, and is an excellent choice for both experienced Linux administrators and those new to the platform.

Cockpit is a strong and portable tool that enables users to configure their systems more quickly. It aids in the simplification of simple jobs but is not intended to take the place of configuration management solutions like Ansible. It keeps security in mind and doesn’t interfere, destroy configuration files, enforce any opinions, etc. Additionally, cockpit-machines will take the place of virt-manager in next releases, thus familiarisation is required.

KEYNOTES

In this article we get to know about Cockpit, it’s features and how we can access it. Apart from this we also saw some of the important benefits of using Cockpit. The main things that we have learnt from this article are as following :

  1. What is Cockpit? A web-based graphical server interface is called Cockpit.
  2. It doesn’t need any specialised dependencies or libraries and can be installed on a range of Linux distributions.
  3. It offers a user-friendly interface that makes managing a Linux server simple for even inexperienced users. Additionally, it is lightweight and simple to install.
  4. Additionally, Cockpit allows you to view a list of active processes and track resource utilisation, including CPU and memory usage.
  5. A range of integrated tools for managing and configuring various parts of a Linux system are also included in Cockpit.

--

--