Cockpit · Linux web console

On this page 7

Cockpit is an open source, browser-based Linux web console that lets administrators monitor and manage servers through a web browser. It displays live CPU, memory, disk and network usage, reads the systemd journal, and controls services, storage, networking, containers and virtual machines from one interface.

In Linux monitoring, Cockpit occupies the space between terminal tools such as top or htop and full observability platforms. It is preinstalled or available by default on distributions such as Fedora, RHEL, CentOS Stream and Debian, and it is designed to be light enough to run on every host. Not to be confused with dashboards for aircraft or other products that share the name.

How the Cockpit web console works

Cockpit follows an on-demand, agentless design. The cockpit.socket unit listens on TCP port 9090, and systemd starts the cockpit-ws web server only when a browser connects. After the user logs in with ordinary system credentials, a cockpit-bridge process starts as that user and translates browser requests into local actions.

The bridge talks to the system through standard Linux interfaces: D-Bus for systemd, NetworkManager, storaged (UDisks) and other services, files under procfs and sysfs for metrics, and the journal API for logs. Because Cockpit stores no separate state, changes made in the terminal appear instantly in the browser and vice versa.

The components and their roles are summarized in the following table.

ComponentRuns asRole
cockpit.socketsystemdListens on port 9090 and starts the web server
cockpit-wsDedicated system userServes HTTPS and handles authentication
cockpit-bridgeLogged-in userExecutes commands and reads system data
cockpit-pcpLogged-in userReads historical metrics from PCP
Pages and pluginsBrowser JavaScriptRender dashboards and forms
Main components of Cockpit

When the browser tab closes and no session remains, the processes exit after an idle timeout, so Cockpit consumes almost no resources between visits.

Monitoring capabilities and modules

Cockpit’s monitoring value lies in live, graphical views of core system metrics combined with the ability to act on them immediately. The Overview page shows CPU load, memory and swap, disk I/O and network throughput, and the Metrics page adds historical data through Performance Co-Pilot (PCP) when the cockpit-pcp package is installed.

Functionality is split into modules, many of them installed as separate packages.

ModulePackageWhat it shows or controls
Overview and metricscockpit-system, cockpit-pcpCPU, memory, disk, network, history
Logscockpit-systemFiltered systemd journal entries
Servicescockpit-systemsystemd units, timers and their states
Storagecockpit-storagedDisks, RAID, LVM, file systems, usage
Networkingcockpit-networkmanagerInterfaces, bonds, firewall zones
Podman containerscockpit-podmanContainer status and resource use
Virtual machinescockpit-machineslibvirt guests, consoles, resources
Common Cockpit modules and what they monitor

A built-in web terminal gives shell access in the same session, which helps when a metric points to a problem that requires tools such as iostat, ss or strace. The Logs page filters by priority, unit and time, providing a graphical front end to journalctl.

Cockpit compared with other Linux monitoring tools

Cockpit is best understood as an interactive administration console with monitoring built in, not a long-term metrics database. The following comparison places it among other tools in Linux monitoring.

ToolInterfaceStrengthMain limit
CockpitWeb browserLive view plus administrationShort history without PCP
htop or btopTerminalFast per-process detailSingle host, no history
sarTerminalLong historical recordsNo graphical view
GlancesTerminal or webBroad metric summaryLimited management actions
Prometheus and GrafanaWeb dashboardsFleet-wide history and alertingRequires separate infrastructure
Cockpit and related monitoring tools

For fleet-wide trend analysis and alerting, a dedicated monitoring stack remains necessary. Cockpit complements such a stack by giving operators a fast way to investigate and fix one host once an alert has fired.

Deploying and securing Cockpit

Installation is short: install the cockpit package, run systemctl enable --now cockpit.socket, and open the firewall for the cockpit service. The interface is then reachable over HTTPS on port 9090 of the host, using a self-signed certificate until an administrator places a proper certificate in /etc/cockpit/ws-certs.d.

Security depends on a few deliberate choices, listed in the decision table below.

SituationRecommended choiceReason
Internet-facing serverBind to VPN or reverse proxy onlyPort 9090 should not be public
Shared administration teamIndividual accounts with sudoActions remain attributable
Production certificatesCA-signed certificateAvoids trust warnings and MITM risk
Stronger loginKerberos, smart card or 2FA via PAMReduces password exposure
Many hostsOne bastion with SSH to othersLimits exposed web endpoints
Security decisions for a Cockpit deployment

Cockpit authenticates through PAM and honors existing permissions, so a user without sudo rights sees a limited, read-mostly view. Administrative actions require explicitly switching to administrative access in the interface.

Limitations and common misconceptions

  • It is not a full monitoring system: without PCP, metric history is short, and Cockpit itself does not send alerts.
  • Multi-host management is basic: the host switcher connects over SSH to other machines, but it does not aggregate metrics across a fleet.
  • Exposure risk is real: a web console with root-capable sessions is a valuable target, so network restriction is essential.
  • Not every setting is exposed: complex configuration still requires the command line or configuration management tools.
  • Module availability varies by distribution and version, so a feature seen on one system may be missing on another.

A common mistake is treating Cockpit as a replacement for configuration management. Changes made by hand in the console are not recorded as code, so in automated environments it works best as a diagnostic and emergency tool.

The simple explanation

Cockpit is like the dashboard of a car for a Linux server. There is no need to type commands in a terminal window. An administrator opens a web page instead. Gauges show how busy the processor is, how much memory is free and how full the disks are.

The same page also has switches. Problems can be fixed right there, such as restarting a program or reading error messages. The key point is simple: it shows the real state of the machine. A person can act on it without memorizing commands.

How it is used in practice

A two-person IT team at a regional engineering firm manages twelve RHEL servers that run file shares, a license server and several Podman containers. Their central monitoring stack sends an alert at 7:40 one morning: the file server’s disk latency has exceeded 200 ms.

One administrator connects to the bastion host’s Cockpit through the company VPN, switches to the file server and opens the Metrics page. The PCP history shows that disk I/O jumped at 7:30, and the Logs page filtered to warnings reveals that a RAID array started rebuilding after a drive failure overnight. The Storage page confirms one degraded member.

Within fifteen minutes the team identifies the failed disk, schedules a replacement and lowers the rebuild priority. The diagnosis took no terminal commands, and a junior colleague was able to follow every step on screen.