This comprehensive guide will walk you through deploying and managing a Haveno network, covering everything from setting up a VPS to registering key network components like arbitrators and seed nodes.
Service Management on a VPS
For maximum reliability, deploy Haveno’s services, such as seed nodes, price nodes, and Monero nodes, on a VPS. Use systemd to manage these services efficiently:
- Seed nodes, price nodes, and Monero nodes should run as systemd services for stability.
- Arbitrators are better suited to run in detached Screen sessions for easy monitoring and control.
For VPS security, refer to Monero’s server hardening guide.
If you prefer to setup your own network easily then refer to setting up a haveno network with Docker guide instead. (recommended)
Setting Up Dependencies
For Linux and macOS
Install Java JDK 21 using SDKMAN!:
curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.2.fx-librca
Ubuntu 22.04 Users:
sudo apt-get install openjdk-21-jdk
For Windows
- Download and install MSYS2.
- Launch MSYS2 MINGW64 or MINGW32.
- Update pacman:
pacman -Syy
- Install dependencies:
- 64-bit systems:
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake git
- 32-bit systems:
pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake git
- 64-bit systems:
- Install Java:
curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.2.fx-librca
Forking and Compiling Haveno
- Fork the Haveno repository and clone your fork, Kewbits fork aims to gradually remove baked in binaries:
git clone https://github.com/KewbitXMR/haveno.git
cd haveno
make clean && make
Running a Monero Node
Haveno requires a local Monero node for seed nodes and arbitrators:
- To deploy a Monero node as a systemd service, customize and use the provided
.service
and.conf
templates. - To run Monero manually:
- Mainnet:
make monerod
- Stagenet:
make monerod-stagenet
- Mainnet:
If you're setting it up from a Windows Server or Desktop you may want to just manage your node using the new intuitive Monero daemon GUI created by if everoddandeven, Kewbit covers this in some detail.
There is also a fantastic docker image geneator made by Monero Suite if you want an preconfigured Monero node deployment just from filling out a form.
Setting Up Price Nodes
Price nodes are independent services and can be run on both the clearnet and Tor:
- Follow the instructions at Haveno price node repo.
- Update
DEFAULT_NODES
inProvidersRepository.java
to add the new price node. - Configure
haveno-pricenode.env
and deploy it as a systemd service.
Configuring Seed Nodes
Without Proof of Work (PoW)
- Compile Haveno: Follow the steps in Forking and Compiling Haveno.
- Run a Monero Node: See Running a Monero Node.
- Modify the
haveno-seednode.service
file and copy it to/etc/systemd/system
. - Start the seed node with
sudo systemctl start haveno-seednode.service
. - View the
.onion
address usingjournalctl -u haveno-seednode.service -b -f
, and add this to the seed node list inxmr_<network>.seednodes
. - Repeat this for all seed nodes and notify network participants of any changes.
With Proof of Work (PoW)
Follow additional steps to install and configure Tor for PoW seed nodes:
- Verify your system architecture with
sudo dpkg --print-architecture
. - Add the Tor repository and GPG key.
- Install Tor using:
sudo apt install tor deb.torproject.org-keyring
- Replace the default
torrc
configuration and restart Tor.
Or Deploy with Docker (recommended)
If you would rather avoid this complications of managing a network we provide the resources to STOP READING HERE and build and manage haveno network using Docker instead.
Registering Keypairs with Privileges
Developer Privileges
- Build Haveno:
./gradlew generateKeypairs
- Add the developer public keys to
FilterManager.java
. - Update all nodes and user applications.
Alert and Private Notification Privileges
- Generate Keypairs:
./gradlew generateKeypairs
- Register alert keys in
AlertManager.java
and private notification keys inPrivateNotificationManager.java
.
Adding and Managing Arbitrators
Registering an Arbitrator
- Compile Haveno: Follow the build steps above.
- Generate Keypairs:
./gradlew generateKeypairs
- Add the arbitrator public key to
ArbitratorManager.java
ingetPubKeyList()
. - Launch the Arbitrator Application:
- Start with
make arbitrator-desktop-mainnet
. - Navigate to the
Account
tab and pressctrl + r
. - Enter the private key to register the arbitrator.
- Start with
- Notes:
- Arbitrators must have access to a local Monero node with unrestricted RPC.
- Keep arbitrators online as much as possible to facilitate trade arbitration.
Unregistering an Arbitrator
- Ensure that all disputes are resolved.
- Open the Haveno desktop app and unregister the arbitrator from the
Account
tab.
Configuring the Network
Setting a Network Filter
- Press
ctrl + f
to open the filter window. - Use a developer key to set filters for offers, currencies, and more.
Customizing Data and Network Versions
- Data Folder: Update
DEFAULT_APP_NAME
inHavenoExecutable.java
. - P2P Version: Change
P2P_NETWORK_VERSION
inVersion.java
.
Setting Trade Fees
- Configure in
HavenoUtils.java
. - Specify whether fees are arbitrator-assigned or sent to a global address.
User Testing Setup
Launch test users:
- Mainnet:
make user1-desktop-mainnet
andmake user2-desktop-mainnet
- Stagenet: Use the corresponding stagenet commands.
Building and Distributing Installers
- Adjust mainnet settings in
package.gradle
. - Follow the instructions in the Haveno packaging guide to build distribution files.
Sending Updates and Alerts
- Upload Installers: Place updated files in your designated download directory.
- Set Minimum Version: Use
ctrl + f
to specify the version required for trading. - Send Alerts: Press
ctrl + m
, enter a registered alert key, and broadcast the message.
Signing Payment Accounts
From Trade History
- Go to
Portfolio > History
and open trade details. - Copy the
<witness hash>,<pub key hash>
and usectrl + i > ctrl + p
to sign.
From Disputes
- Navigate to
Account > ctrl + i > ctrl + s
. - Select the accounts to sign.
Signing Unsigned Keys
- Access
Account > ctrl + i > ctrl + o
.
Additional Tips
- Use
ctrl + o
to manually open disputes if needed. - For private notifications, use
alt + r
and a registered private key.