Raspberry Pi 4 Setup

In order to use IdaNode on Raspberry you need to install the LYRA wallet following the installation guide for Raspberry Pi 4.

Now run the following commands from the Terminal:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7BF576066ADA65728FC7E70A8C47BE8E75BCA694

And add in etc/apt/sources.list:

deb http://ppa.launchpad.net/certbot/certbot/ubuntu bionic main deb-src http://ppa.launchpad.net/certbot/certbot/ubuntu bionic main

Now you can proceed with the following commands:

cd
git clone https://github.com/scryptachain/scrypta-idanodejs
cd scrypta-idanodejs
chmod 777 install.sh
./install.sh

with install.sh:

#WRITING CONF FILE
echo "rpcuser=lyrarpc
rpcpassword=lyrapassword
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
index=1
txindex=1
logtimestamps=1" > "/root/.lyra/lyra.conf"
#INSTALL NODEJS
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install pm2 -g
#INSTALL MONGODB
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
mkdir mongodb_data
#RESTORE MONGODB BOOTSTRAP
wget https://scrypta.sfo2.digitaloceanspaces.com/mongo_bootstrap_191001.tar.gz
mongod --dbpath=./mongodb_data &
sleep 20s
tar -xvzf mongo_bootstrap_191001.tar.gz
sudo mongorestore --db idanodejs --drop idanodejs
rm -rf idanodejs
pkill mongod
#DOWNLOADING NODE MODULES
npm install
cp example.env .env
#UPDATING NPM
npm install -g npm
#SETTING UP NGINX
sudo apt update
sudo apt install nginx -y
#INSTALL CERTBOT
sudo apt install python-certbot-nginx -y
pm2 startup
echo "NOW EDIT .env FILE AND RUN FOLLOWING COMMAND:"
echo "pm2 start npm -- start && pm2 save"

Now set the same rpcuser and rpcpassword and lyrapath in:

scrypta-idanodejs/.env

RPCUSER=my-username
RPCPASSWORD=my-password
RPCPORT=42223
RPCADDRESS=localhost
LYRAPATH=my-lyrad-path

and in:

.lyra/lyra.conf

rpcuser=my-username
rpcpassword=my-password

Well, now we can start Scrypta IdaNode:

cd ~/scrypta-idanodejs
npm run dev

... and the synchronization start!

Verify with http://localhost:3001/wallet/getinfo that everything is working properly.