How to Install Draw.io on Ubuntu 24.04, 22.04, or 20.04

Draw.io stands out as a premier diagramming tool, designed with simplicity and efficiency. Its core strength lies in its versatility, supporting various diagram types, including flowcharts, process diagrams, UML models, and more. The platform is engineered for ease of use, allowing novices and professionals to visualize complex information effortlessly.

Below are some of the key features that make Draw.io a popular choice:

  • Extensive Library: Access a vast collection of shapes and templates for various diagramming needs.
  • Real-Time Collaboration: Enables teams to work together on diagrams in real-time, enhancing productivity.
  • Highly Customizable: Offers extensive customization options for diagrams, including colors, styles, and text.
  • Integration Capabilities: It easily integrates with various third-party platforms, such as Google Drive, Dropbox, and GitHub, for efficient workflow management.
  • Offline Mode: Allows diagram creation without an internet connection, ensuring uninterrupted productivity.
  • Export and Import Functions: Supports multiple file formats for exporting and importing, facilitating easy sharing and collaboration.
  • User-Friendly Interface: Designed intuitively to simplify navigation and diagram creation.

With its comprehensive features, Draw.io empowers users to convey ideas and information visually, making it an indispensable tool for professionals across industries. Now, let’s dive into the technical how-to of setting up Draw.io on your Ubuntu system.

Prerequisites for Installing draw.io

To successfully install draw.io on Ubuntu, ensure you meet the following requirements:

System Requirements and Supported Ubuntu Versions

ComponentMinimum Requirement
Processor2 GHz or faster dual-core processor
RAM4 GB or more
Disk Space25 GB of free space
NetworkHigh-speed internet connection
Supported VersionsUbuntu 24.04 (Noble), Ubuntu 22.04 (Jammy), Ubuntu 20.04 (Focal)

Additional Requirements

RequirementDescription
Internet ConnectionEnsure Java Runtime Environment (JRE) is installed to run draw.io.
Terminal ConventionsAll terminal commands should be executed as a regular user with sudo privileges.
CLI CommandsUtilize the Command Line Interface (CLI) for installation and setup.
Java Runtime EnvironmentEnsure Java Runtime Environment (JRE) is installed for running draw.io.

Method 1: Install Draw.io via .deb package

Update Ubuntu Before Draw.io Installation

First, ensure that your system’s existing packages are up to date. This step is crucial to prevent any conflicts that might arise during the installation of Draw.io. Run the following commands in your terminal to update your system:

sudo apt update && sudo apt upgrade

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

Install Initial Required Packages for Draw.io Installation

Next, install the necessary packages wget and curl. These utilities will aid in downloading files from the internet. Execute the following command:

sudo apt install curl -y

The -y flag automatically confirms the installation, providing a smoother process.

Download Draw.io Latest .deb package

Now, proceed to download the latest Draw.io desktop package for Ubuntu. Utilize the command below:

curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep 'amd64\.deb' | cut -d '"' -f 4 | wget -i -

Here’s a breakdown of how this command functions:

  • curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest: Silently fetches the latest release data from the Draw.io desktop repository.
  • grep browser_download_url: Filters the output to include only lines with download URLs.
  • grep 'amd64\.deb': Narrows down the results to Debian package files specifically for the amd64 architecture.
  • cut -d '"' -f 4: Extracts the download URL from the JSON response.
  • wget -i -: Downloads the .deb package using the extracted URL.

Finalize Draw.io Desktop Installation via APT Command

With the .deb package now downloaded, install Draw.io on your Ubuntu system. Run the command below:

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

The -f or --fix-broken option in this command instructs apt to resolve any broken dependencies, ensuring that all required packages are installed or repaired. This results in a stable installation and a system free of broken packages, crucial when manually installing software via .deb files.

This is particularly useful when installing software manually using .deb files, as dependencies might not be satisfied yet, and this option helps in resolving such issues.

Method 2: Install Draw.io on Ubuntu via Snapcraft (Snapd)

Install Snap Core

Begin the process by ensuring the snap core is present and up to date on your desktop. Unless you have previously removed snapd, it should be available on your system. This step is crucial for preventing any potential conflicts during the installation of Draw.io.

Execute the following command to install or update the snap core:

sudo snap install core

This command ensures that the snapd package management system is initialized correctly and ready for software installations.

Install Draw.io via Snap Command

With the snap core in place, proceed to install Draw.io. Snap packages are well-maintained and offer a straightforward installation process. Although some users might prefer Flatpak for its extensive application support, Snapcraft ensures timely updates for Draw.io, making it an equally viable option.

Run the following command to install Draw.io:

sudo snap install drawio

This command fetches the latest version of Draw.io from the Snapcraft repository and installs it on your Ubuntu system.

Method 3: Install Draw.io via Flatpak and Flathub

Before installing Draw.io via Flatpak, ensure you have Flatpak installed on your Ubuntu system. If not, refer to this comprehensive guide: How to Install Flatpak on Ubuntu. Installing Flatpak is crucial as it is not included by default in Ubuntu distributions, considering Canonical, Ubuntu’s parent company, promotes Snap, its package manager.

Enable Flathub for Draw.io Installation

To initiate the installation process of Draw.io, you must first enable Flathub, the official repository for Flatpak applications.

Run the following command in your terminal to achieve this:

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

This command ensures that your system can access and fetch applications from Flathub, setting the stage for a successful Draw.io installation.

Install Draw.io via Flatpak Command

Once you have configured Flathub, proceed to install Draw.io using Flatpak. Run the following command:

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

This command instructs Flatpak to install Draw.io directly from Flathub, ensuring you receive the most current version maintained by the package maintainers. Unlike Ubuntu’s software repositories, which prioritize stability and might offer older versions of applications, Flathub provides timely updates, enhancing performance and security.

Launching Draw.io on Ubuntu via CLI Commands or GUI

CLI Commands to Launch Draw.io

.deb Installation

If you have installed Draw.io via the .deb package, enter the following command in your terminal:

drawio

Snapcraft Installation

For those who have utilized Snapcraft for installation, the application can be launched with:

sudo snap run drawio

Flatpak Installation

Users who have opted for Flatpak installation need to execute:

flatpak run com.jgraph.drawio.desktop

GUI Method to Launch Draw.io

For desktop users who prefer a graphical approach, Draw.io is accessible via the application icon. Navigate through:

Activities > Show Applications > Draw.io

Additional Commands for Draw.io

Update Draw.io

To ensure optimal performance and access to the latest features, regularly update your Draw.io installation. Although update notifications typically appear automatically, they may occasionally fail to show up. In such cases, proactively check for updates using terminal commands tailored to your specific installation method.

Draw.io Installations via .deb:

For installations done using the .deb package, you must download and reinstall the latest version to update Draw.io. This process ensures you have the most current features and security enhancements.

Snap Draw.io Update Method

Snap installations offer a straightforward update process. Execute the following command:

sudo snap refresh

This command checks for available updates and applies them, keeping your Draw.io version current.

Flatpak Draw.io Update Method

Flatpak users can update Draw.io by running the following:

flatpak update

This command ensures you receive the latest updates and improvements for Draw.io.

Remove (Uninstall) Draw.io

If you remove Draw.io from your system, use the command corresponding to your installation method.

.deb Remove Method

Execute the following command to uninstall Draw.io:

sudo apt remove drawio

This command removes the application from your system, freeing up space.

Snap Remove Method

To uninstall Draw.io installed via Snap, run:

sudo snap remove drawio

This command efficiently removes the application and its associated data.

Flatpak Remove Method

For Flatpak installations, use:

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

Running this command ensures the complete removal of Draw.io and its data from your system.

Conclusion

In this guide, we walked you through the steps to install Draw.io on Ubuntu 24.04, 22.04, or 20.04 LTS using the command-line terminal, offering options like .deb, Snap, and Flatpak with Flathub. It’s a straightforward process designed to get you up and running with one of the most versatile diagramming tools. Our final piece of advice? Dive in and start using Draw.io to its full potential, whether mapping out ideas, creating detailed diagrams, or collaborating with your team.

Useful Links

Here are some valuable links related to using draw.io:

  • draw.io Official Website: Visit the official draw.io website for information about the diagramming tool, its features, and usage options.
  • draw.io Documentation: Access comprehensive documentation for detailed guides on using draw.io.
  • draw.io GitHub Repository: Visit the jgraph GitHub repository to view the source code, report issues, and contribute to the development of draw.io.
  • Example Diagrams: Explore example diagrams to see what you can create with draw.io.
  • draw.io FAQ: Find answers to frequently asked questions about using draw.io.
  • draw.io Features: Learn about the various features of draw.io and how they can benefit your diagramming needs.
Joshua James
Follow me
Latest posts by Joshua James (see all)