How to Install Insomnia on Ubuntu Linux

Insomnia is an open-source API client for testing and debugging RESTful APIs, GraphQL endpoints, gRPC services, and WebSocket connections. For example, common use cases include testing authentication flows, debugging API responses with detailed request history, and managing environment variables across development, staging, and production environments. Ultimately, by the end of this guide, you will have Insomnia installed on your Ubuntu system with a working API client ready to import OpenAPI specifications and create collections.

This guide covers installation on Ubuntu LTS releases using three methods: official APT repository from Cloudsmith, manual .deb package download from GitHub releases, and Snap package installation. Notably, all methods provide the latest stable version with different update mechanisms.

Choose Your Insomnia Installation Method

Insomnia offers three installation methods on Ubuntu. First, the official APT repository integrates with your system’s package manager for automatic updates via standard Ubuntu commands. Alternatively, the manual .deb method provides direct control over versioning without repository configuration. Finally, the Snap method offers automatic background updates with sandboxed execution.

MethodChannelVersionUpdatesBest For
APT Repository (Cloudsmith)Official RepositoryLatest stableAutomatic via apt upgradeUsers who want integrated package management with system updates
Manual .deb PackageGitHub ReleasesLatest stableManual re-download and reinstallUsers who prefer version control without repository configuration
Snap PackageSnapcraftLatest stableAutomatic via snapdDesktop users who prefer automatic updates with sandboxing

Overall, the official APT repository method is recommended for most users who want integrated package management that works with standard Ubuntu update commands. Additionally, the repository uses the focal suite for cross-version compatibility across all Ubuntu releases.

Update Ubuntu Before Installation

Before proceeding, update your package cache to ensure you have access to the latest package versions.

sudo apt update && sudo apt upgrade

Method 1: Install Insomnia via Official APT Repository

The official APT repository from Cloudsmith integrates Insomnia updates with your standard system package management. More specifically, this method configures a repository using DEB822 format with proper GPG key verification.

Install Required Dependencies

To begin, install curl and ca-certificates to download the GPG key and repository metadata securely.

sudo apt install curl ca-certificates

Add Kong Insomnia GPG Key

Once the dependencies are installed, download and install the official GPG signing key for package verification.

curl -fsSL 'https://packages.konghq.com/public/insomnia/gpg.474B9148D779222B.key' | sudo gpg --dearmor -o /usr/share/keyrings/kong-insomnia-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/kong-insomnia-archive-keyring.gpg

Add Insomnia APT Repository

With the GPG key in place, create the repository configuration file using DEB822 format with scoped GPG key verification.

cat <<'EOF' | sudo tee /etc/apt/sources.list.d/kong-insomnia.sources
Types: deb
URIs: https://packages.konghq.com/public/insomnia/deb/ubuntu
Suites: focal
Components: main
Signed-By: /usr/share/keyrings/kong-insomnia-archive-keyring.gpg
EOF

The repository uses the focal suite for cross-version compatibility. This is a standard practice where vendors publish packages under a single suite that works across multiple Ubuntu releases. The packages install correctly on Ubuntu 24.04, 22.04, and other supported versions.

Update Package Cache

Once configured, refresh your package cache to include the new repository.

sudo apt update

Install Insomnia from Repository

With the repository configured, install Insomnia using the apt package manager.

sudo apt install insomnia

Verify Installation

After installation completes, check the installed version and repository source to confirm successful installation.

apt-cache policy insomnia
insomnia:
  Installed: 12.1.0
  Candidate: 12.1.0
  Version table:
 *** 12.1.0 500
        500 https://packages.konghq.com/public/insomnia/deb/ubuntu focal/main amd64 Packages

Method 2: Install Insomnia via Manual .deb Package

The manual .deb method downloads the latest release directly from the official GitHub repository. In contrast to the repository method, this approach gives you control over which version to install and avoids Snap dependencies.

Install Required Dependencies

First, install curl and ca-certificates to download the package securely.

sudo apt install curl ca-certificates

Download Latest Insomnia .deb Package

Once the dependencies are ready, fetch the latest release version and download the .deb package from GitHub.

INSOMNIA_VERSION=$(curl -s https://api.github.com/repos/Kong/insomnia/releases/latest | grep '"tag_name":' | sed -E 's/.*"core@([^"]+)".*/\1/')
wget -O insomnia.deb "https://github.com/Kong/insomnia/releases/download/core%40${INSOMNIA_VERSION}/Insomnia.Core-${INSOMNIA_VERSION}.deb"

The command automatically detects the latest version from the GitHub API. As of this writing, the latest version is 12.1.0. Check the GitHub releases page for current versions.

Install the Downloaded Package

Once the download completes, install the .deb package using apt to handle dependency resolution automatically.

sudo apt install ./insomnia.deb

Verify Installation

Finally, check the installed version to confirm successful installation.

insomnia --version
12.1.0

Method 3: Install Insomnia via Snap

As an alternative to traditional package management, the Snap package provides automatic background updates and sandboxed execution. Additionally, Ubuntu 24.04 and 22.04 include snapd by default.

Install Insomnia Snap Package

To install, run the following command to add Insomnia from the Snap Store using the snap command.

sudo snap install insomnia

Verify Snap Installation

After installation, check the installed Snap version and status.

snap info insomnia
name:      insomnia
version:   12.1.0
tracking:  latest/stable
installed: 12.1.0

Launch Insomnia on Ubuntu

Once installation is complete, launch Insomnia from the command line or applications menu.

Launch from Command Line

To start from the terminal, run the following command to launch Insomnia.

insomnia &

Launch from Applications Menu

For desktop users, alternatively open Insomnia from your desktop environment’s application launcher.

Activities > Show Applications > Insomnia

Manage Insomnia Installation

Following installation, update or remove Insomnia using the method you chose for installation.

Update Insomnia (APT Repository Method)

For APT repository installations, simply update Insomnia along with your regular system updates.

sudo apt update
sudo apt upgrade

However, to update only Insomnia without upgrading other packages, use this command instead.

sudo apt install --only-upgrade insomnia

Update Insomnia (Manual .deb Method)

In contrast, for manual .deb installations, download the latest version and reinstall the package.

INSOMNIA_VERSION=$(curl -s https://api.github.com/repos/Kong/insomnia/releases/latest | grep '"tag_name":' | sed -E 's/.*"core@([^"]+)".*/\1/')
wget -O insomnia.deb "https://github.com/Kong/insomnia/releases/download/core%40${INSOMNIA_VERSION}/Insomnia.Core-${INSOMNIA_VERSION}.deb"
sudo apt install ./insomnia.deb

Following the installation, verify the updated version.

insomnia --version

Update Insomnia (Snap Method)

For Snap installations, Snap handles updates automatically in the background. Nevertheless, to manually trigger an update, use this command.

sudo snap refresh insomnia

Remove Insomnia (APT Repository Method)

To uninstall, remove Insomnia installed via the official APT repository. Notably, this keeps the repository configured for future installations.

sudo apt remove insomnia
sudo apt autoremove

Moreover, to remove the repository configuration and GPG key as well, use these commands after removing the package.

sudo rm /etc/apt/sources.list.d/kong-insomnia.sources
sudo rm /usr/share/keyrings/kong-insomnia-archive-keyring.gpg
sudo apt update

Following this, verify the repository is removed.

apt-cache policy insomnia

Below is an example output showing successful removal (no repository listed).

insomnia:
  Installed: (none)
  Candidate: (none)
  Version table:

Furthermore, to completely remove all user data including cached files, run these commands after uninstalling.

rm -rf ~/.config/Insomnia
rm -rf ~/.cache/Insomnia

This permanently deletes your Insomnia configuration, preferences, request history, and cached data. Export any workspaces or collections you want to keep before removing these directories.

Remove Insomnia (Manual .deb Method)

For manual installations, remove Insomnia installed via the manual .deb package method.

sudo apt remove insomnia
sudo apt autoremove

Then, verify removal.

dpkg -l | grep insomnia

Upon successful removal, the command returns no output.

Additionally, to completely remove all user data including cached files, run these commands after uninstalling.

rm -rf ~/.config/Insomnia
rm -rf ~/.cache/Insomnia

This permanently deletes your Insomnia configuration, preferences, request history, and cached data. Export any workspaces or collections you want to keep before removing these directories.

Remove Insomnia (Snap Method)

For Snap installations, remove Insomnia installed via Snap.

sudo snap remove insomnia

Afterward, verify removal.

snap list | grep insomnia

Upon successful removal, the command returns no output.

Notably, Snap automatically removes application data when uninstalling packages.

Troubleshooting Common Insomnia Issues

Despite following the installation steps, you may encounter common installation and launch issues with solutions below.

Package Download Fails with 404 Error

Occasionally, if the download command fails, you may see this error.

HTTP request sent, awaiting response... 404 Not Found
ERROR 404: Not Found.

Generally, this occurs when version detection fails or the release structure changed.

Solution: To resolve this, visit the GitHub releases page manually, copy the .deb download link for the latest version, and download it directly.

wget -O insomnia.deb "https://github.com/Kong/insomnia/releases/download/core%4012.1.0/Insomnia.Core-12.1.0.deb"
sudo apt install ./insomnia.deb

Afterward, verify installation.

insomnia --version

Insomnia Fails to Launch on Wayland

In some cases, Electron-based applications like Insomnia may encounter rendering issues on Wayland display servers.

Solution: To work around this, force Insomnia to run under X11 compatibility mode.

insomnia --enable-features=UseOzonePlatform --ozone-platform=wayland

These Electron Ozone flags work for many applications but may not resolve all Wayland issues with Insomnia. If problems persist, run under Xorg or use the --disable-gpu flag as an alternative.

As an alternative, switch your session to X11 from the login screen.

Snap Installation Blocked by Policy

In some environments, Ubuntu configurations restrict Snap installations due to organizational policies.

Solution: In this case, use the manual .deb installation method instead, which does not depend on Snap services.

Conclusion

You now have Insomnia installed on Ubuntu with full API testing, debugging, and collection management capabilities. As covered, the APT repository method provides integrated system updates, the manual .deb method offers version control without repository configuration, and Snap provides hands-off background updates. Moving forward, consider importing OpenAPI specifications, configuring environment variables for multiple deployment targets, or exploring Node.js on Ubuntu for backend API development. Additionally, for secure API testing with SSH tunneling or containerized APIs, our SSH on Ubuntu and Docker on Ubuntu guides complement Insomnia for complete testing environments.

Leave a Comment