🐧Building on Linux

Notes:

  • The following steps are verified on

  • 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.

  • This guide assumes that you are using the bash shell on Linux. You can however, replicate these steps on zsh or other alternative Linux terminal shells, with minor alterations.

Step 1: Get the source code

Clone the source code from our Github project.

git clone https://github.com/AppFlowy-IO/AppFlowy.git

You should fork the code instead if you wish to submit code to AppFlowy. You will find information on that in Setting Up Your Repositories.

Image: Cloning the source from the Github repository.

Step 2: Install your build environment

Install system prerequisites:

sudo apt-get install curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev unzip libkeybinder-3.0-dev libnotify-dev
Image: Installing prerequisites on Ubuntu.

Install flutter (three different methods):

git clone https://github.com/flutter/flutter.git --branch 3.27.4
cd flutter
echo -e "\nexport PATH=\$PATH:"`pwd`"/bin" >> ~/.bashrc
source ~/.bashrc
flutter
cd ..
Image: Installing flutter manually.
  • Method 3: You can also use a runtime version manager like asdf or a flutter-specific version manager to install flutter on your system. Assuming you are using the bash shell, follow these steps:

  1. Clone asdf.

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.1
  1. Add the path to asdf and enable asdf auto-completion in your shell.

echo -e '\n# asdf configuration \n. "$HOME/.asdf/asdf.sh"\n. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
source ~/.bashrc
  1. Install flutter via asdf and set it as your local runtime at the AppFlowy source directory (xx/AppFlowy/).

cd AppFlowy
asdf plugin-add flutter
asdf install flutter 3.27.4-stable
rm -rf .tool-versions
asdf local flutter 3.27.4-stable
cd ..
Image: Installing flutter using asdf

Setting up your development environment:

Run the setup script from the base directory. (Note: You can skip this step if you installed rust using asdf and set it as the local runtime inside thexx/AppFlowy/ source.)

cd AppFlowy
./frontend/scripts/install_dev_env/install_linux.sh
source ~/.bashrc
Image: Running script install_linux.sh inside xx/AppFlowy/frontend/scripts/install_dev_env/.
Image: "Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path."

Step 3: Build AppFlowy (Flutter GUI application)

Change your path to the frontend directory.

cd frontend

Building the AppFlowy binary:

cargo make --profile production-linux-x86_64 appflowy

You will find the binary in frontend/appflowy_flutter/product/[version in x.x.x]/linux/[Binary type (Release/ Debug)]/AppFlowy/.

Image: Building AppFlowy

Step 4: Run the application

For running the release binary:

cd appflowy_flutter/product/[version number in x.x.x]/linux/Release/AppFlowy
./app_flowy

For running the debug binary:

cd appflowy_flutter/product/[version number in x.x.x]/linux/Debug/AppFlowy
./app_flowy

If you do not know the version number for the AppFlowy binary that you have built, please use your terminal shells' tab completion, or type and enter thels(list) command to reveal the name of folder which is the version number you are building.

The current version of AppFlowy is 0.1.0.

A new window as shown below will show up after you run the application:

Image: AppFlowy window

If using a virtual machine, run the Linux GUI application through x11 on windows (use MobaXterm) for instance:

export DISPLAY=localhost:10

Miscellaneous: Running the application without building (using VS Code)

  1. Open the frontend folder located at xx/AppFlowy/ with VS Code.

  2. Go to the Run and Debug tab and then click AF-desktop: Clean + Rebuild All for the first time running.

Image: Running the application using VS Code

Last updated

Was this helpful?