# MASTERNODE

### **VPS REQUIREMENTS**

<div align="left"><figure><img src="https://2563283578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ3XU2pgITbQ6SZ7MFGOr%2Fuploads%2FHfSgjBQ64mICv5m7v70V%2Fimage.png?alt=media&#x26;token=358ade8e-7c52-49d2-a3de-c5aafa1bb090" alt=""><figcaption></figcaption></figure></div>

### STEP 1

Open your Windows wallet.

**Go to Tools -> Debug console.**

### STEP 2

Type the following RPC command, to create an address for the masternode fee:

<pre><code><strong>getnewaddress
</strong></code></pre>

Example output

```
VMUZkjrvq7hTkSpMQcU6zbjbCgJsVxX5tS
```

Send 1 to yourself for masternode fee

```
sendtoaddress "VMUZkjrvq7hTkSpMQcU6zbjbCgJsVxX5tS" 1
```

Wait until the transaction is confirmed.

### STEP 3

Type the following RPC command, to create an address for the masternode collateral:

```
getnewaddress
```

Example output

```
VKTAS7Qcts11JzxGpzwdQuZ6z7G5KKP8fK
```

Send **14,000** to yourself for masternode collateral.

```
sendtoaddress "VKTAS7Qcts11JzxGpzwdQuZ6z7G5KKP8fK" 14000
```

Example output

```
618599438df959fc0647ad1895808ba0fef96282bf24eb177134cb0c329c8d41
```

Wait until the transaction is confirmed.

### STEP 4

Generate a BLS key pair with the the following RPC command:

```
bls generate
```

\
Example output

```
{
 ""secret"": "5120af1f913b8a4b459e19cc3ef3f865ba891404853fa317f348635b347e12ef",
 ""public"": "050564992464a87643d273e87334fda1e8beb52e9605b9cef2fe73eb3a063f12c8f03a6fa4f07e26a1e9e5175e155c91"
}

```

####

### STEP 5

Type the following RPC command, to create an address for the **owner of the masternode**:

```
getnewaddress
```

\
Example output

```
VBefgFB8Jd7ih78T7bLtLYVki7cctwnVNa
```

Type the following RPC command, to create an address for used for **proposal voting**:

```
getnewaddress
```

\
Example output

```
VG8djvdj6iK12mG592oMF7S4uk7uWMnate
```

Type the following RPC command, to create an address to receive the **masternode reward**:

```
getnewaddress
```

\
Example output

```
VJ9ZZHsUwvPhQoYVD2QoqttscX4w38fPvM
```

####

### STEP 6

Prepare the ProRegTx transaction by modifying the following line.

```
protx register_prepare 618599438df959fc0647ad1895808ba0fef96282bf24eb177134cb0c329c8d41 1 120.32.45.65:23566 VBefgFB8Jd7ih78T7bLtLYVki7cctwnVNa 050564992464a87643d273e87334fda1e8beb52e9605b9cef2fe73eb3a063f12c8f03a6fa4f07e26a1e9e5175e155c91 VG8djvdj6iK12mG592oMF7S4uk7uWMnate 0 VJ9ZZHsUwvPhQoYVD2QoqttscX4w38fPvM VMUZkjrvq7hTkSpMQcU6zbjbCgJsVxX5tS
```

618599438df959fc0647ad1895808ba0fef96282bf24eb177134cb0c329c8d41 - **Transaction id from the RPC command.**\
\&#xNAN;*1* - **Single digit from the RPC command**\
\&#xNAN;*120.32.45.65:*&#x32;3566 - **External IPv4 address of your VPS.**\
VBefgFB8Jd7ih78T7bLtLYVki7cctwnVNa - **Address of the owner of the masternode.**\
050564992464a87643d273e87334fda1e8beb52e9605b9cef2fe73eb3a063f12c8f03a6fa4f07e26a1e9e5175e155c91 - **“public” value from the RPC command “bls generate”.**\
VG8djvdj6iK12mG592oMF7S4uk7uWMnate - **Address used for proposal voting.**\
VJ9ZZHsUwvPhQoYVD2QoqttscX4w38fPvM - **Address to receive the masternode reward.**\
VMUZkjrvq7hTkSpMQcU6zbjbCgJsVxX5tS - **Address to where you send the masternode amount fee.**

\\

Paste the modified line into your console.\
Example output

```
{
  "tx": "0300010001fa465b0d9d319a0f6ff38fc903ecd803bafd899174131bc1edc7d866ce0a46d80100000000feffffff011763cd1d000000001976a9141768978c8ce31902d8845b5c185db0972741818088ac00000000d1010000000000fe9c2bccf9fcb188ce8078aa1c496c16782f21b8aebf58301ddf82a664981ff00100000000000000000000000000ffff78202d413703965472883ee5be47be1208fbd6aaf6444e5b1743f154096a09b6ea0632d1031b073ffd92385b6900004d2716184c93ca66a84fa9b87d7893f689c300297a7f115893d645f4912e1c1f5b1863c5e02cc6afda4fadfa6e00001976a914878a033e118186c213c30c26e0ab76ed841a01a188acdf6c8935e4d656b99c9456472d02b49cc7515ac5b89512a811fbd884cbdd4140d00",
  "collateralAddress": "VKTAS7Qcts11JzxGpzwdQuZ6z7G5KKP8fK",
  "signMessage": "VJ9ZZHsUwvPhQoYVD2QoqttscX4w38fPvM|0|VBefgFB8Jd7ih78T7bLtLYVki7cctwnVNa|VG8djvdj6iK12mG592oMF7S4uk7uWMnate|21ggjfc3eda3eb6321011435yf4333ea94bedc327d17fff8640fabbddee284d1"
}
```

####

### STEP 7

Sign the ProRegTx transaction by modifying the following line.

```
signmessage "VKTAS7Qcts11JzxGpzwdQuZ6z7G5KKP8fK" "VJ9ZZHsUwvPhQoYVD2QoqttscX4w38fPvM|0|VBefgFB8Jd7ih78T7bLtLYVki7cctwnVNa|VG8djvdj6iK12mG592oMF7S4uk7uWMnate|21ggjfc3eda3eb6321011435yf4333ea94bedc327d17fff8640fabbddee284d1"
```

\
VKTAS7Qcts11JzxGpzwdQuZ6z7G5KKP8fK- **“collateralAddress” value from the RPC command “protx register\_prepare”.**\
VJ9ZZHsUwvPhQoYVD2QoqttscX4w38fPv&#x4D;*|0|*&#x56;BefgFB8Jd7ih78T7bLtLYVki7cctwnVN&#x61;*|*&#x56;G8djvdj6iK12mG592oMF7S4uk7uWMnat&#x65;*|21ggjfc3eda3eb6321011435yf4333ea94bedc327d17fff8640fabbddee284d1* - **“signMessage” value from the RPC command “protx register\_prepare”.**

Paste the modified line into the console of your wallet.

Example output

```
ILrWvvZRZeZhnfFtNwd087rwGsiPJH28GfmoPfjSDhUcEY+joeUd82/lqVnO0FD0V1L8vpjYju92fjMPITVScGI=
```

### STEP 8

submit the ProRegTx transaction by modifying the following line.

```
protx register_submit 0300010001fa465b0d9d319a0f6ff38fc903ecd803bafd899174131bc1edc7d866ce0a46d80100000000feffffff011763cd1d000000001976a9141768978c8ce31902d8845b5c185db0972741818088ac00000000d1010000000000fe9c2bccf9fcb188ce8078aa1c496c16782f21b8aebf58301ddf82a664981ff00100000000000000000000000000ffff78202d413703965472883ee5be47be1208fbd6aaf6444e5b1743f154096a09b6ea0632d1031b073ffd92385b6900004d2716184c93ca66a84fa9b87d7893f689c300297a7f115893d645f4912e1c1f5b1863c5e02cc6afda4fadfa6e00001976a914878a033e118186c213c30c26e0ab76ed841a01a188acdf6c8935e4d656b99c9456472d02b49cc7515ac5b89512a811fbd884cbdd4140d00 ILrWvvZRZeZhnfFtNwd087rwGsiPJH28GfmoPfjSDhUcEY+joeUd82/lqVnO0FD0V1L8vpjYju92fjMPITVScGI=
```

0300010001fa465b0d9d319a0f6ff38fc903ecd803bafd899174131bc1edc7d866ce0a46d80100000000feffffff011763cd1d000000001976a9141768978c8ce31902d8845b5c185db0972741818088ac00000000d1010000000000fe9c2bccf9fcb188ce8078aa1c496c16782f21b8aebf58301ddf82a664981ff00100000000000000000000000000ffff78202d413703965472883ee5be47be1208fbd6aaf6444e5b1743f154096a09b6ea0632d1031b073ffd92385b6900004d2716184c93ca66a84fa9b87d7893f689c300297a7f115893d645f4912e1c1f5b1863c5e02cc6afda4fadfa6e00001976a914878a033e118186c213c30c26e0ab76ed841a01a188acdf6c8935e4d656b99c9456472d02b49cc7515ac5b89512a811fbd884cbdd4140d00 **- “tx” value from the RPC command “protx register\_prepare”.**

ILrWvvZRZeZhnfFtNwd087rwGsiPJH28GfmoPfjSDhUcEY+joeUd82/lqVnO0FD0V1L8vpjYju92fjMPITVScGI= **- Output from the RPC command “signmessage”.**

Paste the modified line into the console of your wallet.

Example output

```
9c76272b7ef2a7456c84158424eb138bd3636b09aa2beae973bbed921f1f7868
```

&#x20;

### Setup VPS&#x20;

&#x20;

### **1. Update the server**

```
sudo apt update && sudo apt upgrade -y
```

### **2. Add SWAP**&#x20;

Add 2GB of SWAP First check to make sure there is not already swap active:

```
free -h
```

If the return is 0, you should create and activate the SWAP. Swap: 0B 0B 0B Create SWAP and Activate (only if required):

```
sudo dd if=/dev/zero of=/swapfile bs=1k count=2048k sudo chmod 600 /swapfile
```

```
sudo mkswap /swapfile sudo swapon /swapfile
```

```
sudo echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab sudo sysctl -w vm.swappiness=10
```

```
sudo echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
```

\
The return of the echo should be: swappiness = 10&#x20;

### **3. Firewall**

**Enable firewall & open ports First check to make sure there is not already swap active:**

```
apt install ufw -y
ufw default deny incoming 
ufw default allow outgoing 
ufw allow ssh
ufw allow 23566/tcp 
ufw enable
```

### **4. Install Fail2Ban**

```
sudo apt install fail2ban -y
```

```
sudo nano /etc/fail2ban/jail.local
```

\
Copy and paste the following config into the file:

```
[sshd]
enabled = true 
port = 22 
filter = sshd
logpath = /var/log/auth.log 
maxretry = 3
```

**Restart fail2ban:**

```
sudo systemctl restart fail2ban
```

Reboot the server:

```
sudo reboot
```

### **5. Daemon Configurations**

Download latest daemon & Configurations

```
mkadir vortexa

cd  vortexa

wget https://github.com/AIVortexa/vortexa/releases/download/0.36.2.4/vortexa-linux-0.36.2.4.tar.gz

tar -xvf vortexa-linux-0.36.2.4.tar.gz

chmod +x *
```

&#x20;

Create vortexacore folder

```
mkdir ~/.vortexacore && touch ~/.vortexacore/vortexa.conf
```

```
nano ~/.vortexacore/vortexa.conf
```

Copy and paste the following config into the file:&#x20;

```
rpcuser=CHOOSEYOURUSERNAME (Choose custom & safe username)
rpcpassword=CHOOSEYOURPASSWORD (Choose custom & safe password)
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
maxconnections=125
masternode=1
masternodeblsprivkey=5120af1f913b8a4b459e19cc3ef3f865ba891404853fa317f348635b347e12ef
externalip=XXX.XXX.XXX.XXX
```

Save the file with the keyboard shortcut ctrl + x.

&#x20;

XXX.XXX.XXX.XXX **- External IPv4 address of your VPS**.\
5120af1f913b8a4b459e19cc3ef3f865ba891404853fa317f348635b347e12e&#x66;**- “secret” value from the RPC command “bls generate”.**

Type the following command to start your masternode:\
./vortexad -daemon

\
&#x20;
