Installing the node

The exrpd binary is the primary software component for running XRPL EVM nodes. By installing and configuring exrpd, you will be able to join the network, synchronize with the blockchain, and participate in consensus (if you are a validator). The following steps will guide you through the installation process.

Installation Methods

There are multiple ways to install the exrpd binary on your system. Choose the method that best suits your requirements and expertise.


Method 1: Downloading Raw Binaries

This method involves downloading precompiled binaries from the repository's latest release and running them on your system. It’s quick to set up and requires minimal prerequisites.

Pre-requisites

  • None: Just ensure your system meets the hardware requirements.

Steps

  1. Download the Latest Binaries:
    Visit the official repository's releases page and download the binary that corresponds to your operating system and architecture. You can use wget (or curl for Windows) to download the file directly from the command line.

    For Linux Users:

    • AMD64:
      wget https://github.com/xrplevm/node/releases/download/v6.0.0/node_6.0.0_Linux_amd64.tar.gz
      
    • ARM64:
      wget https://github.com/xrplevm/node/releases/download/v6.0.0/node_6.0.0_Linux_arm64.tar.gz
      
  2. Extract the Binaries:
    Once downloaded, extract the file using the appropriate command for your platform. For example, on Linux:

    tar -xzf node_6.0.0_Linux_amd64.tar.gz
    

    This will extract the files into a directory.

  3. Move the Binaries:
    Move the extracted files (especially the exrpd binary) to your preferred directory. For instance, to place it in /usr/local/bin (which is typically in your PATH), run:

    sudo mv /root/bin/exrpd /usr/local/bin/
    
  4. Make the Binary Executable:
    Ensure the binary has executable permissions:

    chmod +x /usr/local/bin/exrpd
    
    • The exrpd binary is now located in /usr/local/bin/exrpd (if you followed the installation steps).
    • When you run exrpd from the terminal, your system finds it in /usr/local/bin.

    You can verify its location by running:

    which exrpd
    

    Additionally, once you start your node, configuration files (if created) will be placed in your home directory under ~/.exrpd.

  5. Verify the Installation:
    Check that the binary is accessible and working by running:

    exrpd version
    

    You should see version information (e.g., v6.0.0).

  6. Configure and Run Your Node (Optional):
    Once the binary is installed, follow the node configuration instructions

Using this method, you can quickly set up your node by downloading the latest release from the repository.


Below is the updated documentation for Methods 2 and 3, now including machine-specific tabs and additional details for Docker regarding optional API/RPC port exposure. For more details on configuration options, please refer to the Node Configuration Options documentation.


Method 2: Building from Source

This method involves cloning the source code repository and building the binaries from source. It is ideal for developers who want to customize the node.

Pre-requisites

  • go v1.23.4, make and gcc installed.

Install Dependencies for Building from Source

Install make and gcc:

sudo apt-get update
sudo apt-get install build-essential

Install Go v1.23.4:

sudo rm -rf /usr/local/go
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
source ~/.profile
go version

Steps to Build the Node

  1. Clone the repository:
    git clone https://github.com/xrplevm/node.git
    
  2. Navigate to the project directory:
    cd node
    
  3. Build the project:
    make build
    
  4. Locate the Binaries:
    The compiled binaries will be available in the build directory.

Method 3: Using Docker

A containerized approach ensures that the node runs in a consistent environment, avoiding dependency issues. This method is highly recommended if you prefer a ready-to-run environment.

Important: If the Docker image you’re using does not match the genesis file, which will not unless you are using the first docker image: peersyst/xrp-evm-blockchain:latest, you must start the container in interactive mode first to complete the setup steps. This interactive session lets you run the join-the-xrplevm instructions (such as exrpd init, downloading the correct genesis file, configuring persistent peers, adding keys and syncing) within the container. Once setup is complete, you can restart the node in detached mode.

Pre-requisites

Steps to Run the Node via Docker

  1. Pull the Docker Image:

    docker pull peersyst/exrp:latest
    
  2. Interactive Setup (if using an image that doesn’t match the genesis):
    If the image you pulled isn’t the one that was used to generate the genesis (for example, if you’re using an image with a newer version), you need to set up the node configuration interactively. This allows you to run the necessary join-the-xrplevm steps inside the container. For example:

    docker run -it --name xrplevm-setup \
      -v /home/xrplevmuser/.exrpd:/root/.exrpd \
      -e DAEMON_NAME=exrpd \
      -e DAEMON_HOME=/root/.exrpd \
      peersyst/exrp:latest /bin/sh
    

    Complete the join-the-xrplevm steps (initialization, genesis file download, peer configuration, add keys and sync) inside the shell and then exit.

  3. Run the Docker Container in Detached Mode:
    Once the configuration is complete, you can start the container as a background service:

    docker run -d --name xrplevm-node \
      -v /home/xrplevmuser/.exrpd:/root/.exrpd \
      -e DAEMON_NAME=exrpd \
      -e DAEMON_HOME=/root/.exrpd \
      peersyst/exrp:latest
    
  4. Verify the Container:
    Run:

    docker ps -a
    

    to ensure your container is running.

Note:
If you’re using a Docker image that isn’t the first one matching the genesis state (for example, an image that differs from the one used to generate the genesis file), you must run the container in interactive mode to complete the initial setup. Follow the join-the-xrplevm steps inside that session, then restart the node container in detached mode.

Finally, verify that your container is running using:

docker ps -a