Full Guide to Installing and Managing Monerod with Docker or Haveno Desktop App

This guide is for absolute beginners who want to install and run a Monero node (monerod) on their local machine. You can do this in two ways:

  1. Use Docker Desktop (easier for most people).
  2. Use the Haveno Desktop App to manage your node directly (if you already have Haveno).

Running a Monero node is resource-intensive! Monerod will use your computer’s CPU, memory, and disk space. However, running your own node has huge benefits:

  • Support the Monero network: More nodes help decentralize and strengthen the network.
  • Increased privacy: Running your own node increases the security and privacy of your transactions, as you're not relying on third-party nodes.

Make sure your computer has the resources before continuing!


Option 1: Using Docker Desktop to Run Monerod

Step 1: Install Docker Desktop

  1. Download Docker Desktop:
    • Visit Docker's website and download Docker Desktop for your system (Windows, macOS, or Linux).
  2. Install Docker Desktop:
    • Follow the installation steps provided on the Docker website. This should be straightforward—just download and install it like any other app.

Step 2: Create a Docker-Compose File for Monerod

  1. Open a text editor (Notepad, VS Code, etc.).
  2. Copy and paste the following code into the text file:
   version: '3'

   services:
     monerod:
       image: monerod:latest
       build: .
       user: ${FIXUID:-1000}:${FIXGID:-1000}
       restart: unless-stopped
       volumes:
         - monero-mainnet-blockchain-data:/home/monero/.bitmonero
       ports:
         - "127.0.0.1:18080:18080"  # Bind p2p port to localhost
         - "127.0.0.1:18081:18081"  # Bind unrestricted RPC to localhost
         - "127.0.0.1:18089:18089"  # Bind restricted RPC to localhost
       command:
         - "--rpc-bind-ip=127.0.0.1"  # Unrestricted RPC bound to localhost
         - "--rpc-bind-port=18081"     # Unrestricted RPC port
         - "--rpc-restricted-bind-ip=127.0.0.1"  # Restricted RPC bound to localhost
         - "--rpc-restricted-bind-port=18089"
         - "--no-igd"
         - "--enable-dns-blocklist"
         - "--prune-blockchain"

   volumes:
     monero-mainnet-blockchain-data:
  1. Save this file as docker-compose.yml in a folder where you want to run Monerod.

Step 3: Start the Monero Node

  1. Open your terminal (Command Prompt, Powershell, or Terminal depending on your operating system).

  2. Navigate to the folder where your docker-compose.yml file is saved:

    cd path/to/your/folder
    
  3. Run the following command to start Monerod using Docker Compose:

    docker-compose up -d
    
    • The -d flag means the container will run in the background.
  4. Wait for the blockchain to download. This can take a long time as it needs to sync with the Monero network.

Step 4: Connect Haveno to Your Monero Node

Now that your node is running, you need to connect it to Haveno.

  1. Open Haveno.

  2. Go to Menu -> Nodes -> New Node -> Local Node.

  3. Add the following details:

    • Node type: Local Node.
    • RPC Address: http://127.0.0.1:18081
    • Port: 18081.
  4. Save the node settings. Haveno will now use your local Monero node for all transactions.


Option 2: Using the Haveno Desktop App to Install Monerod as a Service

Step 1: Open Haveno Desktop App

  1. Download and install the Haveno Desktop App if you haven’t already.

    • You can find it here.
  2. Launch Haveno.

Step 2: Install Monerod from Haveno

  1. In the app, go to the top menu.
  2. Click Menu -> Nodes -> New Node -> Local Node.
  3. Select “Local Node” as the node type.
  4. Haveno will give you the option to install Monerod as a service.
    • Click "Install" and follow the prompts.
  5. Once installed, the node will start automatically and sync with the Monero network. Be patient, as syncing the blockchain can take a while.

Step 3: Connect Haveno to the Local Node

  1. In Haveno, go to the Nodes section again.

  2. Add your local node with the following details:

    • RPC Address: http://127.0.0.1:18081
    • Port: 18081.
  3. Save your node configuration, and you’re ready to go!


Important Notes

  • Running a full Monero node will require a lot of resources: CPU, RAM, and disk space (over 100GB).
  • Monerod is a long-running process that will download and verify the entire Monero blockchain. Expect this to take hours or even days depending on your internet connection and system speed.
  • Prune mode (enabled in the docker-compose.yml file) helps reduce disk space usage by only storing necessary parts of the blockchain, but you’ll still need plenty of space.

Why Run Your Own Monero Node?

  1. Increased Privacy: When you use your own node, you’re not relying on third-party nodes to broadcast your transactions. This helps keep your activity private.
  2. Support the Network: By running a node, you're helping to decentralize the Monero network, making it stronger and more resilient.
  3. Security: Running your own node ensures that you control how your Monero wallet interacts with the blockchain, making it harder for attackers to intercept or manipulate your transactions.

Troubleshooting

Issue: Monerod isn't starting or syncing?

  • Make sure Docker Desktop is running and that you used the correct docker-compose.yml file.
  • If Haveno isn’t connecting to your node, double-check the RPC address: it should be http://127.0.0.1:18081.

Issue: Haveno can’t connect to the node?

  • Verify that Monerod is running by checking the Docker containers:
    docker ps
    
    You should see monerod running in the list. If not, rerun the docker-compose up -d command.

You now have a fully functioning Monero node running locally, either through Docker or the Haveno Desktop App. Congratulations on taking control of your privacy and helping to support the Monero network! 🎉