Logo
RPC Assistant

What is a BNB node and when should you run one?

Summary

A BNB node is a client that stores the BNB Smart Chain state and processes transactions. Running one gives you direct access to the chain, but it requires significant hardware and maintenance. For most applications, a managed RPC service like OnFinality provides a more practical way to interact with BNB Chain without the operational overhead.

Quick decision guide: run your own BNB node or use a managed RPC?

Before you download the BSC client and start syncing, decide whether you actually need to operate a node. Running a BNB node gives you full control and direct access to the chain, but it also brings hardware, sync, and maintenance responsibilities. For many teams, a managed RPC service is the faster and more cost-effective path.

ConsiderationRun your own nodeUse a managed RPC (OnFinality)
Setup timeHours to days, plus sync timeMinutes
Hardware costHigh (16-core CPU, 32 GB RAM minimum)No hardware to manage
MaintenanceYou handle upgrades, monitoring, and backupsProvider handles it
ScalabilityManual capacity planningOn-demand scaling
Archive dataRequires separate archive nodeAvailable on request

If your application needs low-latency reads, high throughput, or reliable uptime without the operational burden, a managed RPC is often the better choice. OnFinality offers dedicated and shared nodes for BNB Chain, so you can start with a public endpoint and upgrade as your traffic grows. See RPC pricing for details.

What is a BNB node?

A BNB node is a client that participates in the BNB Smart Chain (BSC) network. It stores the blockchain state, validates transactions, and can produce blocks if configured as a validator. The most common client is geth, a fork of go-ethereum maintained by the BNB Chain team. There is also an Erigon client for archive mode.

A full node keeps the entire world state on disk, which allows it to:

  • Handle new transactions and produce new blocks (if validator)
  • Execute and validate newly received blocks
  • Verify the state of every account

For most use cases, you do not need to run a node yourself. You can interact with BNB Chain through an RPC endpoint, which is the interface that wallets, dApps, and backend services use to send transactions and query data.

BNB node hardware and sync requirements

If you decide to run a node, the official documentation recommends the following minimum hardware for a full node:

  • CPU: 16-core or higher
  • RAM: 32 GB or more
  • Network: Stable connection with at least 5 MBps bandwidth
  • Disk: SSD with enough space for the chain data (hundreds of GB)

You also need to choose a sync mode. The default is full sync, which downloads and verifies every block. A faster option is a "fast node" that uses --tries-verify-mode none to skip state verification, which speeds up sync but sacrifices some consistency.

Here is an example command to start a BSC full node with geth:

./geth --config ./config.toml --datadir <datadir> --cache 10000 --tries-verify-mode none --history.logs 576000

You can download pre-built binaries and config files from the bnb-chain/bsc GitHub repository. After starting the node, you need to monitor its sync status and ensure it stays healthy.

How to connect to BNB Chain without running a node

If you do not want to operate a node, you can use an RPC provider. OnFinality offers a public endpoint for BNB Smart Chain mainnet:

https://bnb.api.onfinality.io/public

For the testnet, use:

https://bnb-testnet.api.onfinality.io/public

These endpoints are free to use and suitable for development and light production use. For higher throughput, you can get a dedicated node or a private RPC endpoint. See the BNB Chain network page for more details.

Setting up a wallet or dApp to use BNB RPC

When configuring a wallet or dApp, you need the chain ID and RPC URL. For BNB Smart Chain mainnet:

For testnet:

Here is an example of adding BNB Chain to MetaMask programmatically:

await window.ethereum.request({
  method: 'wallet_addEthereumChain',
  params: [{
    chainId: '0x38', // 56 in hex
    chainName: 'BNB Smart Chain',
    nativeCurrency: { name: 'BNB', symbol: 'BNB', decimals: 18 },
    rpcUrls: ['https://bnb.api.onfinality.io/public'],
    blockExplorerUrls: ['https://bscscan.com']
  }]
});

Making JSON-RPC calls to a BNB node

Once you have an endpoint, you can make standard Ethereum JSON-RPC calls. For example, to get the current block number:

curl -X POST https://bnb.api.onfinality.io/public \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

To get the balance of an address:

curl -X POST https://bnb.api.onfinality.io/public \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...", "latest"],"id":1}'

You can also use libraries like ethers.js or viem to interact with the chain. Here is an example with ethers.js:

const { ethers } = require('ethers');

const provider = new ethers.JsonRpcProvider('https://bnb.api.onfinality.io/public');

async function getBlock() {
  const blockNumber = await provider.getBlockNumber();
  console.log('Current block:', blockNumber);
}

getBlock();

Common pitfalls when running a BNB node

Running a node comes with several challenges:

  • Sync time: A full sync can take days. Using a snapshot can speed this up significantly.
  • Disk space: The chain grows quickly. Monitor disk usage and plan for expansion.
  • Peer connectivity: If you have no peers, check your firewall and network configuration.
  • Upgrades: You need to keep your client updated to stay on the correct chain.
  • Backup: Regularly back up your node data to avoid losing state.

If you encounter issues, the BNB Chain documentation has a troubleshooting section, but many teams find it easier to rely on a managed service to avoid these problems.

When to use a dedicated BNB node

If your application has high traffic or requires low latency, a dedicated node may be worth the investment. OnFinality offers dedicated nodes for BNB Chain, giving you exclusive access to a node with guaranteed resources. This is useful for:

  • High-frequency trading bots
  • Analytics platforms that query large amounts of data
  • Applications with strict uptime requirements

With a dedicated node, you can also enable archive data if you need historical state. See dedicated node for more information.

Key Takeaways

  • A BNB node is a client that stores BNB Smart Chain state and processes transactions.
  • Running your own node requires significant hardware and maintenance.
  • For most applications, using a managed RPC service like OnFinality is more practical.
  • OnFinality provides public endpoints for BNB mainnet and testnet, plus dedicated options for production workloads.
  • Always consider your traffic, latency, and operational capacity when choosing between running a node and using a provider.

Frequently Asked Questions

What is the difference between a full node and an archive node?

A full node stores the current state and can verify new blocks. An archive node also stores historical state, allowing queries at any past block. Archive nodes require more disk space.

Can I run a BNB node on Windows?

Yes, but Linux is recommended for better performance and stability. The official documentation supports Mac OS X and Linux.

How long does it take to sync a BNB node?

It depends on your hardware and sync mode. A fast sync can take several hours, while a full sync may take days. Using a snapshot can reduce the time significantly.

Is it free to use the OnFinality public BNB endpoint?

Yes, the public endpoint is free for development and light use. For higher usage, you can upgrade to a paid plan. See RPC pricing for details.

What is the chain ID for BNB Smart Chain?

The chain ID is 56 for mainnet and 97 for testnet.

Can I use WebSocket with the OnFinality BNB endpoint?

Yes, OnFinality supports WebSocket for BNB Chain. You can use it for real-time subscriptions. See the BNB Chain network page for the WebSocket URL.

Do I need to run a node to build on BNB Chain?

No, you can use an RPC provider to interact with the chain. Running a node is only necessary if you need direct access or want to become a validator.

How do I get testnet BNB for testing?

You can use the BNB Chain faucet to get testnet BNB. The testnet RPC endpoint is available at https://bnb-testnet.api.onfinality.io/public.

What are the hardware requirements for a BNB node?

A minimum of 16-core CPU, 32 GB RAM, and a fast SSD is recommended. The exact requirements depend on your node type (full, fast, or archive).

Can I use OnFinality for other networks?

Yes, OnFinality supports many networks. See the supported networks page for the full list.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started