Run RPC Node Guide

Running your own node is the most direct way to connect to and interact with the Wanchain network. This guide explains how to set up and run an RPC node step by step.


System Requirements

Hardware
Requirement

CPU

2 cores

Memory

8 GB

Disk (archive)

600 GB

Disk (full)

200 GB


Supported Operating Systems

The following operating systems are supported:

  • Linux (x64)

  • Linux (ARM)

  • Windows (x64)

  • macOS (x64)


Required Ports

A Wanchain node requires the following open ports:

  • 17717 – for P2P communication

  • 8545 – for RPC access

Please make sure these ports are open in your firewall. You can also configure the port numbers via CLI parameters.


Running a Mainnet RPC Node (Binary)

1

Download the latest binary

wget https://github.com/wanchain/go-wanchain/releases/download/v3.0.2/gwan-linux-amd64.tgz
2

Extract and rename

tar zxf gwan-linux-amd64.tgz
mv gwan-linux-amd64 gwan
3

Run the node (archive mode)

./gwan --http --http.addr 0.0.0.0 --http.port 8545

Or, to save disk space, run in full mode:

./gwan --gcmode=full --http --http.addr 0.0.0.0 --http.port 8545

The command-line interface is similar to Ethereum’s Geth client. Use ./gwan --help to view additional parameters.


Running a Testnet RPC Node (Binary)

To run a testnet node, add the --testnet flag.

1

Download and extract the binary

Download and extract the binary as shown in the Mainnet Binary steps above.

2

Start the testnet node

Archive mode:

./gwan --testnet --http --http.addr 0.0.0.0 --http.port 8545

Full mode (less disk usage):

./gwan --testnet --gcmode=full --http --http.addr 0.0.0.0 --http.port 8545

Running a Mainnet RPC Node (Docker)

sudo docker run -d --name wanchain-node     -v /home/ubuntu/wanchain:/root     -p 8545:8545 -p 17717:17717     wanchain/client-go:3.0.2 gwan     --gcmode=full --http --http.addr 0.0.0.0 --http.port 8545

Running a Testnet RPC Node (Docker)

sudo docker run -d --name wanchain-node     -v /home/ubuntu/wanchain:/root     -p 8545:8545 -p 17717:17717     wanchain/client-go:3.0.2 gwan     --testnet --gcmode=full --http --http.addr 0.0.0.0 --http.port 8545