How to install Cockpit on Ubuntu 22.04 for better server management

If you’d prefer to administer your Ubuntu servers via a web-based GUI, Jack Wallen thinks Cockpit is a great option, and he’s ready to show you how to install it.

Image: sharafmaksumov/Adobe Stock

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

Where 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).

Figure A

jammycockpita
Image: Jack Wallen/TechRepublic. Logging into our newly-installed instance of Cockpit.

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).

Figure B

jammycockpitb
Image: Jack Wallen/TechRepublic. We need to grant heightened access to our user.

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.

Figure C

jammycockpitc
Image: Jack Wallen/TechRepublic. Granting full access to our user in Cockpit.

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.

For all the latest Technology News Click Here 

 For the latest news and updates, follow us on Google News

Read original article here

Denial of responsibility! TechNewsBoy.com is an automatic aggregator around the global media. All the content are available free on Internet. We have just arranged it in one platform for educational purpose only. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials on our website, please contact us by email – [email protected]. The content will be deleted within 24 hours.