DEV Community

Cover image for Installing Cockpit on Ubuntu 24.04
Sanskriti Harmukh for Vultr

Posted on with Aashish Chaurasiya Originally published at docs.vultr.com

Installing Cockpit on Ubuntu 24.04

Cockpit is a web-based server management dashboard — monitoring, storage, networking, logs, and user accounts, extensible with add-ons like Podman container management. This guide installs it on Ubuntu 24.04, secures it with a real TLS certificate, tours the dashboard, and manages a container through the Cockpit Podman extension.

Prerequisites: an Ubuntu 24.04 server, a domain A record (e.g. cockpit.example.com), a dedicated non-root sudo user (e.g. cockpit_admin).


Install Cockpit

$ sudo apt update
$ sudo apt install cockpit -y
$ sudo systemctl enable cockpit.socket
$ sudo systemctl start cockpit
$ sudo systemctl status cockpit
Enter fullscreen mode Exit fullscreen mode

Cockpit listens on TCP 9090.


Secure with Let's Encrypt

Cockpit serves plain HTTP on 9090 by default — fix that before exposing it.

$ sudo ufw status
$ sudo ufw allow 9090/tcp
$ sudo ufw allow 80/tcp
$ sudo ufw allow 443/tcp
$ sudo ufw reload
$ sudo apt install snapd -y
$ sudo snap install certbot --classic
$ sudo certbot --standalone certonly -d cockpit.example.com -m cockpit@example.com --agree-tos
$ sudo certbot renew --dry-run
Enter fullscreen mode Exit fullscreen mode

Combine cert + key for Cockpit's format and install it:

$ sudo cat /etc/letsencrypt/live/cockpit.example.com/fullchain.pem /etc/letsencrypt/live/cockpit.example.com/privkey.pem > cockpit.cert
$ sudo mv cockpit.cert /etc/cockpit/ws-certs.d/
$ sudo systemctl restart cockpit.socket
Enter fullscreen mode Exit fullscreen mode

Access the Dashboard

Visit https://cockpit.example.com:9090, log in with your sudo user (root login isn't supported through the web UI). Click Turn on administrative access and enter your password to unlock admin-level actions.

What You Can Do

  • Overview — health, CPU, memory, system info; View metrics and history for detailed usage stats
  • Storage — manage attached devices, monitor read/write speeds, view storage logs
  • Services — view/manage systemd services, timers, sockets, paths, targets
  • Networking — real-time interface usage and logs
  • Logs — filter by duration, priority, or daemon identifier
  • Accounts — view/create users and groups
  • Terminal (under Tools) — a full shell session in the browser

Manage Containers with Cockpit Podman

$ sudo apt update
$ sudo apt install cockpit-podman -y
$ sudo ufw route allow proto tcp from any to any port 80
$ sudo ufw reload
Enter fullscreen mode Exit fullscreen mode

Refresh the dashboard, click Podman containers:

  1. Create container → name it (e.g. app-example) → image nginx (pick docker.io/library/nginx).
  2. IntegrationAdd port mapping → host port 80, container port 80, leave IP blank (binds all interfaces).
  3. Create and run.
  4. Confirm it shows Running under Containers.
  5. Visit http://SERVER-IP — the default Nginx page should load.

Next Steps

Cockpit is running with a trusted certificate and Podman container management enabled. From here:

  • Explore other Cockpit extensions (e.g. cockpit-machines for VM management if applicable)
  • Set up additional non-root admin accounts for team members
  • Use the built-in Terminal for quick server tasks without a separate SSH session

For the full guide, visit the original article on Vultr Docs.

Top comments (0)