Setting up a Casper Node

Welcome to the Casper guide for setting up a casper node to join to the casper network! This guide will cover prerequisites for running a node, the different networks in the Casper ecosystem, and links to the official set-up guides for building a casper-node.

Prerequisites for installation

You can see the recommended hardware specs for a casper node on the Casper official docs site, here. As of this writing, the system requirements are:

  • 4 Cores
  • 32 GB RAM
  • 1 TB disk (Both SSDs and HDDs work, but SSDs perform initial sync much faster.)
  • System OS of Ubuntu 18.04, 20.04, or (not officially supported binaries yet but functional) Redhat CentOS.

Pre-installation tips

When starting to build the casper-node, ensure you are not running the commands as root or casper users, as this will have several repercussions. Running as root will cause file permissions issues and the casper-node installed casper user to not be able to see various files crucial to the operation of the casper node. The normal installation instructions will create the user casper which is a no-login user account used by the casper-client / casper-node.

Running as a non-root user, ensuring your system and software is up to date before beginning installation is always recommended.

Installation

There are several guides available outlining how to set up a casper node. The casper-test TestNet instructions available via cspr.community provide instructions on running a node either locally on physical hardware or virtually on AWS.

Cspr.community also includes mainnet installation instructions which work well for setting up as well. You can also optionally follow the instructions located on the official Casper github wiki, found here.

Syncing to the network

Syncing to the network will take several hours. You can monitor your node’s synchronization progress by running the following command (also provided in the github wiki):

watch -n 5 ‘echo -n "Peer Count: "; curl -s localhost:8888/status | jq “.peers | length”; echo; echo “last_added_block_info:”; curl -s localhost:8888/status | jq .last_added_block_info; echo; echo “casper-node-launcher status:”; systemctl status casper-node-launcher’

Compare the “last_added_block_info” block height to cspr.live. Until your node has reached the same block as shown on the block explorer, your node’s RPC port (port 7777) will not be available to make deploys to.

Check out our other guides for helpful commands to monitor and administer to your node.

Hi, what is the current hardware requirements/sugestions to set up a Casper node and load all the mainnet data at the shortest time?

Hope to hear from you soon.
Thank you!

Which ports are needed to be open to start mainnet data load to the Casper node?

Hi @cryptoland, you can see our current system specs for running a node here:

Right now we do not have snapshots available or fast sync enabled, so depending on network conditions of your node and distance to other nodes on the network, sync can take a few days. In version 1.5.0 we are implementing fast sync which will bring sync time down to a matter of a couple of hours.

You will need to have port 35000 open to gossip blocks and receive blocks from peers on the network. The other ports that can be opened at your discretion are: 7777 for the RPC api, to send deploys to (like adding a bid to the validator auction), 8888 for status endpoint and 9999 for the event stream. You can limit public access to these ports any way you see fit without affecting node operation. If you plan to send smart contract deployments or bond your node to the network by adding a bid in the validator auction, ensuring you have access to port 7777 is a good idea.

Keeping port 8888 publicly available does allow anyone to query your node, but does give the support team here at Casper the ability to check on the current info of the node on the fly.

Hope this helps!

Hi,

After all the mainnet data is loaded on the node, I would like to learn how we can access the mainnet data on casper node on our VM server. I plan to send this data to another tool that process data as streams and wonder what kind of connector we need to set up this pipeline. That’s why I wanted to ask how we can access Casper blockchain data on the node that we’ve set up.

Hope to hear from you soon.
Thank you!