Cockpit Dashboard

Tadios Abebe | Feb 18, 2024 min read

Cockpit is a lightweight, web-based graphical interface for managing Linux servers. It’s designed to simplify routine administrative tasks through an intuitive dashboard, making it ideal for system administrators who prefer visual tools.

Installing Cockpit on Debian

  • Enable Backports:
. /etc/os-release
echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" > /etc/apt/sources.list.d/backports.list
apt update
  • Install Cockpit:
apt install -t ${VERSION_CODENAME}-backports cockpit

Customizing Cockpit

Allow Root Login to Cockpit

  • By default, Cockpit blocks root login. To allow it:
sudo sed -i '/root/s/^/#/' /etc/cockpit/disallowed-users
sudo systemctl restart cockpit

Install Cockpit Machines

  • Enable virtual machine management via cockpit-machines:
. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit -y
systemctl start cockpit
sudo apt install cockpit-machines

  • Create or edit this config:
nano /etc/systemd/system/cockpit.socket.d/listen.conf
  • Add/modify:
[Socket]
ListenStream=
ListenStream=9091
  • Reload systemd and restart Cockpit:
sudo systemctl daemon-reload
sudo systemctl restart cockpit.socket

Install Cockpit Benchmark Tool

  • Benchmark your disks with FIO and the Cockpit extension:
apt install fio
wget https://github.com/45Drives/cockpit-benchmark/releases/download/v2.1.1/cockpit-benchmark_2.1.1-1focal_all.deb
dpkg -i cockpit-benchmark_2.1.1-1focal_all.deb
systemctl restart cockpit

Install Cockpit File Sharing

curl -LO https://github.com/45Drives/cockpit-file-sharing/releases/download/v3.3.7/cockpit-file-sharing_3.3.7-1focal_all.deb
sudo apt install ./cockpit-file-sharing_3.3.7-1focal_all.deb

Install Cockpit Navigator (File Manager)

wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.10/cockpit-navigator_0.5.10-1focal_all.deb
apt install ./cockpit-navigator_0.5.10-1focal_all.deb

Common Issue: Package Install Fails in Cockpit UI

If you see:

cannot refresh cache whilst offline

Ensure your system is using NetworkManager as the network renderer. This resolves most package management and network detection issues in the Cockpit web UI.

comments powered by Disqus