Home Tutorials Cockpit Installation

Cockpit Installation

Last updated on Aug 01, 2024

How to Install Cockpit on Linux

Cockpit is a tool for server administration that provides you with real-time information about your server's status. It displays data on CPU usage, filesystem statistics, processes, and other relevant details. One of the advantages of using Cockpit is that it does not consume any server resources until you log in to the control panel. The service is only activated when you access the control panel.

Cockpit enables you to perform various server administration tasks, such as managing users and addressing network issues. It also allows you to access a terminal from your computer or phone's browser. To log in and manage the system, Cockpit utilizes your system's users and sudo for privilege escalation. As a result, it does not introduce an additional layer of security considerations by creating a separate set of Cockpit-only users for your server.

Instructions

Using the below guides you can install Cockpit on various different Linux OS's.

Ubuntu

Ubuntu 17.04 and later:

  1. Install cockpit:
    . /etc/os-release
    sudo apt install -t ${VERSION_CODENAME}-backports cockpit

  2. Enable cockpit:
    sudo systemctl enable --now cockpit.socket

Fedora

  1. Install cockpit:
    sudo dnf install cockpit

  2. Enable cockpit:
    sudo systemctl enable --now cockpit.socket

  3. Ensure that the firewall is open:
    sudo firewall-cmd --add-service=cockpit
    sudo firewall-cmd --add-service=cockpit --permanent

CentOS

CentOS 7 and later:

  1. Install cockpit:
    sudo yum install cockpit

  2. Enable cockpit:
    sudo systemctl enable --now cockpit.socket

  3. Open the firewall:
    sudo firewall-cmd --permanent --zone=public --add-service=cockpit
    sudo firewall-cmd --reload

Debian

Debian 10 and later:

  1. To get the latest version, we recommend to enable the backports repository (as root):
    . /etc/os-release
    echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" > \
    /etc/apt/sources.list.d/backports.list
    apt update

  2. Install or update the package:
    apt install -t ${VERSION_CODENAME}-backports cockpit

Rocky Linux

Rocky Linux 8 and later:

  1. Install cockpit
    sudo yum install cockpit

  2. Enable cockpit:
    sudo systemctl enable --now cockpit.socket

  3. Allow port through firewall:
    sudo firewall-cmd --add-service=cockpit --permanent
    sudo firewall-cmd --reload