Back to Articles

Ubuntu Docker Desktop Setup Guide

August 3, 2026

Docker Desktop on Ubuntu: Clean Install & Sign-in Fix

This guide covers how to completely remove old Docker files, cleanly install the official Docker Desktop on Ubuntu, and fix the common issue where the "Sign In" button does not work.

Part 1: Clean Installation

1. The Cleanup (Removing old/conflicting files)

To ensure a fresh slate, remove any conflicting packages and wipe old Docker data.

Remove old packages:

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

Wipe old Docker data (Caution: Deletes existing containers/images):

sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
sudo rm -rf ~/.docker

2. Set Up Docker's Official Repository

Install prerequisites and add Docker's official GPG key and repository.

# Update and install prerequisites
sudo apt-get update
sudo apt-get install ca-certificates curl

# Add Docker’s official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

3. Install Docker Desktop

Download the latest .deb package from the official Docker website and install it via terminal.

cd ~/Downloads
# Replace with the exact name of your downloaded file
sudo apt-get install ./docker-desktop-amd64.deb

Note: If you are not using the default GNOME desktop, run sudo apt install gnome-terminal as well.

Part 2: Fixing the Sign-In Issue

The Problem: Docker Desktop relies on pass (Standard Unix Password Manager) and gpg to securely store credentials on Linux. If these aren't set up, the Sign-In button fails or gets stuck.

1. Install Required Tools

sudo apt-get install pass gpg

2. Generate a GPG Key

gpg --generate-key
  • Provide your Name and Email ID.
  • Press O to confirm.
  • Set a Passphrase (Password) in the pop-up window and remember it.

3. Initialize the Password Manager

Use the exact same Email ID you provided in the previous step to initialize pass.

pass init "your-email@example.com"

4. Restart Docker Desktop

Kill the background processes and restart to apply the new credential helper.

systemctl --user restart docker-desktop

5. Sign In

Open the Docker Desktop GUI and click Sign In. It will successfully redirect to your browser and route the authentication token back to the desktop app.

Thanks for reading. Browse more articles →