Nov 21, 2023, 9:02 AM
  • By default, the Cockpit package is included in the Ubuntu 22.04 default repository. You can install it by running the following command:
    sudo apt-get install cockpit -y
  • After installing Cockpit, run the following command to install the Podman module:
    sudo apt-get install cockpit-podman -y
  • After installing Cockpit, start the Cockpit service and have it start when the system reboots:
    systemctl start cockpit
    systemctl enable cockpit
  • You can also use the following command to check the status of Cockpit:
     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 Tue 2023-11-21 08:44:56 UTC; 7min ago
TriggeredBy: ● cockpit.socket
       Docs: man:cockpit-ws(8)
    Process: 336904 ExecStartPre=/usr/lib/cockpit/cockpit-certificate-ensure --for-cockpit-tls (code=exited, status=0/SUCCESS)
   Main PID: 336905 (cockpit-tls)
      Tasks: 3 (limit: 37954)
     Memory: 1.5M
        CPU: 358ms
     CGroup: /system.slice/cockpit.service
             └─336905 /usr/lib/cockpit/cockpit-tls
  • At this point, Cockpit has started and is listening on port 9090. You can use the following command to view:
     ss -antpl | grep 9090
  • You should see the following output:
     LISTEN 0      0                  *:9090            *:*
  • Configure a UFW firewall and open port 9090

  • Now, open a web browser and use the URL https://your-server-ip:9090 Access the Cockpit web interface. You should see the Cockpit login page:
    dc983d9f-47a0-4e78-9a25-c173323fcc0d-image.png
    115.png