How to Install Cockpit on Fedora 36 Linux

Cockpit is a free remote server manager that is lightweight and easy to use for GNU/Linux servers. Cockpit is a web-based graphical interface for servers intended for people new to Linux to the experts such as sysadmins. Cockpit makes Linux discoverable, allowing anyone using the software to perform tasks such as start containers, administer storage, configure networks, and inspect logs.

In the following tutorial, you will learn how to install or enable Cockpit on Fedora 36 Workstation or Server using the command line terminal, along with how to access the web UI.

Update Fedora

First, before you begin the installation, you should update your system to make sure all existing packages are up to date to avoid any conflicts.

sudo dnf upgrade --refresh -y

Install / Enable Cockpit

By default, Cockpit is available in Fedora’s default repository. The Fedora Server has Cockpit installed by default unless it was a variant installation by some Cloud providers, for instance, that strip back nearly all packages for a light install. Fedora Workstation does not come with Cockpit installed by default either.

To install Cockpit, execute the following command in your terminal.

sudo dnf install cockpit cockpit-selinux -y

Note, the SELinux package should be installed as Cockpit for users new to Fedora/RHEL and discover SELinux can often block software that you had no issues running with, say Ubuntu; Cockpit can make troubleshooting this very easy.

Once installed, by default, the service is not active, so you will need to do a few systemctl commands as follows.

Start Cockpit using the following command.

sudo systemctl start cockpit cockpit.socket

For users that would like to enable Cockpit on system startup, so it is always active, use the following command.

sudo systemctl enable cockpit cockpit.socket

Next, verify the status of Cockpit to make sure it is running correctly on your system.

systemctl status cockpit

Example output if everything is working correctly:

How to Install Cockpit on Fedora Linux 36

Configure Firewall for Cockpit

The next step is to allow your firewall Cockpit access to listen. By default, Cockpit listens on port 9090.

To set this, execute the following command in your terminal.

sudo firewall-cmd --permanent --zone=public --add-service=cockpit

Now reload the firewall to make the changes effective immediately.

sudo firewall-cmd --reload

How to Access Cockpit Web UI

Now that you have confirmed or installed Cockpit, it is time to open it using your favorite Internet Browser.

First, find out your servers IP address:

hostname -I

Next, in your browser, type the example address with port 9090 at the end.


When you first try to navigate the Cockpit Web UI, you will come across an alert. This will notify that the connections are not potentially are not private.

Click on the Advanced button, then Accept the Risk and Continue.


How to Install Cockpit on Fedora Linux 36

Next, you will see the Cockpit login, and this is your same sudo username or root username and password—log in to proceed to the dashboard.

Example (Click to Expand):

How to Install Cockpit on Fedora Linux 36

Once logged in, you will see the immediate dashboard. Cockpit’s main options are on the left side, where you can add additional hosts if they have SSH allow connections, view logs, configure network and containers, restart, kill and maintain services and much more.

Example (Click to Expand):

How to Install Cockpit on Fedora Linux 36

As mentioned above, in the middle of the screen, you can monitor memory and CPU usage and see detailed history. One of the main benefits of using Cockpit is having a terminal screen in a Web UI. At the bottom of the page, click Terminal.

Example (Click to Expand):

How to Install Cockpit on Fedora Linux 36

A handy feature is that Cockpit makes disabling, enabling, or restarting services very easy, especially for users new to Linux and especially on servers. The Services tab is potentially a good investment in checking out to see what is enabled on your system by default, sometimes depending on the distribution, and you can turn certain services off to decrease the load.

Be sure to research the application service before disabling it.

Example (Click to Expand):

How to Install Cockpit on Fedora Linux 36

Updates can be automatically set up in the Software Updates tab and check the log file of what was updated cleanly and quickly.

Example (Click to Expand):

How to Install Cockpit on Fedora Linux 36

Cockpit has many more tabs and features that can make everyday use of running Fedora on servers and even Workstations easier for users. A good feature is the SELinux tab, and here you can see if any services are being interfered with by SELinux and how to allow or, in other terms, whitelist the application.

For newer users, most recommendations are primarily safe to follow. Still, it does pay to do some research to ensure you are not opening up too many security loopholes and better understand what SELinux is doing.

Example (Click to Expand):

How to Install Cockpit on Fedora Linux 36

Also, previous system modifications to SELinux are visible in the automation script, which can be modified anytime. A previous tutorial that was conducted with installing ClamAV on this VM added the “Allow antivirus to can scan system,” Cockpit is excellent as you can keep an eye on what you have allowed previously and if it is still needed as removing outdated rules is a must for good system security.

Comments and Conclusion

In the tutorial, you have learned how to install or enable Cockpit for Fedora 36 Server or Workstation.

Cockpit is a fantastic option for users to maintain their systems efficiently, and it is designed for new users with sysadmins in mind and can be operated remotely. If you are getting into Linux, Cockpit would be a solid option for understanding how the systems work and identifying issues quickly within a few clicks.


Like to get automatic updates? Follow us on one of our social media accounts!