AppFlowy Docs
Search…
🐧
Building on Linux
Notes:
  • The following steps are verified on
    • lubuntu 20.04 - X86_64
    • ubuntu 20.04 - aarch64
    • redhat - X86_64
    • Arch Linux - X86_64
    • Deepin - X86_64
    • Raspberry Pi OS - aarch64
  • You may need to disable hardware 3D acceleration if you are running AppFlowy in a VM. Otherwise, certain GL failures will prevent the app from launching.
  • If you encounter any issues, have a look at Troubleshooting first. If your issue is not included in the page, please create an issue or ask on Discord.

Step 1: Install your build environment

There's no point continuing if this doesn't work for you, so lets start here before you even download the code. Feel free to ask questions on our Discord so that we may refine this document and make the process as easy as possible for you.
  • Install system prerequisites
Ubuntu
Arch
1
sudo apt-get install curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev unzip
Copied!
1
yay -S curl base-devel sqlite openssl clang cmake ninja pkg-config gtk3 unzip
Copied!
  • Install rust on Linux
1
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2
source $HOME/.cargo/env
3
rustup toolchain install stable
4
rustup default stable
Copied!
1
git clone https://github.com/flutter/flutter.git
2
cd flutter
3
echo "export PATH=\$PATH:"`pwd`"/bin" >> ~/.profile
4
export PATH="$PATH:`pwd`/bin"
Copied!
  • Make sure to enable the flutter stable channel
1
flutter channel stable
Copied!
  • Enable linux desktop
1
flutter config --enable-linux-desktop
Copied!
  • Fix any problems reported by flutter doctor
1
flutter doctor
Copied!

Step 2: Get the source code

Clone the source code from our Github project.
You should fork the code instead if you wish to submit patches. You'll find information on that in Submitting your first Pull Request​
1
git clone https://github.com/AppFlowy-IO/appflowy.git
Copied!

Step 3: Build AppFlowy (Flutter GUI application)

  • Change to the frontend directory
1
cd AppFlowy/frontend
Copied!
  • Install cargo make
1
cargo install --force cargo-make
Copied!
  • Install duckscript
1
cargo install --force duckscript_cli
Copied!
  • Check prerequisites
1
cargo make flowy_dev
Copied!
  • [Optional] Build flowy-sdk-dev (dart-ffi)
Development
Production
1
cargo make --profile development-linux-x86 flowy-sdk-dev
Copied!
1
cargo make --profile production-linux-x86 flowy-sdk-release
Copied!
  • Build AppFlowy
Development
Production
1
cargo make -p development-linux-x86 appflowy-linux-dev
Copied!
You'll find the binary in app_flowy/product/linux/AppFlowy/
1
cargo make -p production-linux-x86 appflowy-linux
Copied!

Step 4: Run the application

1
cd app_flowy/product/0.0.2/linux/Debug/AppFlowy
Copied!
1
./app_flowy
Copied!
  • If using a virtual machine
    • Run Linux GUI application through x11 on windows (use MobaXterm) for instance:
export DISPLAY=localhost:10

Step 5: Edit and run the application

[VS Code]
  1. 1.
    Open the frontend folder located at xx/AppFlowy/frontend with VS Code.
  2. 2.
    Go to the Run and Debug tab and then click AF: Clean + Rebuild All for the first time running.
img.png
If you encounter any issues, have a look at Troubleshooting first. If your issue is not included in the page, please create an issue or ask on Discord.

Building in release mode

  1. 1.
    Go to the AppFlowy/frontend/ directory.
  2. 2.
    Run the following command to create the binary.
1
cargo make --profile production-linux-x86 appflowy
Copied!
The scripts are located in the AppFlowy/frontend/Makefile.toml file.
The resulting binary file is located in AppFlowy/frontend/app_flowy/product/x.x.x/linux/Release/AppFlowy/.