Skip to main content

Setup for Linux

This setup is only needed for development. Consumers of Tauri apps will not have to do any of this.

This page provides a complete guide to install Tauri along with its dependencies. Because Tauri is a polyglot toolchain and involves complex installation instructions, we want to make sure anybody will manage to set it up by reading this guide without having to open another documentation.

Additionally, it contains nice tips and tools that will help you if you're beginning with Node.js or Rust and security.

: This step is required
: This step is skippable if already satisfied (e.g. you already have Node.js/Rust installed)
: This step is purely informational

1. System Dependencies¬†‚Äč

$ sudo apt update && sudo apt install libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
libssl-dev \
libgtk-3-dev \
libappindicator3-dev \
patchelf \

Optional dependencies:‚Äč

  • libappindicator: needed to use the system tray feature.
  • patchelf and librsvg: needed to bundle AppImage.

2. Node.js Runtime and Package Manager¬†‚Äč

Node.js (npm included)‚Äč

We recommend using nvm to manage your Node.js runtime. It allows you to easily switch versions and update Node.js.

$ curl -o- | bash

Once nvm is installed, close and reopen your terminal, then install the latest version of Node.js and npm:

$ nvm install node --latest-npm
$ nvm use node

If you have any problems with nvm, please consult their project readme.

Optional Node.js Package Manager‚Äč

You may want to use an alternative to npm:

3. Rustc and Cargo Package Manager¬†‚Äč

The following command will install rustup, the official installer for Rust.

$ curl --proto '=https' --tlsv1.2 -sSf | sh

To make sure that Rust has been installed successfully, run the following command:

$ rustc --version
latest update on 2019-12-19, rust version 1.40.0

You may need to restart your terminal if the command does not work.

4. For Windows Subsystem for Linux (WSL) Users¬†‚Äč

In order to run a graphical application with WSL, you need to download one of these X servers: Xming, Cygwin X, and vcXsrv. Since vcXsrv has been used internally, it's the one we recommend to install.

WSL Version 1‚Äč

Open the X server and then run export DISPLAY=:0 in the terminal. You should now be able to run any graphical application via the terminal.

WSL Version 2‚Äč

You'll need to run a command that is slightly more complex than WSL 1: export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 and you need to add -ac to the X server as an argument. Note: if for some reason this command doesn't work you can use an alternative command such as: export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | sed 's/.* //g'):0 or you can manually find the Address using cat /etc/resolve.conf | grep nameserver.


Now that you have set up the Linux-specific dependencies for Tauri, learn how to add Tauri to your project.