This document describes how to manage physical and virtual Linux-based systems using the Cockpit web interface. The instructions assume that the server used for management is running in Red Hat Enterprise Linux 8.
The following sections aim to help you install Cockpit in Red Hat Enterprise Linux 8 and open the Cockpit interface in your browser. You will also learn how to add remote hosts and monitor them in Cockpit.
Cockpit is a Red Hat Enterprise Linux 8 web-based interface designed for managing and monitoring your local system, as well as Linux servers located in your network environment.
Cockpit uses the same system APIs as you would in a terminal, and actions performed in a terminal are immediately reflected in Cockpit.
You can monitor the logs of systems in the network environment, as well as their performance, displayed as graphs. In addition, you can change the settings directly in the web interface or through the terminal.
Red Hat Enterprise Linux 8 includes Cockpit installed by default in many installation variants. If this is not the case on your system, install the Cockpit package and set up the cockpit.socket service to enable the Cockpit interface.
Optionally, enable and start the cockpit.socket service, which runs a web server. This step is necessary, if you need to connect to the system through the web interface.
To verify the previous installation and configuration, you can open the web interface.
The following describes the first login to the Cockpit interface using a system user name and password.
Cockpit uses a specific PAM stack located at /etc/pam.d/cockpit. Authentication with PAM allows you to log in with the user name and password of any local account on the system.
Open https://server.name.com:9090 in your web browser.
If you use a self-signed certificate, the browser issues a warning. Check the certificate and accept the security exception to proceed with the login.
Cockpit loads a certificate from the /etc/cockpit/ws-certs.d directory and uses the last file with a .cert extension in alphabetical order. To avoid having to grant security exceptions, install a certificate signed by a certificate authority (CA).
In the login screen, enter your system user name and password.
Optionally, click the Reuse my password for privileged tasks option.
If the user account you are using to log in has sudo privileges, this makes it possible to perform privileged tasks in Cockpit, such as installing software or configuring SELinux.
After successful authentication, Cockpit opens the web interface.
This section helps you to connect other systems with a user name and password to the Cockpit Dashboard.
The Cockpit Dashboard is a tool designed for remote server management, where you can add, connect, or remove remote systems.
The Cockpit Dashboard displays graphs and status for each of the remote systems.
Cockpit installed on remote systems. For details, see Installing Cockpit.
Opened the SSH service on remote systems.
The cockpit-dashboard package extends Cockpit with the remote system management.
In the Cockpit interface, go to Dashboard.
In the Dashboard, click the Add Server icon.
In the Add Machine to Dashboard dialog box, enter the host name or IP address of the remote system.
(Optional) Click the Color field to change the color of the system in Dashboard.
In the Log in to <servername> dialog box, enter the credentials for the remote system.
You can use any user account of the remote system with administration privileges.
If the login succeeds Cockpit Dashboard adds a new item in the list. To verify the connection, click the system to see all the details in the Cockpit interface.
Cockpit does not save passwords used to log in to remote systems which means that you have to log in again after each system restart. To open the login dialog, click the Troubleshoot button placed on the main screen of the disconnected remote system.
From where the existing accounts come from.
How to add new accounts.
How to set password expiration.
How and when to terminate user sessions.
Being logged into Cockpit with an account that has administrator permissions assigned. For details, see Logging in to Cockpit.
Authenticate users when accessing the system.
Set them access rights to the system.
Cockpit displays all user accounts located in the system. Therefore, you can see at least one user account just after the first login to Cockpit.
You can find the account management in the Accounts settings.
The following describes adding system user accounts in Cockpit and setting administration rights to the accounts.
Log in to the Cockpit interface.
In the Full Name field, enter the full name of the user.
Cockpit automatically suggests a user name from the full name and fills it in the User Name field. If you do not want to use the original naming convention consisting of the first letter of the first name and the whole surname, update the suggestion.
In the Password/Confirm fields, enter the password and retype it for verification that your password is correct. The color bar placed below the fields shows you security level of the entered password.
Click Create to save the settings and close the dialog box.
Select the newly created account.
Select Server Administrator in the Roles item.
Now you can see the new account in the Accounts settings and you can use the credentials to connect to the system.
By default, user accounts have set passwords to never expire. To enforce password expiration, as administrator, set system passwords to expire after a defined number of days.
When the password expires, the next login attempt will prompt for a password change.
Select the user account for which to enforce password expiration.
In the user account settings, click Never expire password.
In the Password Expiration dialog box, select Require password change every …​ days and enter a positive whole number representing the number of days when the password expires.
To verify the settings, open the account settings. Cockpit displays a link with the date of expiration.
A user creates user sessions when logging into the system. Terminating user sessions means to log the user out from the system.
It can be helpful if you need to perform administrative tasks sensitive to configuration changes, for example, system upgrades.
In each user account in Cockpit you can terminate all sessions for the account except for the Cockpit session you are currently using. This prevents you from cutting yourself off the system.
Click the user account for which you want to terminate the session.
Click the Terminate Session button.
If the Terminate Session button is inactive, the user is not logged in the system.
If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.
For information on installing an operating system on a virtual machine, see Section 4.3.2, “Installing operating systems using Cockpit”.
For information on shutting down a virtual machine, see Section 4.4.2, “Powering down virtual machines in Cockpit”.
For information on restarting a virtual machine, see Section 4.4.3, “Restarting virtual machines using Cockpit”.
For information on sending a non-maskable interrupt to a virtual machine, see Section 4.4.4, “Sending non-maskable interrupts to virtual machines using Cockpit”.
For information on starting a virtual machine, see Section 4.4.1, “Powering up virtual machines in Cockpit”.
For information on viewing basic information about a selected virtual machine to which the Cockpit session is connected, see Section 4.5.2, “Viewing basic virtual machine information in Cockpit”.
For information on viewing resource usage for a selected virtual machine to which the Cockpit session is connected, see Section 4.5.3, “Viewing virtual machine resource usage in Cockpit”.
For information on viewing disk information about a selected virtual machine to which the Cockpit session is connected, see Section 4.5.4, “Viewing virtual machine disk information in Cockpit”.
For information on viewing virtual network interface card information about a selected virtual machine to which the Cockpit session is connected, see Section 4.5.5, “Viewing virtual NIC information in Cockpit”.
To see more detailed virtual CPU information and configure the virtual CPUs configured for a virtual machine, see Section 4.6.1, “Configuring virtual CPUs for virtual machines using Cockpit”.
For information on viewing information about all of the virtual machines to which the Cockpit session is connected, see Section 4.5.1, “Viewing virtual machine information in Cockpit”.
For information on viewing disk information about a selected virtual machine to which the Cockpit session is connected, see Section 4.7.1, “Viewing virtual machine disk information in Cockpit”.
For information on attaching existing disks to virtual machines, see Section 4.7.3, “Attaching existing disks to virtual machines using Cockpit”.
For information on detaching disks from virtual machines, see Section 4.7.4, “Detaching disks from virtual machines”.
For information on creating new disks and attaching them to virtual machines, see Section 4.7.2, “Adding new disks to virtual machines using Cockpit”.
For details on viewing the graphical console in a remote viewer, see Section 4.9.2, “Viewing virtual machine consoles in remote viewers using Cockpit”.
For details on viewing the serial console in Cockpit, see Section 4.9.3, “Viewing the virtual machine serial console in Cockpit”.
For details on viewing the graphical console in a remote viewer using a manual connection, see Section 4.9.2.2, “Viewing the graphical console in a remote viewer connecting manually”.
For details on viewing the graphical console in Cockpit, see Section 4.9.1, “Viewing the virtual machine graphical console in Cockpit”.
For details onviewing the graphical console in a remote viewer using Cockpit to make the connection, see Section 4.9.2.1, “Viewing the graphical console in a remote viewer”.