How To Install Cockpit Web Console On CentOS 8?


The cockpit is a web console that makes it easy to administer the GNU/Linux server. It has a user-friendly web-based interface that enables you to carry out different system admin tasks from inside a browser. You can even access your server on your mobile using a web browser.

This guide will help you in setting up the cockpit web console in CentOS 8.

How to install cockpit package

To access your server using a web browser you need to have cockpit package installed on your system. The CentOS 8 minimal setup does not contains the cockpit by default so you need to install it.

Use the following command to install in your system –

# yum install cockpit

If it asks for confirmation press y and hit enter. Once it gets installed goto to the next step.

Start and enable the cockpit.socket

Currently, the cockpit.socket service is inactive on your system and it would not start automatically on system reboot. You need to start and enable it manually so that it can connect with the web console.

Use the following command to start the service –

# systemctl start cockpit.socket

Now enable it so that it starts automatically on the next boot –

# systemctl enable cockpit.socket

Check the status of the cockpit.socket service

To verify if the cockpit.socket service is running or not use the following command in your terminal –

# systemctl status cockpit.socket

Adjust the firewall

If a firewall is running in your system you need to allow port 9090, now use the following command to allow the port 9090 on your system-

# firewall-cmd --add-service=cockpit --permanent

and then run to reload the firewall –

# firewall-cmd --reload

Access server remotely using the cockpit web console

To access a server remotely by using the cockpit web console first you need to have the IP address or hostname of the server. You can use the following command to find the IP address of a system –

# ifconfig -a

You can see the IP in the image given below –

Now to access server in browser use –

# http://server-ip:9090

or

# http://hostname:9090

For example –

# http://192.168.122.48:9090

It can show you a warning in your web browser click on advanced and then click accept the risk and continue or proceed anyway if you are using chrome.

This will display the web login screen where you can log in by using your credentials –

Now once you log in with a privileged user it can perform various administrative tasks such as installing software, managing network services, check logs and system diagnostic reports, etc. You can switch to command line mode by clicking on the terminal option.

Conclusion

Ok, so that’s how you can manage the CentOS 8 server from a web browser remotely. now if you want to say something on this then feel free to write us in the comments below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.