Running a NEAR RPC Node
Requirements ๐โ
Before you start, ensure that your machine meets the following minimum requirements:
- Recommended
- Minimum
CPU: 8-Core (16-Thread) Intel i7/Xeon or equivalent with AVX support
RAM: 20GB DDR4
Storage: 1TB SSD - NVMe SSD recommended
OS: MacOS / Linux
CPU: 8-Core (16-Thread) Intel i7/Xeon or equivalent with AVX support
RAM: 12GB DDR4
Storage: 500GB SSD
OS: MacOS / Linux
Install ๐ฅโ
Get nearcore
โ
Clone the NEAR nearcore
repo to your machine and switch to it.
git clone https://github.com/near/nearcore
cd nearcore
git fetch origin --tags
Get the latest release.
git checkout tags/<RELEASE TAG HERE> -b mynode
Compile the latest stable releaseโ
Ensure you're in the correct folder (/nearcore/
) & run the following command:
make release
make release
will cause the nearcore
to compile. Compilation is a time-intensive process and can take ~30 minutes or longer on recommmended hardware.
Configure the release folderโ
With one command you can create the required directory structure -- generating a config.json, node_key.json, and downloading a genesis.json for your respective chain-id choice.
- ๐ Mainnet
- ๐งช Testnet
./target/release/neard --home ~/.near init --chain-id mainnet --download-genesis --download-config
./target/release/neard --home ~/.near init --chain-id testnet --download-genesis --download-config
Start your Node! ๐โ
Run the following command to initiate your node!
# Get a data backup
aws s3 --no-sign-request cp s3://near-protocol-public/backups/mainnet/rpc/latest .
LATEST=$(cat latest)
aws s3 --no-sign-request cp --no-sign-request --recursive s3://near-protocol-public/backups/mainnet/rpc/$LATEST ~/.near/data
# Start the Node!
./target/release/neard --home ~/.near run
Configure your Provider ๐งโ
After you've gotten things together with your node. You can set things in motion with a provider. Use the following template(s) to set up your provider config file:
- ๐ Mainnet Example
- ๐งช Testnet Example
endpoints:
- api-interface: jsonrpc
chain-id: NEAR
network-address:
address: "127.0.0.1:port"
disable-tls: true
node-urls:
- url: https://endpoint/mainnet/erpc
metrics-listen-address: ":port"
endpoints:
- api-interface: jsonrpc
chain-id: NEART
network-address:
address: "127.0.0.1:port"
disable-tls: true
node-urls:
- url: https://endpoint/testnet/erpc
metrics-listen-address: ":port"
NEAR ipRPC ๐ชโ
Want to reach more developers and get more rewards as a node runner? NEAR offers Incentivized Public RPC (ipRPC) endpoints to developers in its ecosystem. By signing up here, you can be first in line to being one of our premier providers contributing to decentralized public goods. Sign up now!
Setup your Provider on Lava Network ๐โ
Once youโve been accepted - to set up your provider on the Lava Network, you can refer to the provider setup documentation available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node on the Lava Network.