COCKPIT
Administer servers with your browser
Nick Peers reveals how to use Cockpit to access and manage your headless server remotely – no keyboard or display required.
OUR EXPERT
Nick Peers uses Cockpit to monitor his Pentium J5040-powered server running Ubuntu Server 20.04.
Credit: https://cockpit-project.org
TAKE THE COCKPIT TOUR
1
Switch views
The Dashboard view is redundant in Cockpit (it’s been removed from later versions). Instead, click View graphs under Usage.
2
Cockpit tools
Click each of these categories to access information – and configurable options – about various parts of your system.
3
User tools
Click here to end your session, jump to your personal account settings and change the display language.
4 Health
Any potential problems – complete with shortcuts to the relevant section (typically Services or Updates) – appear here.
5 Terminal
Click here to access a fully functioning Terminal that gives you access to your entire system from the command line.
6 Configuration
Change your hostname, join a domain and edit your time zone and other related settings from here.
W hat’s the best way to administer your headless server remotely from another machine inside your local network? You can al ways ssh in of course, but a friendlier approach will give you access to key metrics as well as the ability to perform various tasks through a more user-friendly GUI via your web browser. That’s the premise behind Cockpit, and in this tutorial we’re going to explore its best features.
While Cockpit is aimed primarily at the headless server market, you can also use it to monitor your desktop from another machine. As well as studying key metrics in real time, you have access to system logs, plus tools to manage users and services, configure storage and networking, check for and perform updates, and access a command-line session from your browser.
That’s not all: Cockpit can also be expanded with plugins, from tracking performance over time (cockpitpcp) to managing QEMU/Libvirt virtual machines (cockpit-machines). We’ll even show you how to add the user-friendly cockpit-docker frontend so that you can view and administer Docker-based containers too – but only if you’re running Ubuntu 20.04.
First, the good news for Ubuntu users: Cockpit is included in the default Ubuntu repos from 17.04 onwards, so it’s easy to install. The bad news is that the version that ships is frozen at the point when your Ubuntu build was released. You can bypass this and install the latest version by following the Quick Tip (see page 63) to use the backports repository, but be warned: later versions of cockpit remove support for older plugins such the cockpit-docker plugin we cover at the end of this tutorial.