Welcome to our guide on how to Install Cockpit on Debian 12/11/10/9. Linux Cockpit is an Open Source, lightweight, web-based Server/system administration tool originally written for RHEL family Linux distributions. Cockpit interacts directly with the operating system from a real Linux session in a browser with easy to use interface.
Features of Cockpit
Cockpit allows you to perform:
- Service Management – Start, stop, restart, reload, disable, enable, mask e.t.c
- User Account Management – Add users, delete, Lock, assign Administrator role, set password, force password change, Add Public SSH keys e.t.c.
- Firewall Management
- Cockpit Container management
- SELinux Policy management
- Journal v2
- iSCSI Initiator configurations
- SOS-reporting
- NFS Client setup
- Configure OpenConnect VPN Server
- Privileged Actions – Shutdown, Restart system
- Join Machine to Domain
- Hardware Device Management
- System Updates for dnf, yum, apt hosts
- Manage the Kubernetes Node
Install Cockpit on Debian 12/11/10/9
Cockpit package should be available on the OS default sources
$ sudo apt update
$ sudo apt policy cockpit
cockpit:
Installed: (none)
Candidate: 287-1
Version table:
287-1 500
500 http://deb.debian.org/debian bookworm/main amd64 Packages
500 http://mirror.hetzner.com/debian/packages bookworm/main amd64 Packages
To install Cockpit on Debian 12/11/10, run the command below
sudo apt install cockpit cockpit-machines cockpit-podman
Install Cockpit on Debian 9:
Cockpit is included in Debian 9 (Stretch) backports. Enable backports repository on Debian 9 by running the command:
echo 'deb http://deb.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/backports.list
Then update your package list and install cockpit:
sudo apt update
sudo apt install cockpit cockpit-machines cockpit-podman
Access cockpit web interface on Debian 12/11/10/9
Cockpit service should be automatically started after the installation. You can confirm if service is running using:
systemctl status cockpit
If the service is not running, start it by running the following command in your terminal:
sudo systemctl start cockpit
Also enable cockpit service to start on system boot;
sudo systemctl enable cockpit.socket
Check status again after starting the service:
$ systemctl status cockpit
● cockpit.service - Cockpit Web Service
Loaded: loaded (/lib/systemd/system/cockpit.service; static)
Active: active (running) since Fri 2023-08-04 18:32:11 UTC; 2s ago
TriggeredBy: ● cockpit.socket
Docs: man:cockpit-ws(8)
Process: 1770 ExecStartPre=/usr/lib/cockpit/cockpit-certificate-ensure --for-cockpit-tls (code=exited, status=0/SUCCESS)
Main PID: 1783 (cockpit-tls)
Tasks: 1 (limit: 4531)
Memory: 2.4M
CPU: 290ms
CGroup: /system.slice/cockpit.service
└─1783 /usr/lib/cockpit/cockpit-tls
Aug 04 18:32:11 deb12 systemd[1]: Starting cockpit.service - Cockpit Web Service...
Aug 04 18:32:11 deb12 cockpit-certificate-ensure[1777]: /usr/lib/cockpit/cockpit-certificate-helper: line 25: sscg: command not found
Aug 04 18:32:11 deb12 cockpit-certificate-ensure[1778]: .................+......+....+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...............................+...+....>
Aug 04 18:32:11 deb12 cockpit-certificate-ensure[1778]: ..+..........+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+.+.....+....+.....+.......+.....+...+.......+........>
Aug 04 18:32:11 deb12 cockpit-certificate-ensure[1778]: -----
Aug 04 18:32:11 deb12 systemd[1]: Started cockpit.service - Cockpit Web Service.
Cockpit service binds to port 9090
once it is started. Access its web interface by opening http://[ServerIP|Hostname]:9090
.
$ ss -tunelp | grep 9090
tcp LISTEN 0 4096 *:9090 *:* ino:56299 sk:6 cgroup:/system.slice/cockpit.socket v6only:0 <->
If you have a running UFW firewall service, allow port 9090.
sudo ufw allow 9090
Accept Invalid Certificate Warning to access Cockpit web console.
Click on “Advanced” to accept.
You need system root credentials to login to Cockpit. This can be set on the server using the command:
debian@debian-bullseye-01:~$ sudo passwd root
New password: <INPUT-NEW-ROOT-PASSWORD>
Retype new password: <CONFIRM-ROOT-PASSWORD>
passwd: password updated successfully
Now use set credentials to login to Cockpit web console on Debian.
Debian 9 Login Page
You should get to the dashboard page after Logging in. It has a look similar to one shared in screenshot;
You can also open a terminal session for running Linux commands
I hope this guide was helpful. Thank you for using our article to install Cockpit on Debian 11/10/9. Read more on Cockpit Documentation. From the dashboard you can administer:
- Storage
- Networking
- Manage Linux user accounts
- Check service logs
- Manage service – status, stop, restart e.t.c
- Perform system update
- Install applications
- and many other Cockpit functions
Also check how to manage CentOS/RHEL 8 Linux with Cockpit