-
Clone Bisq 2
git clone https://github.com/bisq-network/bisq2.git
cd bisq2 -
Install Dependencies: Bisq requires JDK 21. On Linux, you will also need a working tor executable, which is distributed with the tor daemon and the tor browser packages.
Please see the official Tor installation instructions. The TLDR for Debian-based distros:
sudo apt update sudo apt install apt-transport-https curl # Add the Tor Project GPG key curl https://deb.torproject.org/torproject.org/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/tor-archive-keyring.gpg # Add Tor repository echo "deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] \ https://deb.torproject.org/torproject.org $(lsb_release -cs) main" \ | sudo tee /etc/apt/sources.list.d/tor.list # Install Tor sudo apt update sudo apt install tor
-
Update to latest GitHub version:
git pull
-
Build Bisq
On macOS and Linux, execute:
./gradlew clean build
On Windows:
gradlew.bat clean build
If you prefer to skip tests to speed up the building process, just append
-x testto the previous commands. -
Generate Seed Node & Desktop App Binaries
Seed Node:
./gradlew :apps:seed-node-app:clean :apps:seed-node-app:installDist
Desktop:
./gradlew :apps:desktop:desktop-app:clean :apps:desktop:desktop-app:installDist
For Windows environments: replace ./gradlew with gradle.bat as the previous example shows
-
Generate Installers
./gradlew :apps:desktop:desktop-app-launcher:clean :apps:desktop:desktop-app-launcher:generateInstallers
-
Other useful dev gradle commands
For a quick full cleanup/rebuild you can use
./gradlew cleanAll buildAll-
You do not need to install Gradle to build Bisq. The
gradlewshell script will install it for you, if necessary. -
Bisq requires JDK 21. You can find out which version you have with:
javac -version
-
Bisq requires JavaFX to be installed.
-
Adjustment for IntelliJ IDE (if used) Bisq developers use by default the IntelliJ development IDE (Community edition is free to use). If running from the IDE one need to enable
annotation processing(search for that in the settings). TheProtocol Buffersplugin need to be installed as well.
To run the Bisq 2 desktop app with Gradle and the default settings (using the Tor network) use:
apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-appIn that configuration the desktop app connects to the public seed nodes via the Tor network.
The default data directory is: Bisq2
For development, you might want to customize the options and use localhost instead of Tor. In that case you need to run your own seed node as well. Bisq 2 use JVM arguments and has only limited support for program arguments (see below).
We use the typesafe config framework which expects JVM arguments.
One can pass JVM options in the IntelliJ IDE Run Configuration or add it
as JAVA_OPTS to gradle sh installer scripts:
JAVA_OPTS="-Dapplication.appName=bisq2_seed1 \
-Dapplication.network.configByTransportType.clear.defaultNodePort=8000 \
-Dapplication.network.supportedTransportTypes.0=CLEAR" \
apps/seed-node-app/build/install/seed-node-app/bin/seed-node-appAdding JVM options to the binary can be done as follows:
[PATH TO BINARY] -Dapplication.appName=bisq2_Alice_clear \
-Dapplication.network.supportedTransportTypes.0=CLEAR
Note, that the Bisq 2 binary has a space in the file name, so you need to use a backslash before the
space (Bisq\ 2).
Additionally, to the JVM options we support 2 program arguments:
--app-name and --data-dir. Option name and value is seperated with =.
--app-name has the same function as appName in the config.
Program arguments can be added directly to the gradle sh installer scripts:
apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-app --data-dir=<data_dir>
A custom config file with the file name bisq.conf can be added to the data directory.
If a custom data directory is used it should be provided by a program argument or as JVM argument,
otherwise the config file would be expected in the default Bisq2 data directory.
The custom config file overrides the default config files for the entries which are defined in the custom file. The default config file can be found at: https://github.com/bisq-network/bisq2/blob/main/apps/desktop/desktop-app/src/main/resources/desktop.conf
As this file gets frequently updated with new releases, one should only use the entries which one wants to override. The structure from the default config must be maintained.
Overriding the marketPrice provider with a self-hosted one would be done as follows:
application {
bondedRoles = {
marketPrice = {
enabled = true
providers = [
{
url = "http://[MY_ONION_ADDRESS].onion"
operator = "my own node",
}
]
}
}
}
Only change entries which are clear to you as inappropriate values could lead to issues.
First create the gradle installer script for the seed-node-app:
./gradlew :apps:seed-node-app:installDist
Pass the JVM arguments to the installer script:
JAVA_OPTS="-Dapplication.appName=bisq2_seed1 \
-Dapplication.network.configByTransportType.clear.defaultNodePort=8000 \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001" \
apps/seed-node-app/build/install/seed-node-app/bin/seed-node-appOptionally you can run a second seed node at port 8001:
JAVA_OPTS="-Dapplication.appName=bisq2_seed2 \
-Dapplication.network.configByTransportType.clear.defaultNodePort=8001 \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001" \
apps/seed-node-app/build/install/seed-node-app/bin/seed-node-appFirst create the gradle installer script for the desktop-app:
./gradlew :apps:desktop:desktop-app:installDist
Pass the JVM arguments to the installer script:
JAVA_OPTS="-Dapplication.appName=bisq2_Alice_clear \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001" \
apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-appOptionally you can pass that data directory as program argument as follows:
apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-app --data-dir=bisq2_Alice_tor
Note, that in that case it runs with the default config (using Tor).
You likely want to run a second desktop application for testing the trade use case with 2 traders (e.g. Alice and Bob).
Just change the -Dapplication.appName to something like bisq2_Bob_clear in the above configuration.
A seller requires reputation for trading. This can be achieved in dev environment with setting up an oracle node and Bisq 1, though this setup is a bit advanced.
To make it easier for devs, we added a devModeReputationScore field to the config. It also requires that the devMode flag is set to true.
Set the desired reputation score to devModeReputationScore and apply that to all your trade apps. This value will not
be applied per user profile but overrides the reputation score lookup globally.
For proper release testing a correct setup should be used, as this workaround does not cover all the use cases for reputation.
JAVA_OPTS="-Dapplication.appName=bisq2_Alice_clear \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001
-Dapplication.devMode=true \
-Dapplication.devModeReputationScore=50000" \
apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-app