Draw.io (also known as diagrams.net) is a free, open-source diagramming application for creating flowcharts, network diagrams, UML diagrams, and database schemas. The desktop version runs entirely offline, bundles a full shape library, and optionally connects to Google Drive or OneDrive for cloud storage. Three methods are available to install Draw.io on Ubuntu 26.04, 24.04, and 22.04 LTS, each with different trade-offs for updates and system integration.
Install Draw.io on Ubuntu
Each method 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 (Stable) | Snapcraft | 28.2.x (may lag behind) | Automatic | Most Ubuntu users who prefer proven stability |
| Snap (Edge) | Snapcraft | Latest release | Automatic | Users who want the newest version with Snap sandboxing |
| Flatpak | Flathub | Latest stable | Automatic | Users who prefer sandboxed applications |
For most users, the Snap stable channel is recommended because Ubuntu includes Snap support by default and updates happen automatically. Snap also offers an edge channel that tracks the latest release for users who want newer versions sooner. Choose Flatpak if you already use Flatpak for other applications or prefer its sandboxing model. The .deb package gives you direct system integration but requires manual updates.
These steps cover Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS. All three installation methods work identically across supported LTS releases. 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. Draw.io Desktop bundles all required libraries within the package, and apt install handles any remaining system dependencies automatically. This method gives you direct integration with Ubuntu’s package manager without containerization overhead.
Update Ubuntu System Packages for Draw.io
Refresh your package lists and upgrade installed packages:
sudo apt update && sudo apt upgrade
If your Ubuntu user account is not in the
sudogroup, see how to add a user to sudoers on Ubuntu before continuing.
Install Draw.io Download Dependencies
Install wget and curl, which the download step uses to fetch the .deb package from GitHub. The -y flag automatically confirms the installation prompt:
sudo apt install wget curl -y
Download the Draw.io .deb Package
Download the latest Draw.io desktop package for Ubuntu from the official GitHub releases:
curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"browser_download_url": "\K[^"]*amd64[^"]*\.deb' | wget -i -
This command chains three tools together:
curl -sfetches the latest release data from the Draw.io desktop repository (see our curl command guide for more options).grep -oPuses Perl-compatible regex to extract the download URL for the amd64 .deb package (see our grep command guide for pattern matching options).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 .deb Package
Install the downloaded .deb package using apt, which automatically resolves any remaining dependencies:
sudo apt install ./drawio-amd64-*.deb
Verify the installation by checking the package version:
dpkg -s draw.io | grep -E 'Package:|Version:'
Package: draw.io Version: 29.5.2
Clean up the downloaded .deb file after installation:
rm drawio-amd64-*.deb
Method 2: Install Draw.io via Snap
Ubuntu includes Snap support by default, making this the simplest installation method. The Snap package is maintained by the official Draw.io team (verified publisher), runs in a sandboxed environment, and receives automatic updates. Snap offers two channels: stable for proven releases, and edge for the latest version.
Install Draw.io from Snap Store
Install the stable channel release of Draw.io:
sudo snap install drawio
To install the edge channel instead, which tracks the latest upstream release:
sudo snap install drawio --edge
The edge channel receives new versions before they reach stable. This means you get the latest features sooner, but edge releases may contain bugs not yet caught in testing. You can switch between channels at any time with
sudo snap refresh drawio --stableorsudo snap refresh drawio --edge.
Snap handles updates automatically in the background, checking for new versions four times daily and applying them when the application is not running.
Verify Draw.io 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 255 latest/stable jgraph** -
The jgraph** publisher name with the double star confirms this is the official verified package from the Draw.io developers.
Method 3: Install Draw.io via Flatpak
Flatpak provides sandboxed applications with automatic updates and controlled access to your system. 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 Flathub for Draw.io on Ubuntu
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 skips this step if Flathub is already configured, preventing duplicate remote errors.
Install Draw.io from Flathub
With Flathub enabled, install Draw.io using Flatpak:
sudo flatpak install flathub com.jgraph.drawio.desktop -y
Flatpak downloads the application and any required runtime dependencies during installation. The first Flatpak install on a system takes longer because it downloads shared runtimes that other Flatpak applications can reuse.
Verify Draw.io Flatpak Installation
After installation completes, verify Draw.io appears in your installed Flatpak applications:
flatpak list | grep -i drawio
JGraph com.jgraph.drawio.desktop 29.5.2 stable system
Flatpak applications update when you run sudo flatpak update, either manually or through your system’s update manager.
Launch Draw.io on Ubuntu
Launch Draw.io from the Terminal
For .deb and Snap installations, run:
drawio
For Flatpak installations, use the full application ID:
flatpak run com.jgraph.drawio.desktop
Launch Draw.io from the Applications Menu
Draw.io is also accessible from the desktop application menu. Navigate through:
Activities > Show Applications > Draw.io

Manage Draw.io on Ubuntu
Update Draw.io on Ubuntu
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:
sudo flatpak update com.jgraph.drawio.desktop
Update Draw.io .deb Package
The .deb installation does not update automatically. The following script checks the GitHub API for the latest release, compares it against your installed version, and downloads and installs the new package only when an update is available. It includes safety checks for required tools and empty API responses.
Create the update script:
sudo tee /usr/local/bin/update-drawio.sh > /dev/null << 'SCRIPT'
#!/bin/bash
set -e
# Check required tools
for cmd in curl grep wget dpkg; do
if ! command -v "$cmd" > /dev/null 2>&1; then
echo "Error: $cmd is required but not installed."
exit 1
fi
done
# Get current installed version (or "none" if not installed)
CURRENT_VERSION=$(dpkg-query -W -f='${Version}' draw.io 2>/dev/null || echo "none")
# Fetch latest version from GitHub API
LATEST_VERSION=$(curl -fsSL https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"tag_name":\s*"v?\K[^"]+')
if [ -z "$LATEST_VERSION" ]; then
echo "Error: Could not fetch latest version from GitHub."
exit 1
fi
echo "Installed version: $CURRENT_VERSION"
echo "Latest version: $LATEST_VERSION"
# Compare versions and exit if already current
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
echo "Draw.io is already up to date."
exit 0
fi
echo "Updating Draw.io from $CURRENT_VERSION to $LATEST_VERSION..."
# Download the latest .deb package to a temporary directory
WORK_DIR=$(mktemp -d)
cd "$WORK_DIR"
echo "Downloading Draw.io $LATEST_VERSION..."
DEB_URL=$(curl -fsSL https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep -oP '"browser_download_url": "\K[^"]*amd64[^"]*\.deb')
if [ -z "$DEB_URL" ]; then
echo "Error: Could not find .deb download URL."
rm -rf "$WORK_DIR"
exit 1
fi
wget -q --show-progress "$DEB_URL"
echo "Installing Draw.io $LATEST_VERSION..."
sudo apt install ./*.deb -y
# Clean up downloaded file
rm -rf "$WORK_DIR"
# Verify the update
NEW_VERSION=$(dpkg-query -W -f='${Version}' draw.io 2>/dev/null || echo "unknown")
echo "Draw.io updated to $NEW_VERSION"
SCRIPT
Make the script executable:
sudo chmod +x /usr/local/bin/update-drawio.sh
Since the script is installed to /usr/local/bin, run it from any terminal directory:
update-drawio.sh
Installed version: 29.5.2 Latest version: 29.5.2 Draw.io is already up to date.
When an update is available, the script downloads the new .deb package, installs it over the existing version, and verifies the result.
Avoid automating this script with cron. Network failures or unexpected upstream changes can break the installation silently. Run the script manually so you can monitor the output and address any issues immediately.
Remove Draw.io from Ubuntu
If you decide to remove Draw.io later, use the command matching your installation method:
.deb package:
sudo apt remove draw.io
Verify the package was removed:
apt-cache policy draw.io
draw.io: Installed: (none) Candidate: (none) Version table:
Snap:
sudo snap remove drawio
However, Snap retains application data in ~/snap/drawio/ after removal. To completely remove this data, delete the directory with rm -rf (remove recursively, force no confirmation prompts):
rm -rf ~/snap/drawio/
Flatpak:
sudo flatpak remove --delete-data com.jgraph.drawio.desktop -y
The --delete-data flag removes application data stored in the Flatpak sandbox. After removal, clean up unused runtimes with sudo flatpak uninstall --unused.
Remove Draw.io 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, delete both directories with rm -rf:
rm -rf ~/.config/draw.io ~/.cache/draw.io
Troubleshoot Common Draw.io Issues on Ubuntu
Fix Draw.io Launch Failures on Ubuntu
If Draw.io fails to start or closes immediately, launch it from the terminal to see error messages. The 2>&1 syntax redirects error output to standard output so head -20 captures the first 20 lines of both. 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
Fix Draw.io Flatpak File Dialog Issues
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.
Fix Draw.io Snap File Access Issues
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
Fix Draw.io HiDPI Scaling on Ubuntu
On high-resolution displays, Draw.io may appear too small or blurry. For the .deb installation, set the GDK_SCALE environment variable before launching to force a specific scaling factor (where 2 means 200% zoom):
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
Frequently Asked Questions
Yes. Draw.io was rebranded to diagrams.net in 2020, but the desktop application, GitHub repository, and Snap/Flatpak packages still use the Draw.io name. Both names refer to the same software from JGraph.
The Snap stable channel goes through additional testing before publishing, which delays new versions. The .deb package from GitHub and the Flatpak on Flathub both track the latest release immediately. If you want the newest version through Snap, install the edge channel with sudo snap install drawio --edge, which matches the latest GitHub release.
Yes. The Draw.io desktop application works entirely offline. Diagrams are saved locally by default, and all shape libraries are bundled with the application. Cloud storage integration (Google Drive, OneDrive) is optional and only used when you explicitly connect an account.
Yes. The Draw.io desktop binary supports command-line export with flags like --export, --format (pdf, png, svg, jpg), and --output. For example: drawio --export --format pdf --output diagram.pdf input.drawio. This works with the .deb installation. Snap and Flatpak versions require their respective wrapper commands.
Conclusion
Draw.io is installed on Ubuntu and ready to create flowcharts, network diagrams, UML diagrams, and database schemas offline or with cloud storage. Snap users can switch between stable and edge channels as needed, Flatpak users have sandboxed isolation with automatic updates, and .deb users have direct system integration with manual update control. For related graphics and productivity tools, see how to install Inkscape on Ubuntu for vector 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.