Become a NEAR Chunk Producer: AWS edition
Nightshade Phase 1 adds a new type of validator- the chunk-only producer. Because of lower hardware requirements, you can run a node on AWS to produce chunks and earn network rewards.
Budgeting the cost
- Visit the AWS Price Estimator to find the right virtual machine and its running cost.
- Set CPU workload as constant usage.
- Select 4 CPU cores and 16 GB RAM. Unfortunately, the best option is an ARM processor, so we pick t3a.xlarge.
- Select 500 GB as EBS storage.
We have two options for pricing-
- On-demand: $159.79 USD monthly, $1917.50 USD annually.
- Upfront (1 year): $1,289.41 USD annual. You can pick a 3 year period for more savings.
Running a cloud validator may not be cost efficient long term. The cost of on premise hardware is around $300 USD. However, cloud can be a good choice for quickly spinning up a backup node in case of an outage.
- Log into AWS console and navigate to EC2 (Elastic Cloud Compute). Press ‘Launch Instance’.
- Select Ubuntu, 64 bit x86
- Instance type as t3a.xlarge
- Generate a keypair to connect to the server with SSH.
- Create a security group allowing traffic from anywhere.
- Select 500 GB hard disk
- Launch the instance. It will take you to the instances page. Wait for a while for the instance to be initialized.
- Connect to your instance once it is live. You can use EC2 Instance Connect for a browser based shell, or your local SSH client.
Wallet and staking pool setup
- Sign up for a shardnet wallet on your local PC by visiting https://wallet.shardnet.near.org. You will receive a token airdrop which will be enough for the validator setup.
- Enter these commands in the SSH CLI to setup your wallet and staking pool.
Compile and configure the NEAR node to run the validator.
We need to set the validator key. Copy the wallet key into the validator config folder using
cp ~/.near-credentials/shardnet/validatoor.shardnet.near.json ~/.near/validator_key.json
Edit the validator key file to make two changes:
validatoor.factory.shardnet.neari.e. to the staker contract address.
The file should look like
Finally we configure neard to run as a system service in the background:
- Create a new systemd config file with
vi /etc/systemd/system/neard.serviceand paste
Description=NEARd Daemon Service[Service]Type=simpleUser=validatoor#Group=nearWorkingDirectory=/home/validatoor/.nearExecStart=/home/validatoor/nearcore/target/release/neard runStandardOutput=file:/home/validatoor/.near/neard.logStandardError=file:/home/validatoor/.near/nearderror.logRestart=on-failureRestartSec=30KillSignal=SIGINTTimeoutStopSec=45KillMode=mixed[Install]WantedBy=multi-user.target
- Enable and start the service with
sudo systemctl enable neardsudo systemctl start neard
- To troubleshoot for logs
sudo apt install ccze # for colorjournalctl -n 100 -f -u neard | ccze -A
Moment of truth
If the setup is correct, your validator should be in the proposing state. It takes two epochs to become an active validator.
Arbitoor is NEAR’s premier liquidity aggregator. We aggregate best prices across exchanges like REF, Jumbo, Spin and Tonic. Mainnet is live on https://arbitoor.com
Follow the latest updates on Twitter.
Join our community on Discord.