Most Linux system Administrators are keen on those software solutions that ease their day-to-day Server operations. There are a number of tools that can be used to manage a Linux server from a web dashboard. These includes Webmin, Cockpit, ispconfig, virtualmin, cpanel e.t.c. In this guide, we will cover installation and usage of Cockpit to manage your Ubuntu 20.04 Linux server.
Cockpit allows you to administer your Linux machine from a web browser and perform system tasks with a mouse. With cockpit you can start containers, administer storage, configure networks, and inspect logs. This tool is friendly enough for those new to Linux and useful for seasoned admins too.
Key features of Cockpit
- Multi-server Support – Monitor and administer several servers at the same time.
- Extendable – You can write your own modules to plug into Cockpit. A service started via Cockpit can be stopped in a terminal.
- Uses existing APIs – Cockpit uses APIs that already exist on the system. It doesn’t reinvent subsystems or add a layer of its own tooling.
- Self-contained – You don’t have to worry about setting up a webserver just to use Cockpit.
- Sign in like normal – By default, Cockpit uses your system’s normal user logins and privileges
- Efficient – Cockpit only uses memory and CPU when active. When inactive, there is no extra load on your server.
- Embedded terminal – Cockpit comes with an embedded terminal that you can use from the web console.
Install Cockpit on Ubuntu 20.04 Linux
As of Ubuntu 17.04 and later, Cockpit is included in the system APT repository. You’ll need to update your applications list index to be able to see the package.
sudo apt update
See if package is available.
$ apt-cache policy cockpit cockpit: Installed: (none) Candidate: 215-1 Version table: 218-1~ubuntu20.04.1 100 100 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages 100 http://archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages 100 http://mirror.hetzner.de/ubuntu/packages focal-backports/universe amd64 Packages 100 http://mirror.hetzner.de/ubuntu/packages focal-backports/universe i386 Packages 215-1 500 500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages 500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages 500 http://mirror.hetzner.de/ubuntu/packages focal/universe amd64 Packages 500 http://mirror.hetzner.de/ubuntu/packages focal/universe i386 Packages
You can install Cockpit on Ubuntu 20.04 using the command below.
sudo apt install cockpit
Accept the installation of Cockpit on Ubuntu 20.04 by hitting the y key on the keyboard.
The following additional packages will be installed: cockpit-bridge cockpit-system cockpit-ws libcrack2 libjson-glib-1.0-0 libjson-glib-1.0-common libpwquality-common libpwquality-tools libpwquality1 Suggested packages: cockpit-doc cockpit-pcp cockpit-machines xdg-utils sssd-dbus Recommended packages: cockpit-storaged cockpit-networkmanager cockpit-dashboard cockpit-packagekit cracklib-runtime The following NEW packages will be installed: cockpit cockpit-bridge cockpit-system cockpit-ws libcrack2 libjson-glib-1.0-0 libjson-glib-1.0-common libpwquality-common libpwquality-tools libpwquality1 0 upgraded, 10 newly installed, 0 to remove and 23 not upgraded. Need to get 3,883 kB of archives. After this operation, 6,188 kB of additional disk space will be used. Do you want to continue? [Y/n] y
Access Cockpit Web Console on Ubuntu 20.04 Linux
The Cockpit web console can be accessed on the URL [https://(serverip or hostname):9090/]. If you have a ufw firewall, allow access to the port in the firewall.
sudo ufw allow 9090/tcp
Then open your web browser and type your server ip address, or domain name and port 9090. You will get a warning message for the certificate.
Click on “Advanced” to accept.
Click on “Accept the Risk and Continue” to access Cockpit console on your Ubuntu machine.
Use your user credentials to login.
Play with the dashboard to see the sections and administrative features.
Using Cockpit Terminal
There’s an embedded terminal in Cockpit which gives you flexibility to jump between a terminal and the web interface at any time.
Read more on Cockpit Documentation.