Atlantic.Net Blog

How to Install and Use Cockpit on Ubuntu 20.04

Hitesh Jethva
by Atlantic.Net (191posts) under Dedicated Server Hosting, Tutorials
0 Comments

The Cockpit is a web-based tool that helps system administrators perform day-to-day administrative tasks from a web browser. You can monitor system resources, create and remove user accounts, start and stop services, restart and shut down the system, and create and manage virtual boxes using the Cockpit. Cockpit makes it easier to administer your Linux server via a web-based interface.

In this tutorial, we will show you how to install and use Cockpit on Ubuntu 20.04.

Prerequisites

  • A fresh Ubuntu 20.04 server on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Ubuntu 20.04 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Ubuntu 20.04 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install Cockpit

By default, the Cockpit package is included in the Ubuntu default repository. You can install it by just running the following command:

apt-get install cockpit -y

Once the Cockpit is installed, start the Cockpit service and enable it to start at system reboot:

systemctl start cockpit
systemctl enable cockpit

You can also verify the status of the Cockpit service with the following command:

systemctl status cockpit

You should get the following output:

  • cockpit.service - Cockpit Web Service
Loaded: loaded (/lib/systemd/system/cockpit.service; static; vendor preset>
Active: active (running) since Fri 2021-01-22 15:26:48 UTC; 4s ago
TriggeredBy: ● cockpit.socket
Docs: man:cockpit-ws(8)
Process: 7544 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=>
Main PID: 7552 (cockpit-tls)
Tasks: 1 (limit: 2353)
Memory: 2.0M
CGroup: /system.slice/cockpit.service
└─7552 /usr/lib/cockpit/cockpit-tls

Jan 22 15:26:48 ubuntu2004 systemd[1]: Starting Cockpit Web Service...
Jan 22 15:26:48 ubuntu2004 remotectl[7544]: Generating temporary certificate us>
Jan 22 15:26:48 ubuntu2004 remotectl[7544]: Error generating temporary dummy ce>
Jan 22 15:26:48 ubuntu2004 remotectl[7544]: Generating temporary certificate us>
Jan 22 15:26:48 ubuntu2004 systemd[1]: Started Cockpit Web Service.

At this point, Cockpit is started and listening on port 9090. You can verify it with the following command:

ss -antpl | grep 9090

You should see the following output:

LISTEN 0 4096 *:9090 *:* users:(("cockpit-
tls",pid=7552,fd=3),("systemd",pid=1,fd=101))

Step 3 – Access Cockpit Web Interface

Now, open your web browser and access the Cockpit web interface using the URL https://your-server-ip:9090. You should see the Cockpit login page:

Provide your root username and password and click on the Log in button. You should see the Cockpit dashboard in the following page:

Step 4 – How to Use Cockpit

You can also create and manage the virtual machine using Cockpit.

First, you will need to enable the virtual machine option in Cockpit. You can enable it with the following command:

apt-get install cockpit-machines -y

Once installed, log out and log in again, you should see the Virtual machine option in the following page:

Click on the Create VM button to create a virtual machine. You should see the following page:

Provide your VM name, operating system, RAM, and Disk and click on the Create button. Once the VM is created, you should see the following page:

Next, click on the Console tab, you should see the following page:

Click on the Run button to start the Virtual Machine. Once the VM is started, you should see the Virtual Machine login screen in the following page:

You can now login to VM using your root username and password.

Step 5 – Manage Services and Logs

You can manage the system services and logs from the Cockpit web interface. In the Cockpit web interface, click on the Services button. You should see all system services in the following page:

From here, you can start, stop and disable the system services easily.

Click on the Logs button in the left pane and you should see all system logs in the following page:

If you want to access your server via terminal, click on the Terminal button. You should see the terminal windows in the following screen:

Conclusion

Congratulations! You have successfully installed Cockpit on Ubuntu 20.04. You can now easily manage your server from its web-based interface. You can also use Cockpit on a dedicated server from Atlantic.Net!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources