Docs
Operate

Run a node

A full node keeps its own verified copy of the chain. An RPC node is a full node that also answers JSON-RPC for your wallets, apps and indexers.

What you need#

Full node or RPC node
Machine Linux (amd64 or arm64), macOS or Windows; 2 CPU cores, 4 GB RAM
Disk SSD, 50 GB to start. The node keeps every state (archive mode); today the mainnet data folder is under 1 GB and grows by less than 1 GB a month
Network Outbound TCP and UDP to the P2P port of the network (30303). Inbound only if you want other nodes to connect to you
Clock NTP running (chrony or systemd-timesyncd). Blocks dated in the future are refused
Software Nothing else: the package carries the oysbio binary for every platform

1. Download and check the package#

Packages are on Downloads: one per network, oysbio-node-<version>-mainnet and oysbio-node-<version>-testnet. Both hold the same binaries; the network files differ.

VERSION=1.0.4
NET=mainnet
curl -fsSLO https://docs.oys.bio/downloads/$VERSION/oysbio-node-$VERSION-$NET.tar.gz
curl -fsSLO https://docs.oys.bio/downloads/$VERSION/oysbio-node-$VERSION-$NET.SHA256SUMS
sha256sum -c oysbio-node-$VERSION-$NET.SHA256SUMS --ignore-missing
tar -xzf oysbio-node-$VERSION-$NET.tar.gz && cd oysbio-node-$VERSION-$NET
sha256sum -c SHA256SUMS                    # every file in the package; macOS: shasum -a 256 -c SHA256SUMS

The checksum file comes from this site over HTTPS; compare the binary's checksum with the one on Downloads as well. You can also build the binary yourself and get the same bytes.

2. Configure#

cp node.env.example node.env
Setting Full node RPC node
ROLE fullnode rpc
NAT extip:<public IP> if other nodes should reach you, else any same
DISCOVERY 1 finds more peers, starting from the seed nodes same
HTTP_ADDR not used keep 127.0.0.1; put a reverse proxy with HTTPS and a rate limit in front
EXTRA_PEERS your own other nodes, comma separated same
MAX_PEERS 50; more on a sentry same
TRUSTED_PEERS peers that keep their slot when the node is full (see Sentry architecture) same

The package lists the public seed nodes in network/peers.txt; the node connects to them first.

3. Start#

./oysbio-node.sh init            # data folder with the genesis block
./oysbio-node.sh start           # foreground; Ctrl+C stops it cleanly
./oysbio-node.sh info            # in a second terminal: block, safe block, peers

Windows: Copy-Item node.env.example node.env, then .\oysbio-node.ps1 init, .\oysbio-node.ps1 start and .\oysbio-node.ps1 info.

A new node downloads and executes every block from its peers. To start from a recent block instead, import a chain snapshot before the first start:

./oysbio-node.sh import oysbio-mainnet-<block>.rlp.gz

The node is in sync when info shows a block a few seconds old and the same block hash as the explorer: compare eth.getBlock(<n>).hash in ./oysbio-node.sh console with https://explorer.oys.bio.

4. Run it as a service (Linux)#

sudo useradd --system --no-create-home --shell /usr/sbin/nologin oysbio      # once per machine
sudo cp -r . /opt/oysbio-node-mainnet && sudo chown -R oysbio:oysbio /opt/oysbio-node-mainnet
sudo cp /opt/oysbio-node-mainnet/linux/oysbio-node-mainnet.service /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now oysbio-node-mainnet
journalctl -u oysbio-node-mainnet -f

5. Serve RPC#

With ROLE=rpc the node answers HTTP on 127.0.0.1:8545 and WebSocket on 127.0.0.1:8546 with the eth, net, web3, txpool and clique APIs. Never expose these ports directly: put nginx or Caddy in front with HTTPS, a request size limit and a rate limit, and keep --http.vhosts to your domain (HTTP_VHOSTS=rpc.example.com). The node never holds keys, so eth_sendTransaction has nothing to sign; clients send signed transactions.

Check it:

curl -s http://127.0.0.1:8545 -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["safe",false]}'

Ports#

Port Protocol Purpose Open to
30303 TCP and UDP peer-to-peer (UDP only with discovery) the internet, if you want inbound peers
8545 / 8546 TCP JSON-RPC HTTP / WebSocket (rpc role) 127.0.0.1, behind your reverse proxy

Mainnet and testnet use different ports, folders and service names, so one machine can run both.

Upgrades#

Network upgrades activate at a block number. Every node must run a release that knows the upgrade before that block; a node on an older release stops following the chain at the first block that the new rules change. Releases are listed on Downloads with the blocks they schedule, and the upgrade history shows what each upgrade changed.

To upgrade: stop the node, replace bin/, oysbio-node.* and network/ with the new package, and start again. The data folder stays. A node that started the new release after the upgrade block rewinds to the block before it and re-syncs from there by itself.

Build from source#

The node is go-ethereum v1.13.15 with the OysBio changes. The source archive of every release is on Downloads. With Go 1.27.4 (Go downloads it itself with GOTOOLCHAIN):

mkdir oysbio-src && tar -xzf oysbio-source-1.0.4.tar.gz -C oysbio-src && cd oysbio-src
GOTOOLCHAIN=go1.27.4 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
  go build -trimpath -buildvcs=false -ldflags '-s -w' -o oysbio ./cmd/geth
sha256sum oysbio            # the same checksum as bin/oysbio-linux-amd64 in the package

Troubleshooting#

You see Meaning and fix
peers: 0 in info The node cannot reach a seed node. Check outbound TCP 30303 and network/peers.txt; add EXTRA_PEERS.
BAD BLOCK in the log The node runs a release older than an upgrade the chain passed. Install the current release from Downloads.
genesis.json does not match the data The data folder belongs to the other network or to a different genesis. Use a separate DATA_DIR.
future block The machine's clock is ahead. Start NTP.
Block stays a few seconds behind the explorer Normal: blocks arrive about every 3 seconds.