Run the node

Configure your firewall

Before starting the node, please make sure that the following TCP ports are open in your firewall and load balancer (if any) for incoming connections:

  • 4689 - For Blockchain syncing (mandatory)

  • 14014 - For incoming API requests (required if you run a Native IoTeX API Gateway)

  • 15015 - For incoming API requests (needed if you want to allow Ethereum API requests)

  • 8080 - For health monitoring (optional)

Run the full node

Once you configured your node and optionally downloaded a recent snapshot, you are ready to run the node and start the syncing process:

Run the following command to start the service::

docker run -d --restart on-failure --name iotex \
        -p 4689:4689 \
        -p 8080:8080 \
        -v=$IOTEX_HOME/data:/var/data:rw \
        -v=$IOTEX_HOME/log:/var/log:rw \
        -v=$IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro \
        -v=$IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro \
        iotex/iotex-core:v1.12.1 \
        iotex-server \
        -config-path=/etc/iotex/config_override.yaml \
        -genesis-path=/etc/iotex/genesis.yaml

Run as a Gateway

If you opted for running the node as an API Gateway, use the following command instead (notice the -plugin=gateway argument and the new ports exposed):

docker run -d --restart on-failure --name iotex \
        -p 4689:4689 \
        -p 14014:14014 \
        -p 15014:15014 \
        -p 8080:8080 \
        -v=$IOTEX_HOME/data:/var/data:rw \
        -v=$IOTEX_HOME/log:/var/log:rw \
        -v=$IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro \
        -v=$IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro \
        iotex/iotex-core:v1.12.1 \
        iotex-server \
        -config-path=/etc/iotex/config_override.yaml \
        -genesis-path=/etc/iotex/genesis.yaml \
        -plugin=gateway

When running the IoTeX full node as a gateway, it can be used by blockchain clients, tools and dApp frontends to interact with the IoTeX blockchain using the following ports (or the custom ones you used in the command above):

14014: for IoTeX-native clients, like the ioctl command-line client, or the antenna-sdk for developers.

15014: for any Ethereum client, like Metamask wallet, or hardhat, or the web3js library for developers

Please be careful when running an IoTeX Delegate with the Gateway service enabled.

It's not advisable to run an open Gateway service on a Delegate node as it could affect block production performances or expose the node to DOS attacks.

Last updated