How to install Rancher desktop on Ubuntu 22.04 or 20.04

Rancher Desktop is a free and open-source tool that is built on top of Docker Dekstop, which provides a GUI to manage Docker Images. We can create a virtual machine to run containerd or dockerd and Kubernetes using it. However, the main task of Rancher is to run and manage the Kubernetes cluster locally on the user’s desktop with the help of an easy-to-use Graphical interface.

It supports multiple Kubernetes distributions, including Rancher Kubernetes Engine (RKE), Kubernetes, and others. Not only this, but Rancher Desktop also offers additional tools and utilities such as Kubectl, Helm, and Istio, which make it easier for developers to manage and deploy their applications. Further, with its help, developers can test and develop their applications locally before deploying them to production environments.

Rancher Desktop is similar to Docker Desktop with GUI for creating containers, it is developed by SUSE, and the source code is hosted on GitHub…

In this article, we learn the steps to install Rancher Desktop on Ubuntu 22.04 or 20.04 LTS Linux.

1. Requirements

To follow this Rancher tutorial, your Ubuntu Linux server or desktop must have the following things:

  • Ubuntu OS running on a system that has an x86_64 processor with either AMD-V or VT-x virtualization. However, it is common in most modern systems.
  • Internet connection.
  • sudo or root user rights
  • At least 8GB of RAM and 4-core CPU for proper working

2. Update your Ubuntu Linux

Let’s secure our system by installing the latest available security and package updates for our Ubuntu 22.04 or 20.04.

sudo apt update && sudo apt upgrade

3. Add Rancher GPG Key

To install required packages for working with Rancher Desktop, we need to add a GPG key used to sign the packages available to download from the official Rancher repository. Therefore, first, open your command terminal – the shortcut key for that is Ctrl+Alt+T and after that execute the given command.

curl -s https://download.opensuse.org/repositories/isv:/Rancher:/stable/deb/Release.key | gpg --dearmor | sudo dd status=none of=/usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg

4. Add Package Repository

The next step is to add a source on our Ubuntu 22.04 or 20.04 to get the packages required for the installation of Rancher Desktop. Unfortunately, all of them are not available through the default system repository of Ubuntu Linux. Hence, use the following command and add the official package repository of Rancher Desktop.

echo 'deb [signed-by=/usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg] https://download.opensuse.org/repositories/isv:/Rancher:/stable/deb/ ./' | sudo dd status=none of=/etc/apt/sources.list.d/isv-rancher-stable.list

After adding the repository, don’t forget to run the system update command for rebuilding the APT index cache.

sudo apt update

5. Installing Rancher Desktop on Ubuntu 22.04 or 20.04

Once you have performed the all above steps on your Debian-based Linux system, just execute the given command using the APT package manager to install Rancher Desktop. The command will also add KVM and Docker to your system, if not present already.

sudo apt install rancher-desktop

6. Configure PATH

Although while installing Rancher Desktop, it will automatically configure its the path for system environment, however, sometimes it will not. Hence, add its path to your Bashrc file manually, so that we can run its command line tools from anywhere in our Terminal.

nano ~/.bashrc

Scroll to the end of the file and add:

PATH="$PATH:~/.rd/bin"

Save the file using Ctrl+X, press Y and then press Enter key. After that run:

source ~/.bashrc

7. Initiliaze Pass

If you have any plans to login docker or nerdctl accounts then we need initialize pass which is used by Rancher Desktop to securely store credentials and passed to Docker or Nerdctl when they required.

First generate GPG key using:

gpg --generate-key

Follow the text based wizard and once the key is generated copy the same.

After that use the key with the following command:

pass init your-key

Example:

pass init ABC656079F7F2A3E9036E485C7ED899AA4503A5E

Press the Enter key.

Initiliaze Pass GPG Rancher Desktop

8. Allow Traefik to listen to privileged ports

Default ingress controller in Rancher is Traefik, however Ubuntu doesn’t allow non-root user running programs like Traefik to listen privileged TCP and UDP ports below 1024. So, to give it a permission use the given command, so that it can access ports like 80.

sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80

9. Launch Rancher Desktop

We have configured all the basic settings required to run Rancher on Ubuntu Desktop, now go to the Applications menu and search for Rancher. As its icon appears, click to run the same.

install Rancher desktop on Ubuntu 22.04 or 20.04

FAQ

Is Rancher desktop an alternative to Docker desktop?

Yes, Rancher can be considered as a Docker Desktop alternative, however, Docker Desktop is only meant to run its own images and containers. Whereas Rancher can run containerd or dockerd and Kubernetes.

Is Rancher desktop free or commercial?

Rancher Desktop is published under an Apache-2.0 license, hence free and open source to install and use on Windows, Linux, or macOS.

Does Rancher Desktop use a VM?

Yes, Rancher Desktop uses a virtual machine to run containerd or dockerd and Kubernetes to get the max performance out of them.

How much memory does the Rancher desktop use?

As per the official documentation, your system must have 4 CPUs and 8GB of RAM for the proper functioning of Rancher.

Other Articles:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.