Introduction
This guide provides detailed instructions on how to set up your own Haveno network. Haveno is a decentralized marketplace for exchanging Monero with other cryptocurrencies or fiat, allowing users to trade while maintaining privacy and security.
By following this guide, you'll learn how to install Haveno via Docker. Both methods have their advantages, and we'll cover them in detail to ensure a smooth setup.
Who is this guide for?
This guide is designed for:
- Developers: Those looking to contribute to the Haveno project or run their own test networks.
- Network operators: People who want to operate their own Haveno network to help add liquidity or decentralize the platform.
If you dont want to use docker and would prefer to configure everything manually please refer to set up a Haveno network manually.
Hardware Requirements
The following hardware specs are recommended to run your own Haveno network efficiently:
Component | Recommended Minimum |
---|---|
CPU | 4 cores |
RAM | 8 GB |
Storage | 150 GB SSD |
Network | 100 Mbps Internet Connection |
OS | Debian 10+ or Docker environment |
For heavier loads (larger-scale networks or more nodes), we recommend upgrading to at least 16 GB of RAM and a faster multi-core processor. It is required to have 2 servers that meet this specification.
Prerequisites
Before you begin the installation process, ensure you have the following:
- Basic Linux knowledge: You should be familiar with terminal commands and navigating Linux environments.
- Monero Wallet: Ensure you have a Monero wallet, as you'll need it to interact with the Haveno network.
- A running Monero daemon: Ensure the Monero daemon is running either on the same machine or accessible remotely.
- 2 servers: It is required that you run 2 seednodes as a minimum in order for the network to function.
- A base operating system already installed: I have only tested this with Debian but any OS that fully supports Docker (basically all OS's) should be fine.
Installation
Docker Setup
Docker is the easiest and most flexible way to set up Haveno. It ensures that all dependencies are managed within a container, making the process more streamlined.
Step 1: Install Docker
To install Docker run the following command in the terminal
sudo apt-get install docker.io docker-compose
Step 2: Build from the Haveno Repository
You need move into the directory wher ever you want to the the project to be and run the seednode stack, this version will run both seednodes on the same server. Be warned that is also uses a local Monero node as Haveno seed nodes require that one is used locally, to drastically improve network speed for everyone. To proceed:
Step 3: Create a folder for the project
You can do that by simple running
mkdir -p haveno-seednodes
Then a command to create:
touch docker-compose.yml
Step 4: Edit the docker-compose.yml
file
First command to run is
nano docker-compose.yml
You'll be presented with a screen where you can paste the config, the save press Ctrl-X and it will prompt at the botton just tap Y then tap Enter.
services:
haveno-seednode:
image: haveno-seednode:latest
build: .
volumes:
- ./haveno-seednode/data:/app/data/
environment:
NETWORK_NAME: "DRACO" # Some name for your network no longer than 16 chars
TOR_CONTROL_HOST: tor # Refer to the tor container by its service name
TOR_CONTROL_PORT: 9051
TOR_CONTROL_PASSWORD: SomeFairlyBigPassword # Set your Tor control password
APP_NAME: haveno_XMR
NODE_PORT: 9999
HIDDEN_SERVICE_ADDRESS: "" # Ensure the key for this is in the data directory
MAX_MEMORY: 1200 # Comment this out if you don't want a limit
XMR_NODE: http://monerod:18081 # Connect to local private one
depends_on:
- tor
- monerod
links:
- tor
- monerod
monerod:
image: monerod:latest
build: .
user: ${FIXUID:-1000}:${FIXGID:-1000}
restart: unless-stopped
volumes:
- monero-mainnet-blockchain-data:/home/monero/.bitmonero
command:
- "--rpc-bind-ip=0.0.0.0" # Unrestricted RPC bound to localhost, this is importat for Haveno seednodes to use
- "--confirm-external-bind" # It's not really external
- "--rpc-bind-port=18081" # Unrestricted RPC port
- "--rpc-restricted-bind-ip=0.0.0.0" # Restricted RPC bound to localhost
- "--rpc-restricted-bind-port=18089"
- "--no-igd"
- "--enable-dns-blocklist"
- "--prune-blockchain"
tor:
image: havenodex/tor:latest
environment:
TOR_PROXY: 'true' # Eabling the Socks5 Proxy
TOR_PROXY_PORT: '9050'
TOR_CONTROL: 'true'
TOR_PROXY_CONTROL_PORT: '9051' # Eabling the control port (required)
TOR_PROXY_CONTROL_PASSWORD: '5fFRWFW553533fFV' # Required
TOR_PROXY_CONTROL_COOKIE: 'false'
volumes:
- ./tor-data:/tor/
restart: unless-stopped
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
WATCHTOWER_CLEANUP: "true"
WATCHTOWER_POLL_INTERVAL: 300 # Checks for updates every 5 minutes
volumes:
monero-mainnet-blockchain-data:
Ignore the warning, in a normal case of installing Tor directory to your machine, binding to
0.0.0.0
would export Tor to the internet unless you're behind NAT. Since we're using docker, we're protecting your network in another was, essenyially sandboxing.
Step 5: Build/Pull the Docker Images
Once the previous file is saved with no syntax errors then run this to start the stack, ensuring you're in the same directory this command will run your docker stack in the background:
docker-compose up -d
If you want to check the logs anytime just do
docker-compose logs -f
in the same directory, it's best to do this right away so that you now it's been configured correctly, if you have any trouble feel free to email the staff [email protected].
Step 6: Aquire your seednode IPs to distribute
If all is well your seednodes should be online, remember you need to be running 2 seednodes for your network to be realiable
You can find your seenode addresses in the tordata/seednodes.txt
which will be relative to the directory your're in.
Network Configuration
Once the installation is complete, you may need to configure your network to allow external access. This includes setting up:
- Firewall rules: Allow traffic through the relevant ports for Tor (if you have a firewall running).
Conclusion
By following this guide, you should now have a fully operational Haveno network. Depending on your needs, you can either run Haveno within Docker or install it directly on your Debian system. With everything set up, you're ready to start trading and decentralizing the Haveno ecosystem.