How to Add Third-Party Modules to Cockpit

How to Add Third-Party Modules to Cockpit
April 27, 2023

Cockpit is a great alternative to managing your Rocky Linux servers. With this well-designed GUI admin control panel, you can take care of a number of tasks out of the box, such as viewing logs; managing storage, networking, and containers; adding and editing user accounts, controlling services, updating software, viewing diagnostic reports and kernel dumps, managing SELinux, and even accessing the terminal window for the machine via the web-based GUI. You also get an at-a-glance view of system health, resource usage, and configuration. From the configuration widget, you can even easily join the server to a domain, edit the hostname, set a default crypto policy, and view secure shell keys.


And that's just out of the box. 

What you might not know is that Cockpit can work with third-party modules to add even more features to the app. You'll find modules for things like:

These are just some of the available modules. It may not seem like much, but when you add this list to the default features, Cockpit becomes even more powerful. Shoutout to 45Drives for developing several of these modules!

One thing about these modules is that you won't find a point-and-click method for adding them to Cockpit (which, to be frank, should be the case). Because of that, you have to add them manually. Fortunately, they are actually pretty easy to install…so long as you're comfortable running a few commands. Of course, if you're using Rocky Linux as your server OS, the command line shouldn't be a problem. 

Another thing you must understand is not every available Cockpit module will work on every system. For example, the ZFS Manager will only work on machines that use the ZFS file system. 

However, many of the other modules will work just fine.

Let's see how to install them.

What you'll need

To make this work, you'll need the following things:

  • A running instance of Rocky Linux.

  • Cockpit enabled.

  • A user with sudo privileges.

  • A network connection.

That's it. Let's get to work. We'll demonstrate with the File Sharing module (as I've found it to be very useful).

Installing the File Sharing module

To install this module, you can either log into Cockpit and access the Terminal feature, or SSH into your server and run the install command from there. Since we're dealing with Cockpit, let's use the built-in Terminal. 

Log in to Cockpit and click Terminal in the left navigation, which will open the terminal window for that server. From the terminal, issue the command:

sudo dnf install cockpit-file-sharing -y

This will install a number of dependencies, including gssproxy, keyutils, libev, libnfsidmap, libverto-libev, python3-pyyaml, rpcbind, ssd-nfs-idmap, and nfs-utils. 

Once the installation has finished, refresh the Cockpit page in your browser, and you should see a new File Sharing entry in the left navigation (Figure 1).

Figure 1

image 1 1024x545

The File Sharing module has been successfully installed on Rocky Linux.

In the case of the File Sharing module, there are a couple of things to take care of before it will actually work. First, you must make a configuration change to Samba. Open the config file with:

sudo nano /etc/samba/smb.conf

In that file, add the following line to the [global] section:

include = registry

Save and close the file. Restart Samba with:

sudo systemctl restart smb

At this point, the Samba section of the File Sharing module will work (Figure 2).

Figure 2

image 2 1024x552

The Samba portion of the File Sharing module now functions as expected.

To get the NFS portion of the module to work, you'll need to run the following additional commands:

sudo systemctl enable nfs-server --now
sudo firewall-cmd --permanent --add-service=nfs
sudo firewall-cmd --reload

Now, if you click the NFS tab of the File Sharing module, you'll see it finally works, and you can start adding NFS shares from within Cockpit (Figure 3).

Figure 3

image 1024x275

The NFS portion of the File Sharing module now works as expected.

And that's all there is to installing third-party modules for the Cockpit management system. Although the number of available modules is limited, what is available adds some very important features to the system. Hopefully, as Cockpit continues to grow in popularity, more modules will be added. Until then, add what you need to make Cockpit even more powerful.

Related posts

2023 Holiday Gift Guide for Rocky Linux Users

2023 Holiday Gift Guide for Rocky Linux Users

Dec 19, 2023

Rocky Linux

Why Rocky Linux Is a Rock-Solid Choice in an Economic Downturn

Why Rocky Linux Is a Rock-Solid Choice in an Economic Downturn

Jan 18, 2023

Rocky Linux

6 Signs That It's Time to Move to Rocky Linux

6 Signs That It's Time to Move to Rocky Linux

Feb 23, 2023

Rocky Linux