Cockpit’s Interactive Server Admin Interface Makes it Easy for Users to Follow Linux Best Practices

Follow Linux Best Practices With Cockpit

TL; DR: Cockpit is a web-based graphical server interface designed for a wide range of users — from Linux newbies to polished experts looking for an easy way to administer servers. The open solution helps users leverage Linux’s strengths, performing detailed and data-driven system administration tasks in line with best practices. Cockpit’s system APIs and comments allow entire teams of administrators to manage systems based on individual preferences.

In the technology world, characteristics like user-friendliness and simplicity are commonly used to attract beginners to a product or service. The approach certainly makes sense: Without an easy way to get started with a product, the user will likely abandon it altogether.

And sure, advanced users require more functionality than their less-experienced counterparts. But ease of use shouldn’t be limited to newcomers — experts also deserve the chance to make their lives easier.

Scott McBrien, Principal Technical Marketing Manager at Red Hat Enterprise Linux, Red Hat, said that sysadmins are starting to wake up to this reasoning. He’s seen it happen with Cockpit, a web-based server administration tool sponsored by Red Hat.

Cockpit logo

Cockpit is a server administration tool that helps users follow Linux best practices.

“A couple of years ago, one of my co-workers used Cockpit and said, ‘I’m never going to use anything else to manage storage systems again!’” Scott told us. “This co-worker is extremely technical, so it wasn’t a matter of not being familiar with commands or difficult tasks.”

This experienced co-worker could easily navigate expert-level tasks, such as growing a logical volume and expanding the filesystem located on it. He turned to Cockpit not for guardrails, but for a better user experience.

“Through the administrative interface in Cockpit, he was able to see the usage of the storage on his system,” Scott explained. “After selecting a filesystem and clicking the Grow button, he was presented with a slider that he could set to a larger amount of storage. The user interface element permitted him to consume the available storage in that volume group.”

Of course, Scott said Cockpit is also a great technology to help users who are new to Linux or Red Hat ease into admin tasks.

“Many experienced Linux folks tend to turn up their nose at graphical tools,” he said. “Up until at least a few years ago, I was in that camp. In reality, tools like Cockpit offer a variety of features that are useful regardless of experience.”

A Web-Based Linux Server Manager

The Cockpit project was founded on the premise of serving both groups.

Scott told us the project aims to make Linux discoverable for a larger audience of non-Linux system administrators. But the team also tries to make it easy for experts to perform intricate or data-driven system administration tasks according to Linux best practices.

“When the Cockpit project was started, Red Hat distributions were operating off of a suite of graphical Python-based tools that operated through the X Windows framework,” Scott said. “When talking with customers and users about those tools, the comment ‘We don’t use X on our boxes’ was somewhat common.”

The reason: These customers required a full management interface, not just a local GUI.

“There has always been a need for graphical administration tools,” Scott said. “These tools help reduce the complexity of administrative tasks. They also provide an interface to the operating system that is less foreign than the command line. Those coming from other environments that rely on graphical tooling appreciate that.”

Cockpit RHEL

Connecting to RHEL from Microsoft Edge on Windows 10? No problem: Cockpit works where you are.

In addition to Red Hat, Scott said other Linux distributions took a similar approach with their graphical admin utilities. In fact, a handful of open-source projects for web-based admin interfaces existed at the time — some of which could be installed on top of Red Hat distributions.

“However, these projects, not being coupled with the distribution, lacked insight into the recommended methods for performing some administrative tasks on a specific distribution or release,” Scott said. “Also, because they were updated after the release of the distribution, there were instances where the tasks they applied to administer the systems were outdated or incorrect.”

To further complicate the situation, the additional projects often had their own custom configuration files. Or, they would choose configuration file syntax that was incompatible with other distribution-provided utilities.

“If you used one of these alternate tools, you were locked into it because your distribution-provided tools could no longer work,” Scott told us. “These factors helped inform the strategy we still use today for developing Cockpit.”

Those strategies include offering a high-quality, distribution-specific administrative graphical interface. The team also makes tools available to customers and users without requiring a large package set. As a final development strategy, Cockpit allows users to connect to administrative applications using a web browser.

“They are not required to be physically present at the system or to support additional protocols and software on their local system,” Scott said.

Helping Users Leverage Linux’s Strengths

When asked to comment on his favorite aspect of Cockpit, Scott told us he’s in the same boat as many customers.

“I work on several different systems, each with a different OS, so I get a ton of utility out of the terminal interface included in Cockpit,” he said. “It allows me to be on the system I use for, say, video conferencing. But I can also do things like show the terminal when demonstrating something for our team — or allow someone to see the output of a command or the configuration of said machine.”

Cockpit’s web-based interface also makes it easier to access administrative tools on virtual machines. “All I need to resolve is network connectivity to the VM and make sure it has Cockpit installed and running,” he said.

firewall screenshot

Cockpit empowers users to easily edit the firewall.

Scott said that he wished he had access to Cockpit’s session-recording plugin back in the days when he worked as a sysadmin carrying an on-call pager.

“The de facto use is auditing,” he said. “But if you are woken up early in the morning with an escalation from someone else, it is really handy to be able to see what they have done to the system. The plugin shows not only their command history but also the output and error messages provided by those commands, in the context in which they occurred.”

Today, the Cockpit team uses surveys to inform what they should build. Questions include “What parts of your job are the most important or most difficult?” The team then creates appropriate features based on that data.

“In the most recent data, the topmost areas of job importance and difficult tasks were applying software updates and debugging performance problems,” Scott said. “We have worked a lot on these areas over the last year.”

New Performance Metrics and More Efficient Software Update

Scott told us that Cockpit recently introduced a dedicated performance metrics page to help users visualize system activity and performance. He said the performance metrics page is a good start in providing access to various performance data that administrators or developers can use for troubleshooting purposes.

“The goal here is to leverage the natural ability of people to identify potential issues or abnormal behavior before it becomes a problem,” he said. “Or, if it has already caused a problem, allow them to have quickly referenceable data on when and what was involved in that problem.”

The Cockpit team also integrated Red Hat’s tracer technology into its system update functionality.

“This allows for better, more granular advice for administrative action to be taken after updates have been applied to the system,” Scott said. “Instead of being asked to reboot the machine, depending on the updates applied, users could be offered to instead restart affected services.”

In the long term, Scott said he’s interested in better leveraging Cockpit’s modular design.

“We utilize this today when implementing modules like cockpit-composer, cockpit-podman, cockpit-pcp, and others,” he said. “But how awesome would it be if there was a cockpit-PostgreSQL module that did all sorts of database things? Or if organizations could write custom plugins for tasks that are unique to their application or environment?”

Advertiser Disclosure

HostingAdvice.com is a free online resource that offers valuable content and comparison services to users. To keep this resource 100% free, we receive compensation from many of the offers listed on the site. Along with key review factors, this compensation may impact how and where products appear across the site (including, for example, the order in which they appear). HostingAdvice.com does not include the entire universe of available offers. Editorial opinions expressed on the site are strictly our own and are not provided, endorsed, or approved by advertisers.

Our Editorial Review Policy

Our site is committed to publishing independent, accurate content guided by strict editorial guidelines. Before articles and reviews are published on our site, they undergo a thorough review process performed by a team of independent editors and subject-matter experts to ensure the content’s accuracy, timeliness, and impartiality. Our editorial team is separate and independent of our site’s advertisers, and the opinions they express on our site are their own. To read more about our team members and their editorial backgrounds, please visit our site’s About page.