Skip to content

Latest commit

 

History

History
100 lines (91 loc) · 2.56 KB

node.md

File metadata and controls

100 lines (91 loc) · 2.56 KB

Node setup guide

Notes

To save file and close nano editor press CTRL+X than SHIFT+Y than ENTER

Setup

Required OS: ubuntu 22.04+

Recommended OS: ubuntu 22.04 LTS

Required Software:

  1. Veil Node

Update packages

sudo apt update
sudo apt upgrade

Install packages

sudo apt install python3

Create user which will be used to run node

sudo adduser --disabled-password --gecos "" node

Download and unpack veil node (change version in link and command to actual)

sudo wget https://github.com/Veil-Project/veil/releases/download/v1.2.2.1/veil-1.2.2.1-x86_64-linux-gnu.tar.gz
sudo mkdir /home/node/veil
sudo tar -xzf veil-1.2.2.1-x86_64-linux-gnu.tar.gz -C /home/node/veil --strip-components 1

Create data directory

sudo mkdir /home/node/veil
sudo mkdir /home/node/veil/data

Download and unpack blockchain data

# replace 20210121-veil-snapshot-1055961 with actual snapshot version
sudo wget https://mirror-eu2.veil.tools/20210121-veil-snapshot-1055961.zip
sudo unzip 20210121-veil-snapshot-1055961.zip -d /home/node/veil/data
sudo chown -R node:node /home/node/veil/data

Generate rpcauth value with:

wget https://raw.githubusercontent.com/Veil-Project/veil/master/share/rpcauth/rpcauth.py
python3 rpcauth.py [noderpc_username] [noderpc_password]

rpcauth.py: https://github.com/Veil-Project/veil/blob/master/share/rpcauth/rpcauth.py

Create config default.conf

sudo nano /home/node/veil/default.conf

Add this content to opened file, change variables if required:

listen=1
server=1
rpcbind=127.0.0.1
rpcauth=[generated rpcauth string]
rpcport=5050
txindex=1

Register veil node as systemd service

sudo nano /etc/systemd/system/veil.service

Add this content to opened file, change variables if required:

[Unit]
Description=Veil Node
After=network.target

[Service]
User=node
Group=node
Type=forking
PIDFile=/home/node/veil/data/veil.pid
ExecStart=/home/node/veil/bin/veild -disablewallet -daemon -pid=/home/node/veil/data/veil.pid -conf=/home/node/veil/default.conf -datadir=/home/node/veil/data -txindex
Restart=always
RestartSec=5
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=5s
StartLimitInterval=120s
StartLimitBurst=15

[Install]
WantedBy=multi-user.target

Finilize service creation

sudo sudo chmod 664 /etc/systemd/system/veil.service
sudo systemctl daemon-reload
sudo systemctl start veil
sudo systemctl status veil

Done, now veil node is running as a background service.