How to install Cockpit on Debian server

If you want to add a web administration panel to Debian Server, Jack Wallen is here to guide you through the installation process of the user-friendly Cockpit tool.

Image: Kiri/Adobe Stock

Debian Server is an exceptional Linux distribution that is well known for being one of the most stable operating systems available. I have used Debian Server for many deployments and have always found it to exceed my needs and expectations. However, there is one area where it could be improved, such as the inclusion of a web admin interface.

Fortunately, however, it is possible to install the Web Cockpit administration tool on Debian Server. With Cockpit added, you can easily monitor your system, view logs, and manage various aspects of your server. The only caveat is that it’s not as simple as on an RHEL or Ubuntu based distro. That’s not to say it’s difficult, but rather that it requires a few extra steps.

SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)

Let me walk you through the process, so you too can enjoy this handy admin panel on Debian Server.

What you will need

The only things you’ll need for this are a running instance of Debian Server – I’m doing a demo on Bullseye – and a user with sudo privileges. That’s it, let’s get to work.

How to install Cockpit

Log in to your Debian Server instance with a user with sudo privileges and run a quick update with the command:

sudo apt update

Once the update is complete, install Cockpit with the command:

sudo apt install cockpit -y

Once the installation is complete, we need to create a special directory to prevent Cockpit from showing a rather annoying warning in the console. The command to create this directory is:

sudo mkdir -p /usr/lib/x86_64-linux-gnu/udisks2/modules

Next, start and enable the Cockpit service with:

sudo systemctl enable --now cockpit

Since Debian Server comes with the UFW firewall enabled, we need to open ports 9090 and 80 with the following two commands:

sudo ufw allow 9090

sudo ufw allow 80

How to access the Cockpit

Open a web browser and point it to https://SERVER:9090, where SERVER is the IP address of the hosting server. You will be greeted by the Cockpit login (Figure Aminus the mark), where you can login with any user with sudo privileges.

Figure A

The Cockpit login screen as it appears on the Debian server.

Once connected, you should see the Web Cockpit Admin Console (Figure B), where you can start working with Debian Server from the convenience of a user-friendly interface.

Figure B

The Cockpit Dashboard running on Debian Server (Bullseye).

Congratulations, you now have an even simpler tool to manage your Debian Server deployments. At this point, you can also install plugins, such as cockpit-docker, to extend the functionality of the tool.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech tips for professionals from Jack Wallen.

Comments are closed.