> For the complete documentation index, see [llms.txt](https://docs.wanchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wanchain.org/pos-validator-nodes/run-rpc-node-guide.md).

# 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)

{% stepper %}
{% step %}

### Download the latest binary

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

{% endstep %}

{% step %}

### Extract and rename

```bash
tar zxf gwan-linux-amd64.tgz
mv gwan-linux-amd64 gwan
```

{% endstep %}

{% step %}

### Run the node (archive mode)

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

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

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

{% endstep %}
{% endstepper %}

{% hint style="info" %}
The command-line interface is similar to Ethereum’s Geth client. Use `./gwan --help` to view additional parameters.
{% endhint %}

***

## Running a Testnet RPC Node (Binary)

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

{% stepper %}
{% step %}

### Download and extract the binary

Download and extract the binary as shown in the Mainnet Binary steps above.
{% endstep %}

{% step %}

### Start the testnet node

Archive mode:

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

Full mode (less disk usage):

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

{% endstep %}
{% endstepper %}

***

## Running a Mainnet RPC Node (Docker)

```bash
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)

```bash
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
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.wanchain.org/pos-validator-nodes/run-rpc-node-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
