Cockpit is a web-based GUI for management servers that typically ships with RHEL-based distributions such as Red Hat Enterprise Linux, CentOS Stream, Rocky Linux and AlmaLinux. It’s a great way to keep tabs on your servers, manage users/groups/storage/services, update software, view logs and so much more.
Although Cockpit does come pre-installed with some of the RHEL-based Linux distributions, it is not found on Ubuntu Server out of the box. Fortunately, the process for installing Cockpit on Ubuntu Server isn’t all that challenging.
Let’s do just that.
SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)
What you’ll need
The only things you’ll need are a running instance of Ubuntu Server (I’ll be demonstrating on Ubuntu Server 22.04) and a user with sudo privileges. That’s it: Let’s get to work.
How to install Cockpit
Log into your Ubuntu Server instance and issue the command:
sudo apt-get install cockpit -y
Once the installation completes, start and enable Cockpit with:
sudo systemctl enable --now cockpit.socket
Now that Cockpit is installed and running, you can log in. However, depending on how your system is set up, you’ll want to make sure the user you log into Cockpit with has sudo privileges. For that, you would issue the command:
sudo usermod -aG sudo USER
USER is the name of the user in question.
Just for fun, we’ll add container support to our instance just to show how easy it is. From the terminal window, issue the command:
sudo apt-get install podman cockpit-podman -y
Start and enable Podman with:
sudo systemctl enable --now podman
How to log into Cockpit
Open a web browser and point it to
https://SERVER:9090. You should be greeted by the login screen (Figure A).
If you find that the firewall isn’t allowing you through, but you can enable the correct port with the following:
sudo ufw allow 9090
Upon logging in, you will see that the web console is running in limited access mode (Figure B).
We need to grant heightened access to our user.
Click Turn On Administrative Access. Then, when prompted (Figure C), type your user’s password to grant administrative access.
At this point, your user should be able to use all of the features found in Cockpit to better administer your server. And that’s all there is to installing Cockpit on Ubuntu Jammy Jellyfish server; enjoy that added ease and power.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.