---
title: "How to Install Cockpit on Ubuntu 20.04"
description: "Cockpit is a web-based server administration tool for self-managed Linux servers. The free server control panel, backed by Red Hat, is unique in the sense that the graphical interface only shows..."
url: https://www.inmotionhosting.com/support/product-guides/cloud-server/install-cockpit-on-ubuntu/
date: 2022-01-05
modified: 2022-01-05
author: "InMotion Hosting Contributor"
categories: ["Cloud Server Hosting"]
type: post
lang: en
---

# How to Install Cockpit on Ubuntu 20.04

![Install Cockpit on Ubuntu Server 20.04](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-install-ubuntu-1024x538.jpg)

Cockpit is a web-based server administration tool for self-managed Linux servers. The free server control panel, backed by Red Hat, is unique in the sense that the graphical interface only shows settings for installed services. It is most beneficial to install Cockpit on Ubuntu if your server is primarily used for business networking:

- File sharing
- LDAP integration
- Virtual machine (VM) hosting
- RAID storage management

Cockpit simplifies tasks for advanced users already aware of which system apps are essential to their needs.

- [Install Cockpit on Ubuntu](#install)
  - [Log into Cockpit](#log)
- [Cockpit Overview](#overview)
  - [What Next?](#next)

## Install Cockpit on Ubuntu

1. [SSH into your Ubuntu server](https://www.inmotionhosting.com/support/server/ssh/how-to-login-ssh/).
2. Install Cockpit: apt install cockpit
3. Install a free SSL certificate for your hostname with [Certbot](https://www.inmotionhosting.com/support/website/ssl/lets-encrypt-ssl-ubuntu-with-certbot/).
4. Cockpit requires the SSL certificate and private key to be located in the “/etc/cockpit/ws-certs.d” directory as .crt and .key files respectively. You can combine the cert and private key into a new file or copy the Certbot files separately. We’ll do the latter. Remember to replace “example.com” with your Cockpit domain all four times: cp /etc/letsencrypt/live/example.com/fullchain.pem /etc/cockpit/ws-certs.d/example.com.crt && cp /etc/letsencrypt/live/example.com/privkey.pem /etc/cockpit/ws-certs.d/example.com.key
5. Make the Cockpit user the owner of the new SSL files (replacing “example.com” within the command): chown cockpit-ws:cockpit-ws /etc/cockpit/ws-certs.d/example.com.crt /etc/cockpit/ws-certs.d/example.com.key
6. Ensure that Cockpit will use the correct SSL (.crt) file in the “ws-certs.d” directory: remotectl certificate It should display the full path to the new cert file.
7. Restart Cockpit to apply the SSL now: systemctl restart cockpit
8. Now, create a script to ensure the Cockpit SSL files are updated automatically when Certbot renews your SSL: sudo nano /etc/letsencrypt/renewal-hooks/post/001-restart-cockpit.sh
9. Add the following, replacing “example.com” with your Cockpit hostname, to automatically update the Cockpit SSL files and restart Cockpit afterwards: #!/usr/bin/env bashecho "SSL certificates renewed"cp /etc/letsencrypt/live/example.com/fullchain.pem /etc/cockpit/ws-certs.d/example.com.crtcp /etc/letsencrypt/live/example.com/privkey.pem /etc/cockpit/ws-certs.d/example.com.keychown cockpit-ws:cockpit-ws /etc/cockpit/ws-certs.d/example.com.crt /etc/cockpit/ws-certs.d/example.com.keyecho "Cockpit Restarted"systemctl restart cockpit
10. Save and exit the file.
11. Make the script executable: chmod +x /etc/letsencrypt/renewal-hooks/post/001-restart-cockpit.sh
12. Test the Certbot renewal process: sudo certbot renew --dry-run You should see “Cockpit Restarted” at the end.
13. Ensure ports 9090 and 80 are enabled in your firewall.

### Log into Cockpit

Visit your Cockpit instance in a web browser: example.com:9090.

The Cockpit Linux application integrates your system users for access. Login as an user with sudo privileges or [create a sudo user](https://www.inmotionhosting.com/support/server/linux/create-sudo-user-ubuntu-20/) to login. Check the box for “Reuse my password for privileged tasks” for sudo privileges in Cockpit.

![Ubuntu Cockpit server login](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-login-ubuntu-20-1024x576.png)

The updates notification should be addressed immediately.

![Linux Cockpit server overview](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-1024x576.png)

Select “Bug Fix Updates Available” to update the system. It should also clear any errors.

![Available Cockpit software updates](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-software-updates-1024x576.png)

Select “Install All Updates,” “Restart Now,” then “Reconnect.” Alternatively, you can restart the server from your Account Management Panel (AMP). Either option may take up to five minutes to complete.

## Cockpit Overview

Below is a short summary of the Cockpit Overview dashboard.

**Logs:** view and sort system logs according to level of urgency and time frame.

![Linux Cockpit server logs](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-logs-1024x576.png)

**Storage:** visualize disk space and bandwidth, list filesystems, and check storage logs.

![Cockpit disk I/O](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-storage-1024x576.png)

**Networking:** manage bridges, VLANs, and other interfaces.

![Cockpit network interfaces](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-networking-1024x576.png)

**Accounts:** configure system user credentials, roles, password rules. You can also terminate user sessions and configure SSH keys.

![Linux Cockpit server users](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-accounts-1024x384.png)

**Services:** manage system services and scheduled events (cron jobs).

![Cockpit system services](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-services-1024x576.png)

**Applications:** list installed Cockpit applications. More are available at [https://cockpit-project.org/applications](https://cockpit-project.org/applications).

![Installed Cockpit applications](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-applications-1024x384.png)

**Terminal:** use a command line interface (CLI) for advanced tasks.

![Cockpit Terminal](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-terminal-1024x576.png)

Select “Dashboard” from the sidebar to view stats for CPU, memory, network, and disk I/O.

![Cockpit I/O dashboard](https://www.inmotionhosting.com/support/wp-content/uploads/2022/01/cockpit-dashboard-sidebar-1024x576.png)

You can change the Cockpit language by selecting your username and “Display Language” from the upper-right corner. System applications added after you install Cockpit on Ubuntu (e.g. Firewalld) will display respective configuration sections automatically.

### What Next?

1. If you haven’t already, install any necessary system services from the terminal. 
2. Create any regular users needed.
3. Check for Cockpit applications that may suit your needs at cockpit-project.org. We recommend the file manager application – [Navigator](https://www.inmotionhosting.com/support/product-guides/cloud-server/cockpit-file-manager/).

Experience full control over your server environment and deploy the best operating and management systems that fit your needs with our reliable [Cloud VPS Hosting](https://www.inmotionhosting.com/cloud-vps)!
