Friday, June 14, 2024
HomeHow toHow to Install Cockpit Web Console on Ubuntu 22.04

How to Install Cockpit Web Console on Ubuntu 22.04

Cockpit is a free and open-source server management console that makes it easy to administer your Linux servers via a web browser. It offers a web-based control panel to manage your server via the web browser. It is specially designed for beginner users unfamiliar with the Linux command line. With Cockpit, you can monitor CPU load, filesystem statistics, processes, and more information. You can also perform system administration tasks such as creating and managing users, troubleshooting network issues, uploading and downloading files, and more using Cockpit.

This tutorial will show you how to install and use Cockpit on Ubuntu 22.04.


  • A server running Ubuntu 22.04.
  • A root password is configured on the server.

Install Cockpit on Ubuntu 22.04

By default, the Cockpit package is included in the Ubuntu 22.04 default repository. You can install it by running the following command:

apt-get install cockpit -y

After installing Cockpit, run the following command to install the Podman module:

apt-get install cockpit-podman -y

Once the Cockpit is installed, start the Cockpit service and enable it to start at system reboot:

systemctl start cockpit
systemctl enable cockpit

you can also check the status of the Cockpit using the following command:

systemctl status cockpit

You should see the following output:

? cockpit.service - Cockpit Web Service
     Loaded: loaded (/lib/systemd/system/cockpit.service; static)
     Active: active (running) since Mon 2022-12-05 15:15:24 UTC; 8s ago
TriggeredBy: ? cockpit.socket
       Docs: man:cockpit-ws(8)
    Process: 16161 ExecStartPre=/usr/lib/cockpit/cockpit-certificate-ensure --for-cockpit-tls (code=exited, status=0/SUCCESS)
   Main PID: 16176 (cockpit-tls)
      Tasks: 1 (limit: 4579)
     Memory: 956.0K
        CPU: 363ms
     CGroup: /system.slice/cockpit.service
             ??16176 /usr/lib/cockpit/cockpit-tls

Dec 05 15:15:24 ubuntu2204 systemd[1]: Starting Cockpit Web Service...
Dec 05 15:15:24 ubuntu2204 cockpit-certificate-ensure[16168]: /usr/lib/cockpit/cockpit-certificate-helper: line 32: sscg: command not found
Dec 05 15:15:24 ubuntu2204 cockpit-certificate-ensure[16169]: ..+...+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....>
Dec 05 15:15:24 ubuntu2204 cockpit-certificate-ensure[16169]: ...+...........+...+..........+..+...+.+.....+.......+..+.+..+....+.........+..>
Dec 05 15:15:24 ubuntu2204 cockpit-certificate-ensure[16169]: -----
Dec 05 15:15:24 ubuntu2204 systemd[1]: Started Cockpit Web Service.

At this point, the Cockpit is started and listens on port 9090. You can check it with the following command:

ss -antpl | grep 9090

You should see the following output:

LISTEN 0      4096               *:9090             *:*    users:(("cockpit-tls",pid=16176,fd=3),("systemd",pid=1,fd=61))

Configure UFW Firewall

If the UFW firewall is installed and configured on your system then you will need to allow ports 80 and 9090 through the UFW firewall.

You can allow both ports using the following command:

ufw allow 9090
ufw allow 80

Next, reload the UFW firewall with the following command:

ufw reload

You can now check the status of UFW firewall rules using the following command:

ufw status

You should see the following output:

Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
80                         ALLOW       Anywhere                  
9090                       ALLOW       Anywhere                  
22 (v6)                    ALLOW       Anywhere (v6)             
80 (v6)                    ALLOW       Anywhere (v6)             
9090 (v6)                  ALLOW       Anywhere (v6)             

Access Cockpit Web Interface

Now, open your web browser and access the Cockpit web interface using the URL https://your-server-ip:9090. You should see the Cockpit login page:

Provide your root username, password and click on Login. You should see the Cockpit dashboard:

In the left pane, click on Storage to see your system’s partition information:

Click on the Networking. You should see the network-related information on the following screen:

Click on the Podman Containers. You should see all containers and images:

Click on the Services. You should see your all system services.

Click on the Applications. You should see all installed applications.

Click on the Terminal. You can connect to your server’s command-line interface.

Frequently Asked Questions about Cockpit Web Console

What is Cockpit Web Console?

Cockpit Web Console is a web-based interface that provides a user-friendly and easy-to-navigate platform for managing servers. It allows administrators to perform tasks such as monitoring system performance, starting and stopping services, managing storage, and configuring network settings on Ubuntu servers.

How do I access the Cockpit Web Console?

After installation, you can access the Cockpit Web Console by opening a web browser and navigating to `https://<your-server-ip>:9090`. Replace `<your-server-ip>` with the IP address of your Ubuntu server.

Do I need special permissions to use Cockpit?

You need to have administrative privileges on the Ubuntu server to perform most of the tasks in Cockpit. You will typically log in with your system user account and password.

Is Cockpit secure?

Cockpit is designed with security in mind. It uses HTTPS for encryption and requires user authentication. It also integrates with existing Ubuntu security features like firewalls and SELinux policies.

Can I manage multiple servers with Cockpit?

Yes, Cockpit allows you to manage multiple servers from a single interface. You can add and connect to multiple servers within the Cockpit dashboard for convenient centralized management.

What kind of system information can I view in Cockpit?

Cockpit provides detailed information about system performance, including CPU, memory, disk usage, network activity, and more. It also shows logs, service status, and allows for system updates.

Can I use Cockpit to manage Docker containers?

Yes, Cockpit has an extension for managing Docker containers. You can install the Cockpit Docker module to enable this functionality.

Is it possible to configure network settings through Cockpit?

Yes, Cockpit allows you to configure network settings such as IP addresses, routing, and DNS settings directly from its web interface.

How do I update Cockpit?

Cockpit can be updated just like any other package on Ubuntu. Simply run:

sudo apt update && sudo apt upgrade

in the terminal to update it to the latest version.

Is there any cost associated with using Cockpit?

No, Cockpit is an open-source tool and is available free of charge.

Where can I find more documentation on Cockpit?

You can find comprehensive documentation and user guides on the official Cockpit website and the Ubuntu documentation pages.


Congratulations! you have successfully installed Cockpit on Ubuntu 22.04. Cockpit is a very useful tool for Linux users to manage and configure services on Linux-based servers. Feel free to ask me if you have any questions.



Please enter your comment!
Please enter your name here

Most Popular