Skip to main content

Installing Rancher Desktop

Setting Up Rancher Desktop with WSL2 on Windows

Prerequisites

Rancher Desktop requires Windows Subsystem for Linux (WSL) on Windows; this will automatically be installed as part of the Rancher Desktop setup. Manually downloading a distribution is not necessary.

Note: You need WSL2 to use Rancher Desktop properly.

Step 1: Install WSL2

To install WSL2, follow these steps:

  1. Open PowerShell as Administrator Right-click on the Start menu and select Windows PowerShell (Admin).
  2. Run the Commands to Install WSL2 Execute the commands mentioned in the Microsoft WSL installation guide. Follow each step carefully.

Download and Install Linux Kernel Update During Step 4 of the WSL installation process, you'll be prompted to download the Linux kernel update. Follow the provided link to download and install the update.

Step 2: Install Rancher Desktop

  1. Visit the Rancher Desktop Official Website Navigate to the Rancher Desktop website and download the installer for Windows.

  2. Install Rancher Desktop Run the installer and follow the on-screen instructions.

  3. Launch Rancher Desktop After installation, double-click the Rancher Desktop icon on your desktop to open the application.

Step 3: Install Ubuntu from Microsoft Store

  1. Open Microsoft Store Search for "Ubuntu" in the Microsoft Store.

  2. Download and Install Ubuntu Install Ubuntu from the store. After installation, launch Ubuntu and set up your username and password.

Step 4: Configure Rancher Desktop

  1. Open Rancher Desktop Preferences Right-click on the Rancher Desktop icon in the taskbar and select Preferences.

  2. Configure WSL

    • Go to WSL settings.
    • Select Ubuntu as the distribution.
  3. Configure Container Engine

    • Go to Container Engine settings.
    • Select dockerd (moby).
  4. Configure Kubernetes

    • Go to Kubernetes settings.
    • Select the latest version available.
  5. Hit Apply After making these changes, click Apply to save and apply the changes.

ISSUE: Kubernetes Version Not Showing Up

If you face issues with the Kubernetes version not showing up, follow these steps:

  1. Open PowerShell as Administrator Run the following command to install kubectl: curl.exe -LO "https://dl.k8s.io/release/v1.31.0/bin/windows/amd64/kubectl.exe"
  2. Restart Rancher Desktop Quit Rancher Desktop from the taskbar and then relaunch it. The Kubernetes versions should now be visible.

[Optional]

Install Docker in Ubuntu

  1. Open Ubuntu Terminal Launch the Ubuntu terminal.
  2. Install Docker Run the following command to install Docker: sudo apt install docker.io
  3. Verify Docker Installation Run the following command to check if Docker was installed successfully: docker version

ISSUE: Permission Denied Error with Docker

If you encounter a "permission denied" error when running the docker version command without sudo privileges, follow these steps to fix it:

  1. Add Docker Group and User Run the following commands one by one: sudo addgroup --system docker sudo adduser $USER docker newgrp docker
  2. Set Correct Permissions Run these commands to set the correct permissions: udo chown root:docker /var/run/docker.sock sudo chmod g+w /var/run/docker.sock
  3. Verify Fix Run the docker version command again. The permission denied error should be resolved.
Was this page helpful?