Install cockpit on Ubuntu 22.04

This article is going to take you through on how to Install cockpit on Ubuntu 22.04. Cockpit is an interactive server administration user interface that gives a live Linux session via a web browser. It’s an easy-to-use, lightweight, and simple yet powerful remote manager for GNU/Linux servers.

How to Install cockpit on Ubuntu 22.04

  • Start by updating your system.
sudo apt update
  • Next install cockpit using the following command.
sudo apt install cockpit

Sample output

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cockpit-bridge cockpit-dashboard
  cockpit-networkmanager cockpit-packagekit
  cockpit-storaged cockpit-system cockpit-ws finalrd
  libblockdev-mdraid2 libbytesize1
  libpwquality-tools mdadm
Suggested packages:
  cockpit-doc cockpit-pcp cockpit-machines sssd-dbus
  default-mta | mail-transport-agent dracut-core
The following NEW packages will be installed:
  cockpit cockpit-bridge cockpit-dashboard
  cockpit-networkmanager cockpit-packagekit
  cockpit-storaged cockpit-system cockpit-ws finalrd
  libblockdev-mdraid2 libbytesize1
  libpwquality-tools mdadm
0 upgraded, 13 newly installed, 0 to remove and 3 not upgraded.
Need to get 5,750 kB of archives.
After this operation, 8,753 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit-bridge amd64 215-1 [557 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit-ws amd64 215-1 [1,298 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libpwquality-tools amd64 1.4.2-1build1 [9,640 B]
Get:4 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit-system all 215-1 [1,889 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit all 215-1 [18.0 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit-dashboard all 215-1 [195 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit-networkmanager all 215-1 [385 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit-packagekit all 215-1 [380 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libbytesize1 amd64 2.2-1 [11.4 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 mdadm amd64 4.1-5ubuntu1.2 [417 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libblockdev-mdraid2 amd64 2.23-2ubuntu3 [12.2 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cockpit-storaged all 215-1 [571 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 finalrd all 6~ubuntu20.04.1 [6,852 B]
Fetched 5,750 kB in 30s (192 kB/s)                   
Preconfiguring packages ...
Selecting previously unselected package cockpit-bridge
.
(Reading database ... 227520 files and directories cur
rently installed.)
Preparing to unpack .../00-cockpit-bridge_215-1_amd64.
deb ...
Unpacking cockpit-bridge (215-1) ...
Selecting previously unselected package cockpit-ws.
Preparing to unpack .../01-cockpit-ws_215-1_amd64.deb 
...
Unpacking cockpit-ws (215-1) ...
Selecting previously unselected package libpwquality-t
ools.
Preparing to unpack .../02-libpwquality-tools_1.4.2-1b
uild1_amd64.deb ...
Unpacking libpwquality-tools (1.4.2-1build1) ...
Selecting previously unselected package cockpit-system
.
Preparing to unpack .../03-cockpit-system_215-1_all.de
b ...
Unpacking cockpit-system (215-1) ...
Selecting previously unselected package cockpit.
Preparing to unpack .../04-cockpit_215-1_all.deb ...
Unpacking cockpit (215-1) ...
Selecting previously unselected package cockpit-dashbo
ard.
Preparing to unpack .../05-cockpit-dashboard_215-1_all
.deb ...
Unpacking cockpit-dashboard (215-1) ...
Selecting previously unselected package cockpit-networ
kmanager.
Preparing to unpack .../06-cockpit-networkmanager_215-
1_all.deb ...
Unpacking cockpit-networkmanager (215-1) ...
Selecting previously unselected package cockpit-packag
ekit.
Preparing to unpack .../07-cockpit-packagekit_215-1_al
l.deb ...
Unpacking cockpit-packagekit (215-1) ...
Selecting previously unselected package libbytesize1:a
md64.
Preparing to unpack .../08-libbytesize1_2.2-1_amd64.de
b ...
Unpacking libbytesize1:amd64 (2.2-1) ...
Selecting previously unselected package mdadm.
Preparing to unpack .../09-mdadm_4.1-5ubuntu1.2_amd64.
deb ...
Unpacking mdadm (4.1-5ubuntu1.2) ...
Selecting previously unselected package libblockdev-md
raid2:amd64.
Preparing to unpack .../10-libblockdev-mdraid2_2.23-2u
buntu3_amd64.deb ...
Unpacking libblockdev-mdraid2:amd64 (2.23-2ubuntu3) ..
.
Selecting previously unselected package cockpit-storag
ed.
Preparing to unpack .../11-cockpit-storaged_215-1_all.
deb ...
  • Then start cockpit using the command below.
sudo systemctl start cockpit cockpit.socket
  • To enable cockpit to run on boot use the following command.
sudo systemctl enable cockpit cockpit.socket
  • Cockpit should be running, confirm using the command below.
sudo systemctl status cockpit

Sample output

● cockpit.service - Cockpit Web Service
     Loaded: loaded (/lib/systemd/system/cockpit.serv>
     Active: active (running) since Thu 2022-03-17 14>
TriggeredBy: ● cockpit.socket
       Docs: man:cockpit-ws(8)
    Process: 29470 ExecStartPre=/usr/sbin/remotectl c>
   Main PID: 29475 (cockpit-tls)
      Tasks: 1 (limit: 4588)
     Memory: 624.0K
     CGroup: /system.slice/cockpit.service
             └─29475 /usr/lib/cockpit/cockpit-tls

Mar 17 14:36:41 chat.itnixpro.com systemd[1]: Startin>
Mar 17 14:36:41 chat.itnixpro.com systemd[1]: Started>
  • In case you are using firewall, allow default cockpit port which is 9090.
sudo ufw allow 9090

Access Cockpit Web GUI on Ubuntu 22.04

  • Fire up your favorite web browser and enter server IP followed by port 9090 e.g. server-IP:9090 or localhost:9090. Enter your server username and password to log in.
  • You will be taken to the dashboard as shown below.
  • Manage server storage from the storage tab.
  • Manage your server accounts from accounts tab.
  • There is also terminal access option.
  • You have reached the end of the article, Congratulations. You have learned how to Install cockpit on Ubuntu 22.04.

Read more on Cockpit Documentation.

Other Tutorials

Install Webmin on Ubuntu 22.04

Install Nextcloud on Ubuntu 22.04

Synchronize Files between multiple devices using Syncthing

System administrator | Software Developer | DevOps

Leave a Comment