How to Install Draw.io Desktop on Ubuntu Linux

Draw.io (also known as diagrams.net) helps you create flowcharts, network diagrams, UML diagrams, and organizational charts directly on your desktop. Whether you need to document software architecture, map business processes, or design database schemas, Draw.io provides an extensive shape library and also integrates with Google Drive, OneDrive, and local storage. By the end of this guide, you will have Draw.io installed and running on Ubuntu, ready to create professional diagrams.

Choose Your Draw.io Installation Method

In this guide, Draw.io can be installed through three different methods on Ubuntu. Each approach offers different trade-offs between update frequency, system integration, and sandboxing.

MethodChannelUpdatesBest For
.deb PackageGitHub ReleasesManualUsers who want direct installation without containerization
SnapSnapcraftAutomaticMost Ubuntu users who prefer automatic updates
FlatpakFlathubAutomaticUsers who prefer sandboxed applications with Flatpak

For most users, the Snap method provides the easiest experience with automatic updates. Alternatively, choose Flatpak if you already use Flatpak for other applications or prefer its sandboxing model. On the other hand, the .deb package gives you direct system integration but requires manual updates.

Method 1: Install Draw.io via .deb Package

The official .deb package from GitHub provides a self-contained Electron-based application. Since Draw.io Desktop bundles all required libraries within the package, the apt install command handles any remaining system dependencies automatically. This method gives you direct integration with Ubuntu’s package manager while avoiding containerization overhead.

Update Ubuntu System Packages

First, ensure your system packages are up to date before installing new software:

sudo apt update && sudo apt upgrade

As a result, these commands will refresh your package lists and upgrade the packages to their latest versions, ensuring a clean environment for the installation.

Install Required Dependencies

Next, install wget and curl to download files from the internet:

sudo apt install wget curl -y

Download the Draw.io Package

With the dependencies in place, download the latest Draw.io desktop package for Ubuntu:

curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"browser_download_url": "\K[^"]*amd64[^"]*\.deb' | wget -i -

To understand what happens, here is a breakdown of how this command functions:

  • First, curl -s: Silently fetches the latest release data from the Draw.io desktop repository.
  • Then, grep -oP: Uses Perl-compatible regex to extract only the download URL for the amd64 .deb package.
  • Finally, wget -i -: Downloads the .deb package using the extracted URL.

Install the Draw.io Package

Finally, install the downloaded .deb package using apt:

sudo apt install ./drawio-amd64-*.deb

Since the apt install command automatically resolves dependencies, installing local .deb files is straightforward.

After the installation completes, verify it by checking the version:

drawio --version
29.0.3

Additionally, you can clean up the downloaded .deb file after installation:

rm drawio-amd64-*.deb

Method 2: Install Draw.io via Snap

Because Ubuntu includes Snap support by default, this is the simplest installation method. The Snap package is maintained by the official Draw.io team (indicated by the verified checkmark), runs in a sandboxed environment, and receives automatic updates.

Install Draw.io from Snap Store

Install Draw.io directly from the Snap Store with a single command:

sudo snap install drawio

After installation, Snap handles updates automatically in the background. By default, Snap checks for updates four times daily and applies them when the application is not running.

Verify Snap Installation

To confirm the installation succeeded, list the installed Snap package:

snap list drawio
Name    Version  Rev  Tracking       Publisher  Notes
drawio  28.2.5   311  latest/stable  jgraph✓    -

The jgraph✓ publisher name confirms this is the official package from the Draw.io developers.

Method 3: Install Draw.io via Flatpak

Flatpak provides sandboxed applications with automatic updates. The Flatpak version runs in an isolated environment with controlled access to your system, which some users prefer for security. Since Ubuntu does not include Flatpak by default, you need to install it first. See How to Install Flatpak on Ubuntu if you have not set it up yet.

Enable the Flathub Repository

Once Flatpak is installed, add Flathub as a remote repository if you have not already:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

The --if-not-exists flag prevents errors if Flathub is already configured.

Install Draw.io from Flathub

With Flathub enabled, install Draw.io using Flatpak:

flatpak install flathub com.jgraph.drawio.desktop -y

Flatpak downloads the application and any required runtime dependencies. The first Flatpak installation may take longer as it downloads shared runtimes that other Flatpak applications can reuse.

Verify Flatpak Installation

After installation completes, verify Draw.io appears in your installed Flatpak applications:

flatpak list | grep -i drawio
Draw.io    com.jgraph.drawio.desktop    29.0.3    stable    flathub

The Flatpak version typically stays current with releases since it updates automatically when you run flatpak update.

Launch Draw.io

Launch Draw.io from Terminal

Now that Draw.io is installed, you can launch it from the terminal. Depending on your installation method, the command differs:

.deb package:

drawio

Snap:

snap run drawio

Flatpak:

flatpak run com.jgraph.drawio.desktop

Launch Draw.io from Applications Menu

Alternatively, for desktop users who prefer a graphical approach, Draw.io is accessible via the application icon. Simply navigate through:

Activities > Show Applications > Draw.io

Manage Draw.io

Update Draw.io

Snap and Flatpak installations update automatically in the background. For .deb installations, however, you need to repeat the download and install process from Method 1 to get the latest version.

If you want to manually trigger an update, use these commands:

Snap:

sudo snap refresh drawio

Similarly, for Flatpak:

flatpak update com.jgraph.drawio.desktop

Remove Draw.io

If you decide to remove Draw.io later, use the command matching your installation method:

.deb package:

sudo apt remove drawio

Snap:

sudo snap remove drawio

Flatpak:

flatpak remove --delete-data com.jgraph.drawio.desktop -y

Remove User Configuration Data

Be aware that the following commands permanently delete your Draw.io settings, recent files list, and cached data. Therefore, export any important diagrams before proceeding.

Additionally, to remove residual configuration and cache directories, run:

rm -rf ~/.config/draw.io ~/.cache/draw.io

Conclusion

At this point, you have Draw.io installed on Ubuntu, ready to create flowcharts, network diagrams, and UML diagrams. In summary, Snap provides the simplest experience with automatic updates, while Flatpak offers sandboxing, and the .deb package gives direct system integration. To explore other graphics and productivity tools, see how to install Inkscape or LibreOffice on Ubuntu.

6 thoughts on “How to Install Draw.io Desktop on Ubuntu Linux”

    • Thanks for catching that, Sven. You were right. The filename format changed from drawio-amd64.deb to drawio-amd64-29.0.3.deb, which broke the original grep pattern.

      The command has been updated to use a more robust regex that handles version numbers:

      curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"browser_download_url": "\K[^"]*amd64[^"]*\.deb' | wget -i -

      This should handle future filename format changes as well. Appreciate the heads up.

      Reply
    • Thanks for the alternative approach, Tom. You and Sven hit the same issue. The filename format changed from drawio-amd64.deb to drawio-amd64-29.0.3.deb, which broke the original grep pattern expecting them adjacent.

      The article now uses a Perl-compatible regex that handles version numbers in the filename:

      curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"browser_download_url": "\K[^"]*amd64[^"]*\.deb' | wget -i -

      Your curl -LO with awk works too. Both approaches should handle future filename changes. Appreciate you sharing the workaround.

      Reply
  1. The download step for the deb file no longer works, since grep ‘amd64\.deb’ doesn’t match any drawio-amd64-$version.deb
    Changing it to grep — ‘-amd64-.*deb’ would be a possible fix.

    Reply
    • Thanks for flagging this, Arthur. You were the first to catch it. The filename format changed from drawio-amd64.deb to drawio-amd64-29.0.3.deb, breaking the original pattern.

      The article now uses a Perl-compatible regex that handles version numbers:

      curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"browser_download_url": "\K[^"]*amd64[^"]*\.deb' | wget -i -

      Your suggested fix would have worked too. Appreciate you taking the time to report this and propose a solution.

      Reply

Leave a Comment