I will show that how I handled the requirement of monitoring and configuration of my linux devices from a GUI using an open source tool; Cockpit. It’s a Red Hat sponsored free software project. I’ll go with a Raspberry Pi to show how it works. I’ve used a RPI with Raspbian 9 stretch lite; which is based on Debian 9.

I’m working on small linux computers and also industrial linux gateways for various Industry 4.0 projects. One of them will be used for data acquisition and pushing the data from industrial field to AWS IoT. Well, I can configure and manage linux devices freely from terminal, but there can be network changes on the industrial field and an average technician should be able to reconfigure it independently of me. We don’t expect that a technician can use the terminal. In addition, I can wonder that they can broke something when they use the terminal actually. Obviously, I need a GUI to provide a fancy way of the configuration of my linux devices.

I was aware of the Cockpit, an open source tool allows configuring, maintaining, and interacting with servers. I decided to go with that.

Cockpit homepage


Let’s install it on Raspberry Pi. Official installation document of the Cockpit says run the command below for Debian 9. If you’ll run some other distro, run cat /etc/*-release to determine your linux distro, and find the installation option fits for you.

echo 'deb http://deb.debian.org/debian stretch-backports main' > \
apt-get update


sudo apt-get install cockpit

If you’re having problems about permissions, simply to sudo su and run the commands, and exit from sudo using exit

Probably you’ll have another issue with key signing, like.

$ apt-get update
Fetched 13.2 MB in 28s (456 /kBs)                                                                                                                          
Reading package lists... Done
W: GPG error: http://deb.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: The repository 'http://deb.debian.org/debian stretch-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

We’ll download keys from ubuntu key server. You need to first install dirmngr to download valid keys from a server.

apt-get install dirmngr --install-recommends

Now, you can run apt-key adv commands for each key,

run apt-key adv --keyserver keyserver.ubuntu.com --recv 7638D0442B90D010
run apt-key adv --keyserver keyserver.ubuntu.com --recv 8B48AD6246925553

Let’s do;

$ apt-key adv --keyserver keyserver.ubuntu.com --recv 7638D0442B90D010
Executing: /tmp/apt-key-gpghome.vJbRXc9SQt/gpg.1.sh --keyserver keyserver.ubuntu.com --recv 7638D0442B90D010
gpg: key 7638D0442B90D010: 13 signatures not checked due to missing keys
gpg: key 7638D0442B90D010: public key "Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
$ apt-key adv --keyserver keyserver.ubuntu.com --recv 8B48AD6246925553
Executing: /tmp/apt-key-gpghome.4KvMYBUegX/gpg.1.sh --keyserver keyserver.ubuntu.com --recv 8B48AD6246925553
gpg: key 8B48AD6246925553: 28 signatures not checked due to missing keys
gpg: key 8B48AD6246925553: public key "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

We’re ready to go, lets run the update again;

$ apt-get update
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease                
Get:3 http://deb.debian.org/debian stretch-backports InRelease [91.9 kB]        
Fetched 117 kB in 3s (34.3 kB/s)                           
Reading package lists... Done

And let’s install the Cockpit

apt-get install cockpit

When it’s done, go to https://LINUX_DEVICE_IP:9090/ on your browser to access your Cockpit. You can login with the linux user on web UI. That’s it. We’re in.

Usage and Features

It has a pretty well architecture to perform jobs. It has a core and a bridge to run commands and get data from the system. Also a web service and a nice UI to serve them. You can connect and manage another machine if you install cockpit-system and cockpit-bridge on that machine.

For my case, there are industrial devices on /24 IP range and also /32 for the internet. eth0 handles the internet traffic and eth1 for the industrial communication. I was looking for the network settings in a UI and it’s pretty clear in Cockpit’s Networking tab.

Networking on the cockpit

Anyone with an instruction document can just change here to apply any network change on my data acquisition device. I don’t want to be disturbed. :)

IP settings on the cockpit

Some Disadvantages

First, bear in mind that Cockpit isn’t a thing to manage every single parameter of your server. But unfortunately, for networking configuration, there isn’t any option to set never-default=true or disabling auto-DNS. They’re just several configuration lines in /etc/NetworkManager/system-connections/ files. Just like the ones for IP configuration. Also here are some nmcli commands to do that. Yes, we still need the terminal to configure routes and DNS, but I can still go with Cockpit.

Please comment your ideas and experiences about Cockpit using the comment section, see you!