Cockpit – Powerful Monitoring and Administration Tool
Monitoring and administration on Linux servers are not too easy, you need to some advanced experiences to managing Linux servers properly. Also most Linux advanced administrators using command-line to doing their tasks, using command-line to configuring, monitoring and troubleshooting is not too easy as well. There is some useful tools for managing Linux servers via web based portal. Cockpit is one of most powerful web based management for Linux system.
Cockpit Supported OS
Cockpit will install on the below Linux systems and it can manage those distributions:
- Fedora
- Red Hat Enterprise Linux
- CentOS
- Debian
- Ubuntu
- Project Atomic
- Clear Linux
- Arch Linux
Cockpit is included in the Red Hat Enterprise Linux Extras repository in versions 7.1 and later.
Cockpit is included in Ubuntu 17.04 and later, and available as an official backport for 16.04 LTS and later. Backports are enabled by default, but if you customized apt sources you might need to enable them manually.
Cockpit packages are included in Oracle Linux 7.x (It’s not mentioned on official website). I have installed Cockpit on CentOS.
Cockpit Installation
Note: Some Cockpit features may be depended to Linux distribution and version.
Fedora
Cockpit comes installed by default in Fedora Server.
To install Cockpit on other variants of Fedora use the following commands. For the latest versions use COPR.
- Install cockpit:
sudo dnf install cockpit
- Enable cockpit:
sudo systemctl enable --now cockpit.socket
- Open the firewall if necessary:
sudo firewall-cmd --add-service=cockpit sudo firewall-cmd --add-service=cockpit --permanent
Red Hat Enterprise Linux
Cockpit is included in the Red Hat Enterprise Linux Extras repository in versions 7.1 and later:
- Enable the Extras repository:
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
- Install cockpit:
sudo yum install cockpit
- Enable cockpit:
sudo systemctl enable --now cockpit.socket
- Open the firewall if necessary:
sudo firewall-cmd --add-service=cockpit sudo firewall-cmd --add-service=cockpit --permanent
Project Atomic
Connect to an Atomic Host from another instance of Cockpit with the Add Server dashboard UI.
Alternatively you can access Cockpit directly on the Atomic Host if SSH password authentication is enabled:
- Run the Cockpit web service container:
sudo atomic install cockpit/ws sudo atomic run cockpit/ws
CentOS
Cockpit is included in CentOS 7.x:
- Install cockpit:
sudo yum install cockpit
- Enable cockpit:
sudo systemctl enable --now cockpit.socket
- Open the firewall if necessary:
sudo firewall-cmd --permanent --zone=public --add-service=cockpit
sudo firewall-cmd --reload
Debian
Cockpit is included in Debian unstable and in backports for Debian 8 (Jessie) and 9 (Stretch).
- For Debian 9 you have to enable the backports repository:
echo 'deb http://deb.debian.org/debian stretch-backports main' > \ /etc/apt/sources.list.d/backports.list apt-get update
- For Debian 8 you have to enable the backports-sloppy repository:
echo 'deb http://deb.debian.org/debian jessie-backports-sloppy main' > \ /etc/apt/sources.list.d/backports.list apt-get update
- Install the package:
sudo apt-get install cockpit
Ubuntu
Cockpit is included in Ubuntu 17.04 and later, and available as an official backport for 16.04 LTS and later. Backports are enabled by default, but if you customized apt sources you might need to enable them manually.
- Install the package:
sudo apt-get install cockpit
Clear Linux
Cockpit is in Clear Linux OS and can be installed using swupd
:
sudo swupd bundle-add sysadmin-remote sudo systemctl enable –now cockpit.socket
Arch Linux
Cockpit can be found in the Arch User Repository as package cockpit.
Cockpit Features
Let’s review the key features of Cockpit.
Managing Multiple Servers
The coolest feature is managing multiple Linux servers via single web based management tool. You can add any Linux server which has Cockpit installed to the management tool. You can use this scenario, install Cockpit to a single server (Monitoring Server) and then add all other Linux servers to the server.
Managing Virtual Machines
If you have added a Linux server that the server is a virtualization host, then Cockpit be able to manage virtual machines on it.
Managing Firewall
Cockpit be able to manage firewall and make it easier for administration. Managing firewall rules is so easier via GUI.
Terminal
Cockpit allows user to have a terminal window, the terminal window is same as SSH client. This shell and the processes running in it have the same privileges as if the user had logged in via SSH.
Cockpit has more features that you can read about the features on Cockpit’s Documentation.
Cockpit Alternatives
There are many administration tools like Cockpit for Linux:
- ServerSuit
- CentOS Web Panel
- Ajenti
- Webmin
Further Reading
Packet Drop vs Packet Loss – Linux
Red Hat Enterprise Linux Atomic Host – VMware Guest
Webmin – System Configuration Tool