How To Install Cockpit on Ubuntu 16.04 LTS

1

Cockpit is a free software which provides a web-based interface for the system admin to perform tasks, such as starting containers, storage management, network configuration, inspecting logs and so on.

Cockpit is released under the LGPL v2.1+; it is available for Debian, Redhat, CentOS, Atomic, Arch Linux, and Ubuntu.

This guide focuses on installing Cockpit on Ubuntu 16.04.

Features

  1. Connect and Manage multiple machines from a single Cockpit session
  2. Manage the containers via Docker
  3. Modify the network settings
  4. Easily manage the user accounts
  5. Provides web-based shell in a terminal
  6. Gathers system performance using  Performance Co-Pilot framework and displays it in a graph.
  7. With the use of sosreport, it can collect system configuration and diagnostic information
  8. It can interact with a Kubernetes cluster or an Openshift v3 cluster

Install Cockpit on Ubuntu 16.04

Cockpit is available in backports repository on Ubuntu 16.04. So, make sure the repository is enabled by checking the below line is present in /etc/apt/sources.list file.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

Update the apt database.

sudo apt-get update

Install the Cockpit package.

sudo apt-get -y install cockpit

Working with Cockpit

Once you start the Cockpit service, it will start to listen on port 9090. You can open up your favorite browser and navigate it to below URL.

https://ip-add-ress:9090
You would need to add an SSL exception in your browser before accessing the Cockpit login screen for the first time.
Install Cockpit on Ubuntu 16.04 - Add SSL Exception
Install Cockpit on Ubuntu 16.04 – Add SSL Exception

Log in with your local user account. In my case, it is “raj”.

Ensure you tick mark Reuse my password for privileged tasks in case you are logging in as normal user who has sudo privileges.
Install Cockpit on Ubuntu 16.04 - Log in to Cockpit
Install Cockpit on Ubuntu 16.04 – Login to Cockpit

Once you have logged in, it will take you to the system overview page where you can have a detailed overview and performance graphs of the selected system.

Install Cockpit on Ubuntu 16.04 - System Information
Install Cockpit on Ubuntu 16.04 – System Information

You can take a look at the details of running services by clicking on the services page; here, you can manage (start, stop, restart, etc.look) the services by clicking on particular service.

Install Cockpit on Ubuntu 16.04 - System Service Management
Install Cockpit on Ubuntu 16.04 – System Service Management

Troubleshoot your machine by having a look at the system logs.

Install Cockpit on Ubuntu 16.04 - View System Logs
Install Cockpit on Ubuntu 16.04 – View System Logs

Manage the system users by going to Accounts

Install Cockpit on Ubuntu 16.04 - User Account Management
Install Cockpit on Ubuntu 16.04 – User Account Management

You can also manage system storage with Cockpit.

Install Cockpit on Ubuntu 16.04 - Manage Storage
Install Cockpit on Ubuntu 16.04 – Manage Storage

If you are looking to take terminal of the server, you no need to take putty and work. Just click Terminal.

Install Cockpit on Ubuntu 16.04 - Terminal Access
Install Cockpit on Ubuntu 16.04 – Terminal Access

Manage Multiple Servers with Cockpit

Consider if you have multiple servers with Cockpit and want to manage them in a single session. Click on Dashboard and then click the Plus sign icon and add them one by one.

Install Cockpit on Ubuntu 16.04 - Add Remote System in Cockpit
Install Cockpit on Ubuntu 16.04 – Add Remote System in Cockpit
If there is an authentication issue while connecting to the remote machine, Cockpit will prompt you for entering username and password of the remote system.
Install Cockpit on Ubuntu 16.04 - Enter Account Details
Install Cockpit on Ubuntu 16.04 – Enter Account Details

Below screenshot shows that two machines are attached to this Cockpit session.

server.itzgeek.local (Ubuntu 16.04 – Local Machine)

client.itzgeek.local (Ubuntu 18.04 – Remote Machine)

Install Cockpit on Ubuntu 16.04 - Systems List
Install Cockpit on Ubuntu 16.04 – Systems List

Below screenshot shows the detailed information of the remote system.

Install Cockpit on Ubuntu 16.04 - Detailed Information of Remote System
Install Cockpit on Ubuntu 16.04 – Detailed Information of Remote System

That’s All.

Further Reading

You might also like

How To Install Cockpit on Ubuntu 16.04 LTS

1