Join the Rootstock Discord Community to get the latest updates from the Rootstock Ecosystem!

Setup node on CentOS

Make sure your system meets the minimum requirements before installing RSK nodes on it.

Install RSK node in CentOS Distribution

Use the script below to install and run an RSK node on CentOS.

## Basic Steps to setup your CentOS environment and RSKJ Node.

## Install JAVA and WGET
sudo yum install java-1.8.0-openjdk epel-release wget jq -y

## ADD RSK User & Group
sudo adduser rsk

## Create APP Directories
sudo mkdir /var/lib/rsk
sudo mkdir /var/log/rsk
sudo mkdir /etc/rsk
sudo mkdir /usr/share/rsk
sudo chown rsk:rsk /var/log/rsk/
sudo chown rsk:rsk /var/lib/rsk/

## Download Latest RSK Release
wget -q -nv -O- 2>/dev/null |  jq -r '.assets[]' |grep browser |cut -d ":" -f 2,3 |tr -d \" |sudo wget -qi - -O /usr/share/rsk/rsk.jar

## Download RSK Config files.

sudo wget -O /etc/rsk/testnet.conf
sudo wget -O /etc/rsk/mainnet.conf
sudo wget -O /etc/rsk/regtest.conf
sudo wget -O /etc/rsk/logback.xml

## Set Default RSK Network

sudo ln -s /etc/rsk/mainnet.conf /etc/rsk/node.conf
### sudo ln -s /etc/rsk/testnet.conf /etc/rsk/node.conf
### sudo ln -s /etc/rsk/regtest.conf /etc/rsk/node.conf

## Create RSK systemd Service

cat << EOF | sudo tee /etc/systemd/system/rsk.service
Description=RSK Node

ExecStart=/usr/bin/java -Dlogback.configurationFile=/etc/rsk/logback.xml -Drsk.conf.file=/etc/rsk/node.conf -cp /usr/share/rsk/rsk.jar co.rsk.Start 2>&1 &
ExecStop=/bin/kill -9 $(/bin/ps -U rsk -o pid h)


## Enable RSK Service
sudo systemctl enable rsk.service

## Start RSK node
sudo service rsk start

By default, the node connects to Mainnet. To change the network choice, follow the instructions on Switching Networks. To change other configuration of the node, please refer to the instructions on RSK Node Configuration.

Receive updates

Get the latest updates from the Rootstock ecosystem