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
Draw.io can be installed on Ubuntu through three different methods. In particular, each approach offers different trade-offs between update frequency, system integration, and sandboxing.
| Method | Channel | Version | Updates | Best For |
|---|---|---|---|---|
| .deb Package | GitHub Releases | Latest stable | Manual | Users who want direct system integration |
| Snap | Snapcraft | Latest stable | Automatic | Most Ubuntu users who prefer automatic updates |
| Flatpak | Flathub | Latest stable | Automatic | Users who prefer sandboxed applications |
For most users, the Snap method is recommended because Ubuntu includes Snap support by default and updates happen automatically. 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.
These steps cover Ubuntu 22.04 LTS, 24.04 LTS, and 26.04 LTS. All three installation methods work identically across supported LTS releases, and draw.io bundles its own dependencies so version-specific issues are rare.
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, this refreshes your package lists and upgrades installed packages to their latest versions.
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 (see our curl command guide for more options). - Then,
grep -oP: Uses Perl-compatible regex to extract only the download URL for the amd64 .deb package. - Finally,
wget -i -: Reads the URL from standard input and downloads the file (see our wget command examples for more download options).
Install the Draw.io Package
Now, install the downloaded .deb package using apt:
sudo apt install ./drawio-amd64-*.deb
Because 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
2X.X.X
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
Once installed, 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 2X.X.X XXX latest/stable jgraphโ -
Importantly, 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
Notably, 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:
sudo flatpak install flathub com.jgraph.drawio.desktop -y
During this process, Flatpak downloads the application and any required runtime dependencies. Furthermore, 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 2X.X.X stable system
Subsequently, Flatpak applications update when you run flatpak update, either manually or through your systemโs update manager.
Launch Draw.io
Launch Draw.io from Terminal
Now that Draw.io is installed, you can launch it from the terminal. For .deb and Snap installations, run:
drawio
In contrast, for Flatpak installations, use the full application ID:
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, so you typically do not need to do anything. However, if you want to manually trigger an update, use these commands:
Snap:
sudo snap refresh drawio
Flatpak:
flatpak update com.jgraph.drawio.desktop
Update .deb Installation
For .deb installations, you need to download and install the latest package manually. The following command fetches the newest release from GitHub and installs it over your existing installation:
cd /tmp && rm -f drawio-amd64-*.deb && curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"browser_download_url": "\K[^"]*amd64[^"]*\.deb' | wget -i - && sudo apt install ./drawio-amd64-*.deb
This command removes any previously downloaded .deb files from /tmp, downloads the latest version, and installs it. Since the package replaces the existing installation, your diagrams and settings remain unchanged.
Remove Draw.io
If you decide to remove Draw.io later, use the command matching your installation method:
.deb package:
sudo apt remove draw.io
Snap:
sudo snap remove drawio
However, Snap retains application data in ~/snap/drawio/ after removal. To completely remove this data as well, run:
rm -rf ~/snap/drawio/
Flatpak:
sudo flatpak remove --delete-data com.jgraph.drawio.desktop -y
In this case, the --delete-data flag removes application data stored in the Flatpak sandbox. After removal, you can optionally clean up unused runtimes with flatpak uninstall --unused.
Remove User Configuration Data
The following commands permanently delete your Draw.io settings, recent files list, and cached data. Export any important diagrams before proceeding, as this action cannot be undone.
For .deb installations, residual configuration and cache directories remain after uninstallation. To remove them completely:
rm -rf ~/.config/draw.io ~/.cache/draw.io
Troubleshoot Common Draw.io Issues
Draw.io Fails to Launch
If Draw.io fails to start or closes immediately, launch it from the terminal to see error messages. For .deb and Snap installations:
drawio 2>&1 | head -20
For Flatpak, use:
flatpak run com.jgraph.drawio.desktop 2>&1 | head -20
Common causes include missing display server connections (especially on Wayland) or GPU driver issues. If you see GPU-related errors, try launching with GPU acceleration disabled:
drawio --disable-gpu
File Dialog Issues with Flatpak
Flatpak applications use portals to access files outside their sandbox. If file open/save dialogs do not work correctly, ensure the portal packages are installed:
sudo apt install xdg-desktop-portal xdg-desktop-portal-gtk
Afterward, log out and log back in for the portal services to start properly.
Snap Cannot Access External Files
By default, Snap applications have limited file system access. If Draw.io cannot open files from certain directories, you may need to grant additional permissions. Check current connections with:
snap connections drawio
For example, to allow access to removable media (USB drives), run:
sudo snap connect drawio:removable-media
HiDPI Scaling Issues
On high-resolution displays, Draw.io may appear too small or blurry. For the .deb installation, you can force a specific scaling factor by setting an environment variable before launching:
GDK_SCALE=2 drawio
Alternatively, for Electron-based applications like Draw.io, you can also try the --force-device-scale-factor flag:
drawio --force-device-scale-factor=1.5
Conclusion
At this point, you have Draw.io installed on Ubuntu, ready to create flowcharts, network diagrams, UML diagrams, and organizational charts. In summary, the Snap method provides the simplest experience with automatic updates, while Flatpak offers enhanced sandboxing, and the .deb package gives direct system integration for users who prefer traditional package management. For related graphics and productivity tools, see how to install Inkscape on Ubuntu for vector graphics editing, install GIMP on Ubuntu for image manipulation, or install LibreOffice on Ubuntu for a complete office suite.
with version attached to package, grep for \.deb has to be changed, e.g.:
> grep ‘amd64-[0-9\.]*\.deb’
Thanks for catching that, Sven. You were right. The filename format changed from
drawio-amd64.debtodrawio-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:
This should handle future filename format changes as well. Appreciate the heads up.
Yes the “Download Draw.io Latest .deb package” fails for me with: “No URLs found in -.”
This seems to work:
curl -LO $(curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | awk ‘/browser_download_url/ && /amd/ && /deb/’ | cut -d ‘”‘ -f 4)
It eliminates wget but requires awk. I’m using Ubuntu 25.04.
-tom
Thanks for the alternative approach, Tom. You and Sven hit the same issue. The filename format changed from
drawio-amd64.debtodrawio-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:
Your
curl -LOwith awk works too. Both approaches should handle future filename changes. Appreciate you sharing the workaround.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.
Thanks for flagging this, Arthur. You were the first to catch it. The filename format changed from
drawio-amd64.debtodrawio-amd64-29.0.3.deb, breaking the original pattern.The article now uses a Perl-compatible regex that handles version numbers:
Your suggested fix would have worked too. Appreciate you taking the time to report this and propose a solution.