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

  1. Download and install MSYS2.
  2. Launch MSYS2 MINGW64 or MINGW32.
  3. Update pacman: pacman -Syy
  4. 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
  5. Install Java:
curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.2.fx-librca

Forking and Compiling Haveno

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

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:

  1. Follow the instructions at Haveno price node repo.
  2. Update DEFAULT_NODES in ProvidersRepository.java to add the new price node.
  3. Configure haveno-pricenode.env and deploy it as a systemd service.

Configuring Seed Nodes

Without Proof of Work (PoW)

  1. Compile Haveno: Follow the steps in Forking and Compiling Haveno.
  2. Run a Monero Node: See Running a Monero Node.
  3. Modify the haveno-seednode.service file and copy it to /etc/systemd/system.
  4. Start the seed node with sudo systemctl start haveno-seednode.service.
  5. View the .onion address using journalctl -u haveno-seednode.service -b -f, and add this to the seed node list in xmr_<network>.seednodes.
  6. 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:

  1. Verify your system architecture with sudo dpkg --print-architecture.
  2. Add the Tor repository and GPG key.
  3. Install Tor using:
    sudo apt install tor deb.torproject.org-keyring
    
  4. Replace the default torrc configuration and restart Tor.

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

  1. Build Haveno: ./gradlew generateKeypairs
  2. Add the developer public keys to FilterManager.java.
  3. Update all nodes and user applications.

Alert and Private Notification Privileges

  1. Generate Keypairs: ./gradlew generateKeypairs
  2. Register alert keys in AlertManager.java and private notification keys in PrivateNotificationManager.java.

Adding and Managing Arbitrators

Registering an Arbitrator

  1. Compile Haveno: Follow the build steps above.
  2. Generate Keypairs: ./gradlew generateKeypairs
  3. Add the arbitrator public key to ArbitratorManager.java in getPubKeyList().
  4. Launch the Arbitrator Application:
    • Start with make arbitrator-desktop-mainnet.
    • Navigate to the Account tab and press ctrl + r.
    • Enter the private key to register the arbitrator.
  5. 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

  1. Ensure that all disputes are resolved.
  2. Open the Haveno desktop app and unregister the arbitrator from the Account tab.

Configuring the Network

Setting a Network Filter

  1. Press ctrl + f to open the filter window.
  2. Use a developer key to set filters for offers, currencies, and more.

Customizing Data and Network Versions

  • Data Folder: Update DEFAULT_APP_NAME in HavenoExecutable.java.
  • P2P Version: Change P2P_NETWORK_VERSION in Version.java.

Setting Trade Fees

  1. Configure in HavenoUtils.java.
  2. Specify whether fees are arbitrator-assigned or sent to a global address.

User Testing Setup

Launch test users:

  • Mainnet: make user1-desktop-mainnet and make user2-desktop-mainnet
  • Stagenet: Use the corresponding stagenet commands.

Building and Distributing Installers

  1. Adjust mainnet settings in package.gradle.
  2. Follow the instructions in the Haveno packaging guide to build distribution files.

Sending Updates and Alerts

  1. Upload Installers: Place updated files in your designated download directory.
  2. Set Minimum Version: Use ctrl + f to specify the version required for trading.
  3. Send Alerts: Press ctrl + m, enter a registered alert key, and broadcast the message.

Signing Payment Accounts

From Trade History

  1. Go to Portfolio > History and open trade details.
  2. Copy the <witness hash>,<pub key hash> and use ctrl + i > ctrl + p to sign.

From Disputes

  1. Navigate to Account > ctrl + i > ctrl + s.
  2. Select the accounts to sign.

Signing Unsigned Keys

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