# Become a Validator Node Operator

During the PoA period (approximately one year), Validators will be accepted by approval only. To apply to be a validator on SatoshiChain, [please fill out this form](https://docs.google.com/forms/d/e/1FAIpQLSfveEVTMNvbhDobbDSDCpy6uQTskXGzZojpGcpVt-k3CBtxcw/viewform?usp=sf_link). \ <br>

This manual provides step-by-step instructions on how to set up and run a validator node, as well as best practices and important considerations for operating a successful and secure validator.

{% hint style="info" %}
Minimum server requirements should be as listed below for testing phase:

&#x20;

•4 core CPU, 8 GB RAM, 100GB SSD or Nvme storage

•Linux Ubuntu Server 22.04 (LTS) x64 OS

•Screen service installed

•Node is installed (version v12 or newer)

•zip service installed

•git installed

•Should be open port 1478 in your network\
\
\&#xNAN;*For both installation we will share prepareNode.zip file.*
{% endhint %}

## Automatic Installation (recommended)

We created a ZIP file to prepare a node. You need to upload this ZIP file to the server and unzip it. Required SSH commands are as below.

Our node folder is /home/satoshiNode. In this tutorial (if you are not root user, you need to use "\~/" instead of "/home/" path from commands. Only use like: mkdir satoshiNode).

Server commands after connecting ssh(as root):

* *mkdir /home/satoshiNode*
* *cd /home/satoshiNode*
* *upload prepareNode.zip file to /home/satoshiNode folder*
* *unzip prepareNode.zip*
* *chmod +x prepareNodeforPOS.sh*
* *./prepareNodeforPOS.sh*
* *Write your server public IP address there and press enter*

After IP address is entered the script will manage all and run the node automatically. When the process will be completed “All done!" message will be displayed.

## Manual Installation

### To setup services:

Node JS:

```
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
```

Screen:

```
apt install screen -y
```

Git:

```
apt install git -y
```

Zip:

```
apt install zip -y
```

Create validator folder and upload chain files:

```
mkdir ~/satoshiNode
cd ~/satoshiNode

```

*Upload prepareNode.zip file to \~/satoshiNode/ folder*

```
unzip prepareNode.zip
```

You should have below 4 files for installation:

* &#x20; satoshi-blockchain
* &#x20;faucet
* &#x20;genesis.json
* &#x20;pub-staking.zip

We need to make below files executable:

```
chmod +x satoshi-blockchain
chmod +x faucet
chmod +x genesis.json
```

Now create Satoshi Chain files and export validator info (Public wallet address, BLS Public address and NodeID) to secrets.txt:

```
./satoshi-blockchain secrets init --data-dir data > secrets.txt
```

Run below command to get 100 SATS in your wallet, we will use 1 SATS in stake stage:

<pre><code><strong>./faucet -wallet VALIDATOR_PUBLIC_WALLET_ADDRESS(from secrets.txt)
</strong></code></pre>

Add your public server IP address instead of **serverIP** in command and run your node as validator. We can call this as your validator start command:

```
screen -L -A -m -d -S satoshi-posNode ./satoshi-blockchain server --price-limit 500000000000000 --data-dir ./data --chain genesis.json --libp2p 0.0.0.0:1478 --nat serverIP --seal
```

System will start to sync all blocks in network, you need to wait to finish sync. You can check blocks with below command and go to next-step after see latest blocks(you can check current blocks from explorer):

<pre><code><strong>tail -f screenlog.0
</strong></code></pre>

Unzip smart contracts to server for stake and register your validator:

```
unzip pub-staking.zip
cd pub-staking
```

Now you need to create environment variables to declare your validator:

Create .env file using vi command or any editor you want like Nano. Press A for edit file. You can use CTRL + C and type :wq and enter to save added variables.

```
vi .env
```

Paste below variables in .env file, change PRIVATE\_KEYS and BLS\_PUBLIC\_KEY and save file:

```
JSONRPC_URL=https://rpc.satoshichain.io
PRIVATE_KEYS=VALIDATOR_PRIVATE_KEY(from ../data/consensus/validator.key)
STAKING_CONTRACT_ADDRESS=0x0000000000000000000000000000000000001001
```

Install all modules:

```
npm i
```

Stake as validator:

```
npm run stake
```

Move to the parent directory of current directory:

```
cd ..
```

Check if validator command works right. If you see there "satoshi-posNode" after execute below command means validator app working fine:

<pre><code><strong>screen -ls
</strong></code></pre>

You can see logs via tail command:

```
tail -f screenlog.0
```

If you want to stop your validator app:

```
screen -S satoshi-posNode -X quit
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://satoshichain.gitbook.io/satoshi-chain/become-a-validator-node-operator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
