---
title: How to Install Cockpit on Debian 12
url: https://docs.vultr.com/how-to-install-cockpit-on-debian-12
description: Learn how to install Cockpit on Debian 12 with step-by-step instructions. This guide covers installation, configuration, and troubleshooting for beginners.
publish_date: 2025-01-17T14:11:03.789125Z
last_updated: 2025-01-17T14:11:03.789125Z
author: Samuel Mwangi
header_image: https://docs.vultr.com/public/doc-assets/2032/2c755ff8-5ba9-46d8-adad-634330fc12cc.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Introduction

Cockpit is an open-source, web-based graphical server management control panel that simplifies server management using system APIs and commands to perform system administration tasks. It's highly extensible with modules that enable additional Cockpit functionalities such as container management, system reporting, and web server configurations. To get started, you can easily install Cockpit on Debian 12, giving you a user-friendly interface for managing your server's resources and tasks.

This article explains how to install Cockpit on Debian. You will access the Cockpit management control panel, secure it with trusted SSL certificates, and install modules like Podman to manage containers on the server.

## Install Cockpit on Debian 12

Cockpit is available in the default package repositories on Debian 12. Follow the steps below to update the APT package index and install Cockpit.

1. Update the server's package information index.

    ```console
    $ sudo apt update
    ```

1. Install Cockpit.

    ```console
    $ sudo apt install cockpit -y
    ```

1. Enable Cockpit to start at system boot.

    ```console
    $ sudo systemctl enable --now cockpit.socket
    ```

1. Start the Cockpit service.

    ```console
    $ sudo systemctl start cockpit
    ```

1. View the Cockpit service status and verify that it's active.

    ```console
    $ sudo systemctl status cockpit
    ```

    Output:

    ```
    ● cockpit.service - Cockpit Web Service
         Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static)
         Active: active (running) since Fri 2025-01-10 12:10:47 UTC; 5s ago
    TriggeredBy: ● cockpit.socket
           Docs: man:cockpit-ws(8)
        Process: 68819 ExecStartPre=/usr/lib/cockpit/cockpit-certificate-ensure --for-cockpit-tls code=exi>   Main PID: 68833 (cockpit-tls)
          Tasks: 1 (limit: 1061)
    ```

1. Allow the Cockpit port `9090`, HTTP port `80`, and the HTTPS port `443` through the default firewall configuration.

    ```console
    $ sudo ufw allow 9090,80,443/tcp
    ```

1. Reload UFW to apply the firewall changes.

    ```console
    $ sudo ufw reload
    ```

1. View the UFW status and verify all active firewall rules.

    ```console
    $ sudo ufw status
    ```

    Output:

    ```
    Status: active

    To                         Action      From
    --                         ------      ----
    22/tcp                     ALLOW       Anywhere                  
    80,443,9090/tcp            ALLOW       Anywhere                  
    22/tcp (v6)                ALLOW       Anywhere (v6)             
    80,443,9090/tcp (v6)       ALLOW       Anywhere (v6)
    ```

## Secure Cockpit with Trusted SSL Certificates

SSL certificates encrypt the traffic between a web browser and the Cockpit control panel. Follow the steps below to generate trusted Let's Encrypt SSL certificates to secure Cockpit on your server.

1. Install the Certbot Let's Encrypt client tool.

    ```console
    $ sudo apt install certbot -y
    ```

1. Request a new SSL certificate using your Cockpit domain. Replace `cockpit.example.com` with your actual domain and `admin@example.com` with your active email address.

    ```console
    $ sudo certbot certonly --standalone -d cockpit.example.com -m admin@example.com --agree-tos
    ```

    Note the SSL certificate paths in you output similar to the one below when successful.

    ```

    ```

1. Link the `fullchain.pem` SSL certificate file to the `/etc/cockpit/ws-certs.d/` directory. Replace `certificate.cert` with your desired certificate filename.

    ```console
    $ sudo ln -sf /etc/letsencrypt/live/cockpit.example.com/fullchain.pem /etc/cockpit/ws-certs.d/certificate.cert
    ```

1. Link the `privkey.pem` private key to the `/etc/cockpit/ws-certs.d/`. Replace `certificate.key` with your desired filename.

    ```console
    $ sudo ln -sf /etc/letsencrypt/live/cockpit.example.com/privkey.pem /etc/cockpit/ws-certs.d/certificate.key
    ```

1. Restart Cockpit to apply the changes and load the SSL certificate files.

    ```console
    $ sudo systemctl restart cockpit
    ```

## Access Cockpit

Cockpit uses the default server users and permissions to perform system administration tasks using the web-based control panel. Cockpit does not support `root` user authentication and requires non-root sudo user accounts to manage the server using the administrative access role. Follow the steps below to create a dedicated non-root sudo user to access Cockpit on your server.

1. Create a new non-root user such as `cockpitadmin` and enter a strong user password when prompted.

    ```console
    $ sudo adduser cockpitadmin
    ```

1. Add the `cockpitadmin` user to the sudo users group.

    ```console
    $ sudo usermod -aG sudo cockpitadmin
    ```

1. Access the Cockpit port `9090` using your domain in a web browser such as Chrome.
  
    ```
    https://cockpit.example.com:9090
    ```

1. Log in to Cockpit using your `cockpitadmin` user credentials.

    ![The Cockpit Login page](https://docs.vultr.com/public/doc-assets/2032/1901d15b-ed06-47f3-9015-c062c2f28b76.png)

### Manage a Server Using Cockpit

You can perform the following server management and monitoring tasks within the Cockpit control panel interface.

1. Click the **Turn on administrative access** prompt to enable the user's sudo privileges in your Cockpit session.
1. Click **Overview** to monitor the system resource usage (CPU, and memory), system health, system information, and basic configuration.
    
    ![Cockpit dashboard](https://docs.vultr.com/public/doc-assets/2032/cd192b61-2211-41ad-b4e8-30a69d583e6c.png)

1. Click **Logs** tab to view and analyze the server logs.

    ![Cockpit's log viewing interface](https://docs.vultr.com/public/doc-assets/2032/3261a9d4-2dc4-4600-a763-6b63f12a98a8.png)

1. Click **Storage** tab to view the server's storage usage information.

    ![Cockpit's storage interface](https://docs.vultr.com/public/doc-assets/2032/dacf48a4-c96e-4647-9191-990ce243cbc2.png)

1. Click **Accounts** to manage user accounts on the server.

    ![Cockpit's Accounts tab](https://docs.vultr.com/public/doc-assets/2032/7a25eec7-689f-471b-9983-70335c0919a4.png)

1. Click **Services** to monitor and manage system services on the server.

    ![Cockpit's Service interface](https://docs.vultr.com/public/doc-assets/2032/e9e2a771-3fab-4dd7-8bfb-7d129bae697c.png)

1. Click **Applications** to view the Cockpit addon applications installed on the server.

    ![Cocktail's Application interface](https://docs.vultr.com/public/doc-assets/2032/2551fbeb-aab2-43ce-9692-f63eee32eae9.png)

1. Click **Software Update** to view the pending software updates on the server.

    ![Cockpit's Software updates tab](https://docs.vultr.com/public/doc-assets/2032/ab16a91b-a100-4721-af00-2d39a2fd29dc.png)

## Create and Manage Containers Using Cockpit Podman

Cockpit Podman is a container management module that lets you create and manage containers using Podman on your server. Follow the steps below to install the Cockpit Podman module and manage containers on your server.

1. Click the **Terminal** tab to access the server terminal in your web browser.

    ![Cockpit's Terminal interface](https://docs.vultr.com/public/doc-assets/2032/364cd481-0ac4-4f6d-b30d-727d35deab03.png)

1. Install the Cockpit Podman module.

    ```console
    $ sudo apt install cockpit-podman -y
    ```

1. Refresh your Cockpit window and click **Podman containers** on the left navigation menu.

    ![Cockpit's Podman Containers interface](https://docs.vultr.com/public/doc-assets/2032/6159f1f9-6116-459b-a5e1-7060ac769df1.png)

1. Click the **Images** options menu and select `Download new image` from the list.

    ![Images menu button](https://docs.vultr.com/public/doc-assets/2032/509209f1-e5b9-40dc-8e10-17a46f4e423f.png)

1. Enter `nginx` in the **Search** field.
1. Select the `docker.io/library/nginx` image from the list and click the **Download** to pull the container image.

    ![Image selection in Podman](https://docs.vultr.com/public/doc-assets/2032/469eaf8e-4855-438b-bfa2-ccba63cea37c.png)

1. Click **Create Container** button in the **Containers** section to set up a new container.

    ![Creating the container](https://docs.vultr.com/public/doc-assets/2032/50277a20-9a07-48a4-aee1-fd6256c1c91b.png)

1. Keep the `Details` configuration information.

    ![The details ](https://docs.vultr.com/public/doc-assets/2032/5289ad6d-d19e-4c9d-aa72-257ab20f13ed.png)

1. Navigate to the `Integration` tab and click **Add port mapping**.
1. Map the host HTTP port `80` to the container port `80`.

    ![Port mapping configurations](https://docs.vultr.com/public/doc-assets/2032/a84d9929-79d4-42c3-bff2-6cafc2a4cbb8.png)

1. Click **Create and Run** to deploy the container
1. Click to expand the container in the **Containers** section and verify that it's in a `Running` state.

    ![The Nginx container in a running state](https://docs.vultr.com/public/doc-assets/2032/3a76d83c-e955-4ddd-8287-5da3b4179115.png)

1. Navigate to the `Logs` tab to monitor the container logs.

    ![The container's logs](https://docs.vultr.com/public/doc-assets/2032/fb3cec72-73cc-42a7-a6f7-56bb023ce61c.png)

1. Click the options menu in the container's top-right corner to view the available container management actions.

    ![Container management actions](https://docs.vultr.com/public/doc-assets/2032/dcc82efe-4f91-404d-a16a-cc8addfed988.png)

    The container management actions include stopping, force stopping, restarting, force restarting, pausing, creating a checkpoint, renaming, committing, and deleting the container.

## Conclusion

You have installed Cockpit on Debian 12 and managed the server using the web-based control panel. You can install multiple modules to extend Cockpit with additional functionalities and use the control panel to perform system administration tasks. For more information, visit the [Cocktpit documentation](https://cockpit-project.org/documentation.html).
