{"id":11821,"date":"2022-03-10T22:48:23","date_gmt":"2022-03-10T19:48:23","guid":{"rendered":"https:\/\/kifarunix.com\/?p=11821"},"modified":"2024-03-09T11:11:01","modified_gmt":"2024-03-09T08:11:01","slug":"install-cockpit-on-debian-ubuntu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-cockpit-on-debian-ubuntu\/","title":{"rendered":"Install Cockpit on Debian 11\/Ubuntu 22.04"},"content":{"rendered":"\n
Follow through this guide to learn how to install Cockpit on Debian 11\/Ubuntu 22.04. Cockpit<\/a> is Web Console enables users to administer GNU\/Linux servers using a web browser. It offers network configuration, log inspection, diagnostic reports, interactive command-line sessions, and more. You will learn how to install Cockpit on Debian 11 and how to install Cockpit on Ubuntu 22.04.<\/p>\n\n\n\n Cockpit is available on the default Debian\/Ubuntu repositories. However, in order to get the latest version releases installed, you need to install the Backports repositories on Ubuntu\/Debian systems.<\/p>\n\n\n\n To install the latest version of Cockpit on Debian 11, you need to install the backports repository<\/a> as follows;<\/p>\n\n\n\n Once the backports repositories are installed, then, run system package cache update;<\/p>\n\n\n\n Next, execute the command below to install Cockpit on Debian 11;<\/p>\n\n\n\n Fortunately, Ubuntu 22.04 has got the latest release version of Cockpit in its repositories;<\/p>\n\n\n\n Thus, you can install Cockpit on Ubuntu 22.04 by executing the command below;<\/p>\n\n\n\n Once the installation is done, Cockpit sets up its systemd service unit for easy management.<\/p>\n\n\n\n Start Cockpit service;<\/p>\n\n\n\n Checking the status;<\/p>\n\n\n\n Cockpit listens on TCP Port 9090;<\/p>\n\n\n\n Sample output;<\/p>\n\n\n\n You can now access your Debian\/Ubuntu system via the Cockpit web interface via the address Of course you need to open the port on firewall if any firewall is running.<\/p>\n\n\n\n For example, if you are using UFW, then open the port using the command below;<\/p>\n\n\n\n To allow access to the service from anywhere;<\/p>\n\n\n\n To allow from specific IP. Replace <IP> and <YOUR COMMENT> accordingly;<\/p>\n\n\n\n if you using iptables;<\/p>\n\n\n\n To allow from specific IP address;<\/p>\n\n\n\n Cockpit login Interface.<\/p>\n\n\n\n You can login using root user account credentials or user with sudo rights.<\/p>\n\n\n\n Cockpit web dashboard<\/p>\n\n\n\n If you see a warning Warning alert:Web console is running in limited access mode.<\/strong>, ensure the username is assigned sudo rights and that sudo package is installed. Then click Turn on administrative access<\/strong> and enter your password.<\/p>\n\n\n\n You can now administer your system using cockpit.<\/p>\n\n\n\n That concludes our guide on how to install Cockpit on Debian\/Ubuntu Linux.<\/p>\n\n\n\nInstall Cockpit on Debian 11\/Ubuntu 22.04<\/h2>\n\n\n\n
Install Cockpit on Debian 11<\/a><\/h3>\n\n\n\n
. \/etc\/os-release<\/code><\/pre>\n\n\n\n
echo \"deb http:\/\/deb.debian.org\/debian ${VERSION_CODENAME}-backports main\" > \/etc\/apt\/sources.list.d\/backports.list<\/code><\/pre>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
apt install -t ${VERSION_CODENAME}-backports cockpit<\/code><\/pre>\n\n\n\n
Install Cockpit on Ubuntu 22.04<\/a><\/h2>\n\n\n\n
apt install cockpit<\/code><\/pre>\n\n\n\n
Running Cockpit on Ubuntu 22.04\/Debian 11<\/h3>\n\n\n\n
systemctl start cockpit<\/code><\/pre>\n\n\n\n
systemctl status cockpit<\/code><\/pre>\n\n\n\n
\n\u25cf cockpit.service - Cockpit Web Service\n Loaded: loaded (\/lib\/systemd\/system\/cockpit.service; static)\n Active: active (running) since Thu 2022-03-10 13:01:51 EST; 2s ago\nTriggeredBy: \u25cf cockpit.socket\n Docs: man:cockpit-ws(8)\n Process: 11906 ExecStartPre=\/usr\/lib\/cockpit\/cockpit-certificate-ensure --for-cockpit-tls (code=exited, status=0\/SUCCESS)\n Main PID: 11921 (cockpit-tls)\n Tasks: 1 (limit: 2324)\n Memory: 2.0M\n CPU: 155ms\n CGroup: \/system.slice\/cockpit.service\n \u2514\u250011921 \/usr\/lib\/cockpit\/cockpit-tls\n\nMar 10 13:01:50 debian11 systemd[1]: Starting Cockpit Web Service...\nMar 10 13:01:51 debian11 cockpit-certificate-ensure[11913]: \/usr\/lib\/cockpit\/cockpit-certificate-helper: line 32: sscg: command not found\nMar 10 13:01:51 debian11 cockpit-certificate-ensure[11914]: Generating a RSA private key\nMar 10 13:01:51 debian11 cockpit-certificate-ensure[11914]: ........................+++++\nMar 10 13:01:51 debian11 cockpit-certificate-ensure[11914]: ..................+++++\nMar 10 13:01:51 debian11 cockpit-certificate-ensure[11914]: writing new private key to '0-self-signed.key'\nMar 10 13:01:51 debian11 cockpit-certificate-ensure[11914]: -----\nMar 10 13:01:51 debian11 systemd[1]: Started Cockpit Web Service.\n<\/code><\/pre>\n\n\n\n
ss -altnp | grep 9090<\/code><\/pre>\n\n\n\n
LISTEN 0 4096 *:9090 *:* users:((\"systemd\",pid=1,fd=261))<\/code><\/pre>\n\n\n\n
Accessing Cockpit Web Interface<\/h2>\n\n\n\n
http:\/\/<server-IP-or-resolvable-domain>:9090<\/code>.<\/p>\n\n\n\n
ufw allow 9090\/tcp<\/code><\/pre>\n\n\n\n
ufw allow from <IP> to any port 9090 proto tcp comment \"<YOUR COMMENT>\"<\/code><\/pre>\n\n\n\n
iptables -A INPUT -p tcp --dport 9090 -j ACCEPT<\/code><\/pre>\n\n\n\n
iptables -A INPUT -s 192.168.59.1\/32 -p tcp --dport 9090 -j ACCEPT<\/code><\/pre>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
Other Tutorials<\/h3>\n\n\n\n