In this guide, we will go through how to Install Cockpit on Ubuntu 22.04/20.04. Cockpit is a web-based interactive server administration graphical interface that allows you to run a live Linux session. It is an excellent tool to monitor your servers, manage users, groups, storage, services, update software, check logs, and much more.
How to Install Cockpit on Ubuntu 22.04/20.04
- Update Ubuntu packages using the command below.
sudo apt update
- Install Cockpit on Ubuntu using the following command.
sudo apt install cockpit
Sample output
Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: cockpit-bridge cockpit-networkmanager cockpit-packagekit cockpit-storaged cockpit-system cockpit-ws finalrd libblockdev-mdraid2 libbytesize-common libbytesize1 libpwquality-tools mdadm Suggested packages: cockpit-doc cockpit-pcp cockpit-sosreport udisks2-lvm2 sssd-dbus default-mta | mail-transport-agent dracut-core The following NEW packages will be installed: cockpit cockpit-bridge cockpit-networkmanager cockpit-packagekit cockpit-storaged cockpit-system cockpit-ws finalrd libblockdev-mdraid2 libbytesize-common libbytesize1 libpwquality-tools mdadm 0 upgraded, 13 newly installed, 0 to remove and 91 not upgraded. Need to get 6,311 kB of archives. After this operation, 9,244 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cockpit-bridge amd64 264-1 [468 kB] Get:2 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cockpit-ws amd64 264-1 [1,277 kB] Get:3 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libpwquality-tools amd64 1.4.4-1build2 [9,752 B] Get:4 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cockpit-system all 264-1 [2,328 kB] Get:5 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cockpit all 264-1 [19.9 kB] Get:6 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cockpit-networkmanager all 264-1 [522 kB] Get:7 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cockpit-packagekit all 264-1 [587 kB] Get:8 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libbytesize-common all 2.6-1 [7,454 B] Get:9 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libbytesize1 amd64 2.6-1 [12.1 kB] Get:10 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 mdadm amd64 4.2-0ubuntu1 [464 kB] Get:11 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libblockdev-mdraid2 amd64 2.26-1 [11.8 kB] Get:12 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cockpit-storaged all 264-1 [598 kB] Get:13 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 finalrd all 9build1 [7,306 B] Fetched 6,311 kB in 1min 1s (104 kB/s) Preconfiguring packages ... Selecting previously unselected package cockpit-bridge. (Reading database ... 195590 files and directories currently installed.) Preparing to unpack .../00-cockpit-bridge_264-1_amd64.deb ... Unpacking cockpit-bridge (264-1) ... Selecting previously unselected package cockpit-ws. Preparing to unpack .../01-cockpit-ws_264-1_amd64.deb ... Unpacking cockpit-ws (264-1) ... Selecting previously unselected package libpwquality-tools. Preparing to unpack .../02-libpwquality-tools_1.4.4-1build2_amd6 4.deb ... Unpacking libpwquality-tools (1.4.4-1build2) ... Selecting previously unselected package cockpit-system. Preparing to unpack .../03-cockpit-system_264-1_all.deb ... Unpacking cockpit-system (264-1) ... Selecting previously unselected package cockpit. Preparing to unpack .../04-cockpit_264-1_all.deb ... Unpacking cockpit (264-1) ... Selecting previously unselected package cockpit-networkmanager. Preparing to unpack .../05-cockpit-networkmanager_264-1_all.deb ... Unpacking cockpit-networkmanager (264-1) ... Selecting previously unselected package cockpit-packagekit. Preparing to unpack .../06-cockpit-packagekit_264-1_all.deb ... Unpacking cockpit-packagekit (264-1) ... Selecting previously unselected package libbytesize-common. Preparing to unpack .../07-libbytesize-common_2.6-1_all.deb ... Unpacking libbytesize-common (2.6-1) ... Selecting previously unselected package libbytesize1:amd64. Preparing to unpack .../08-libbytesize1_2.6-1_amd64.deb ... Unpacking libbytesize1:amd64 (2.6-1) ... Selecting previously unselected package mdadm. Preparing to unpack .../09-mdadm_4.2-0ubuntu1_amd64.deb ... Unpacking mdadm (4.2-0ubuntu1) ... Selecting previously unselected package libblockdev-mdraid2:amd6 4. Preparing to unpack .../10-libblockdev-mdraid2_2.26-1_amd64.deb ...
- Run the command below to start Cockpit.
sudo systemctl start cockpit cockpit.socket
- Then enable Cockpit to run on system boot.
sudo systemctl enable cockpit cockpit.socket
- Check the Cockpit status using the following command.
sudo systemctl status cockpit
Sample output
● cockpit.service - Cockpit Web Service Loaded: loaded (/lib/systemd/system/cockpit.service; static) Active: active (running) since Sat 2022-09-24 22:39:37 EAT; 15s ago TriggeredBy: ● cockpit.socket Docs: man:cockpit-ws(8) Main PID: 38163 (cockpit-tls) Tasks: 1 (limit: 4584) Memory: 2.4M CPU: 746ms CGroup: /system.slice/cockpit.service └─38163 /usr/lib/cockpit/cockpit-tls Sep 24 22:39:36 itnixpro systemd[1]: Starting Cockpit Web Service... Sep 24 22:39:36 itnixpro cockpit-certificate-ensure[38155]: /usr/lib/cockpit/cockpit-certificate-helper: line 32: sscg: command not found Sep 24 22:39:37 itnixpro cockpit-certificate-ensure[38156]: .+..........+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+...+..........+.....+.......+.....+.+...++++++++++++++++++> Sep 24 22:39:37 itnixpro cockpit-certificate-ensure[38156]: .....+......+...+.+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+.....+.........+.+..............+....+...+..+.> Sep 24 22:39:37 itnixpro cockpit-certificate-ensure[38156]: ----- Sep 24 22:39:37 itnixpro systemd[1]: Started Cockpit Web Service.
- Next, allow Cockpit on your firewall.
sudo ufw allow 9090
- If you have Docker installed on your system, you can also enable Docker support by running the command below.
sudo apt install cockpit-podman -y
- Then start and enable Podman using the following command.
sudo systemctl enable --now podman
Access Cockpit Web GUI on Ubuntu 22.04/20.04
- Open your browser and enter your server IP followed by port 9090 e.g.
server-IP:9090
orlocalhost:9090
. Proceed by entering your server username and password.
- Cockpit dashboard overview.
- Storage management section.
- Account management section.
- That concludes our article, we have gone through how to install Cockpit on Ubuntu 22.04/20.04.
Read more on Cockpit Documentation