🐳Docker

Authors: [ Ankur | Dapplooker]

System Requirements

CPU
OS
RAM
DISK

8 vCPU

Ubuntu 22.04

32 GB

2 TB (SSD)

circle-check

Pre-requisite

Before starting, clean the setup then update and upgrade. Install following:

  • Docker

  • Git

  • Go v1.23+

Commands

sudo apt update -y && sudo apt upgrade -y && sudo apt auto-remove -y
sudo apt install docker.io git ufw -y jq -y

Firewall Settings

Check status & enable UFW

Set explicit default UFW rules

Allow SSH, HTTP, and HTTPS

Allow Remote connection

Setup Instructions

  1. Set the environment

  1. Edit `config.yaml` file

Edit $IOTEX_HOME/etc/config.yaml, look for externalHost and producerPrivKey, uncomment the lines and fill in your external IP and private key. If you leave producerPrivKey empty, your node will be assgined with a random key.

  1. Download Data

circle-info
  1. If you plan to run your node as a gatewayarrow-up-right, please use the snapshot with index data: https://t.iotex.me/mainnet-data-with-idx-latestarrow-up-right .

  2. If you only want to sync chain data from 0 height without relaying on legacy delegate election data from Ethereum, you can setup legacy delegate election data with following command:

  1. If you want to sync the chain from 0 height and also fetching legacy delegate election data from Ethereum, please change the gravityChainAPIs in config.yaml to use your infura key with Ethereum archive mode supported or change the API endpoint to an Ethereum archive node which you can access.

  1. Start the node

Monitoring

Check Ports

Ensure that TCP ports 4689 and 8080 are open on your firewall and load balancer (if applicable). Additionally, if you intend to use the node as a gateway, make sure the following ports are open:

  • 14014 for the IoTeX native gRPC API

  • 15014 for the Ethereum JSON API

  • 16014 for the Ethereum WebSocket

Monitor Logs of Docker Container

Sync Status

Run a query to check the latest synchronized L2 block:

Response should look like:

REFERENCES

Last updated