Debian Package
Tauri allows your app to be packaged as a .deb
(Debian package) file. The Tauri CLI bundles your application binary and additional resources in this format if you build on Linux. Please note that .deb
packages can only be created on Linux as cross-compilation doesn't work yet.
note
GUI apps on macOS and Linux do not inherit the $PATH
from your shell dotfiles (.bashrc
, .bash_profile
, .zshrc
, etc). Check out Tauri's fix-path-env-rs crate to fix this issue.
To build and bundle your Tauri application into a single executable simply run the following command:
- npm
- yarn
- pnpm
- cargo
npm run tauri build
yarn tauri build
pnpm tauri build
cargo tauri build
It will build your frontend (if configured, see beforeBuildCommand
), compile the Rust binary, collect all external binaries and resources and finally produce neat platform-specific bundles and installers.
Custom Files​
To include custom files to the debian package, you can configure a mapping on tauri.conf.json > tauri > bundle > deb > files
as follows:
{
"tauri": {
"bundle": {
"deb": {
"files": {
"/usr/lib/README.md": "../README.md", // copies the README.md file to /usr/lib/README.md
"usr/lib/assets": "../public/" // copies the entire public directory to /usr/lib/assets
}
}
}
}
}
note
Each files
object key is the path on the Debian package, and the value is a path to a file or directory relative to the tauri.conf.json
file.