> For the complete documentation index, see [llms.txt](https://svpchain.gitbook.io/svpchain-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://svpchain.gitbook.io/svpchain-docs/chain/run-a-node.md).

# Run a node

Run a full svpchaind node — for indexing, dApp backends, and infra teams.

A full node serves JSON-RPC and WebSocket traffic for your own apps without the rate limits of public endpoints. It does **not** sign blocks — that's a [validator](/svpchain-docs/chain/validator-setup.md), which requires a partnership today.

This page is the full-node subset of the validator flow. If you intend to validate, follow [Validator setup](/svpchain-docs/chain/validator-setup.md) directly — it's a strict superset.

### Hardware

| Resource | Recommended                                                          |
| -------- | -------------------------------------------------------------------- |
| CPU      | 8+ cores                                                             |
| RAM      | 32 GB (64 GB if you also run an indexer)                             |
| Disk     | NVMe SSD, 1 TB+ (with `--pruning default`; archive nodes are larger) |
| OS       | Ubuntu 22.04 LTS (x86-64) or equivalent                              |
| Network  | Stable public IP; port `26656` (P2P) reachable inbound               |

### Before you start

You'll need a few values from the network operators (or the published [Networks](/svpchain-docs/chain/networks.md) page):

| Placeholder          | What it is                                                                                                  |
| -------------------- | ----------------------------------------------------------------------------------------------------------- |
| `<GENESIS_URL>`      | URL to download the network's `genesis.json` (or a public RPC `/genesis`).                                  |
| `<SEEDS>`            | Comma-separated P2P seeds: `nodeid@host:26656`.                                                             |
| `<PERSISTENT_PEERS>` | Optional, same format.                                                                                      |
| `<RPC_URL>`          | A public CometBFT RPC for status checks and (optionally) state-sync.                                        |
| `<ETH_RPC_ENDPOINT>` | Ethereum JSON-RPC for the bridge daemon. Default `https://ethereum-sepolia-rpc.publicnode.com` for testnet. |

### Install

{% stepper %}
{% step %}

### 1) System packages

```bash
sudo apt-get update
sudo apt-get install -y curl jq git build-essential
```

{% endstep %}

{% step %}

### 2) Install Go 1.23.8 and build the binary

```bash
ARCH=$(dpkg --print-architecture)
curl -fsSL "https://go.dev/dl/go1.23.8.linux-${ARCH}.tar.gz" -o /tmp/go.tgz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf /tmp/go.tgz
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.bashrc

git clone https://github.com/svpchain/protocol.git
cd protocol
git checkout <RELEASE_TAG>
make install
svpchaind version
```

{% endstep %}

{% step %}

### 3) Initialize and install genesis

```bash
export MONIKER="<your-node-name>"
svpchaind init "$MONIKER" --chain-id svp-2517-1
curl -fsSL "<GENESIS_URL>" -o ~/.svpchain/config/genesis.json
svpchaind validate-genesis ~/.svpchain/config/genesis.json
```

{% endstep %}

{% step %}

### 4) Configure peers and EVM JSON-RPC

In `~/.svpchain/config/config.toml`:

```toml
[p2p]
seeds = "<SEEDS>"
persistent_peers = "<PERSISTENT_PEERS>"
pex = true
addr_book_strict = false
```

In `~/.svpchain/config/app.toml`, enable the EVM JSON-RPC server so your apps can talk to the node:

```toml
minimum-gas-prices = "2000000000asvp"   # 2 Gwei

[evm]
evm-chain-id = 2517

[json-rpc]
enable = true
address = "0.0.0.0:8545"
ws-address = "0.0.0.0:8546"
api = "eth,net,web3,debug"
```

{% hint style="warning" %}
Binding `:8545` to `0.0.0.0` makes your node's RPC publicly reachable. Put it behind a firewall or a reverse proxy with rate limits before doing so on the open internet.
{% endhint %}
{% endstep %}

{% step %}

### 5) Start the node under systemd

```bash
sudo tee /etc/systemd/system/svpchaind.service >/dev/null <<EOF
[Unit]
Description=svpchaind full node
After=network-online.target
Wants=network-online.target

[Service]
User=$USER
ExecStart=$HOME/go/bin/svpchaind start \\
  --home $HOME/.svpchain \\
  --bridge-daemon-eth-rpc-endpoint <ETH_RPC_ENDPOINT> \\
  --max-daemon-unhealthy-seconds 4294967295
Restart=always
RestartSec=5
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now svpchaind
sudo journalctl -u svpchaind -f
```

{% endstep %}
{% endstepper %}

### Verify

```bash
# Cosmos / CometBFT side — height should be rising
curl -s http://localhost:26657/status | jq '.result.sync_info | {height: .latest_block_height, catching_up}'

# EVM side — same height in hex
curl -s -X POST http://localhost:8545 \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```

The node is healthy when `catching_up` is `false` and both block heights agree.

### Sync modes

* **Full sync from genesis** (default) — replay every block. Slow on a long chain.
* **State-sync** — fetch a recent state snapshot from RPC peers. Configure `[statesync]` in `config.toml` with two `rpc_servers` (`<RPC_URL>`) and a recent trust height/hash. Ask the network operators for the current trust point.
* **Snapshot restore** — restore a published `~/.svpchain/data/` snapshot. Fastest if the network publishes one.

### Archive vs pruned

`--pruning default` keeps recent state and a sparse history of older heights — adequate for most apps and indexers. Run with `--pruning nothing` (archive mode) only if you need historical state queries (`eth_call` at old blocks). Archive disk usage grows roughly linearly with chain history.

### Next steps

<table data-view="cards"><thead><tr><th>Operate</th><th data-card-target data-type="content-ref">Link</th></tr></thead><tbody><tr><td>Become a validator</td><td><a href="/svpchain-docs/chain/validator-setup.md">Validator setup</a></td></tr><tr><td>Add metrics and alerts</td><td><a href="/svpchain-docs/chain/monitoring.md">Monitoring</a></td></tr><tr><td>Index chain data</td><td><a href="/svpchain-docs/build/indexing-and-events.md">Indexing &amp; events</a></td></tr></tbody></table>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://svpchain.gitbook.io/svpchain-docs/chain/run-a-node.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
