Run an RPC Node
An RPC node provides JSON-RPC and WebSocket endpoints for developers, dApps, indexers, infrastructure providers, and testing or integration environments. RPC nodes do not validate blocks and do not require staking.
RPC nodes should not expose consensus ports publicly and must follow strict security practices.
1. System Requirements
Recommended:
- OS: Ubuntu 22.04 LTS
- CPU: 4 cores
- RAM: 8–16 GB
- Storage: 500 GB+ NVMe SSD
- Network: High-bandwidth connection
- Dependencies: git, jq, curl, make, build-essential, pkg-config
- Go: v1.25+
Install dependencies:
2. Install Shardeum Node Binary
Verify:
3. Environment Variables
4. Initialize the Node
5. Copy Genesis File
6. Start and Sync the Node
Start:
Note: Ensure you are using the latest seeds or peers from the official repository or documentation. Without peers, the node may not sync.
Monitor:
Wait until fully synced.
7. Enable JSON-RPC
Edit $HOME/.testnet/$NODE_ID/config/app.toml:
Find the RPC section and set:
Restart your node if using systemd.
8. Optional: Enable gRPC and REST Endpoints
In app.toml:
Enable these only if required by your infrastructure or testing flow.
9. Firewall Configuration
Expose only the ports you actually need:
Do not expose port 26657 (Tendermint RPC) to the public. Restrict sensitive endpoints to localhost or trusted IPs.
10. systemd Service (Recommended)
Create service:
Example:
Enable:
11. Pruning
RPC nodes often use archive or custom pruning depending on their purpose.
For full historical state:
For lighter infrastructure:
Restart the node after changes.
12. Scaling RPC Nodes (Optional)
For higher traffic or team-based testing:
- Use load balancers such as Nginx, HAProxy, or AWS ELB
- Run multiple RPC nodes behind a reverse proxy
- Rate-limit requests to avoid overload
- Separate public RPC from internal infrastructure RPC
- Run indexing services in parallel if needed
13. Useful Commands
Check sync
Check network peers:
Check logs
Query JSON-RPC:
14. Troubleshooting
RPC endpoint not responding
- Confirm JSON-RPC is enabled in
app.toml - Confirm IP binding is correct
- Check firewall rules
- Check that the node is fully synced
High latency
- Reduce pruning burden if archive mode is unnecessary
- Increase hardware resources
- Add more RPC nodes behind a proxy
Node stuck catching up
- Check peers
- Restart node
- Verify time sync (NTP)
- Confirm you are using the correct testnet chain ID and genesis file
RPC Node Setup Complete
Your RPC node is operational and ready to serve JSON-RPC and WebSocket traffic for the Shardeum testnet.
Use this setup for:
- Testing environments
- dApp and wallet integrations
- Indexers and infra services
- Exchange and backend validation flows