This guide is testet on Ubuntu 20.04 and probably will work flawless on 18 as well.
It also implies that you are working under a user with sudo priveleges, to do so, run from root:
export NEWUSER=sora
adduser $NEWUSER
usermod -aG sudo $NEWUSER
echo "$NEWUSER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
su - $NEWUSER
If you're running from root, you know what you're doing for sure :)
- Install docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ${USER}
newgrp docker
sudo service docker restart
and docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- Clone this repository to your server
cd $HOME; git clone https://github.com/ama31337/sora-tips.git
- Create Sora working dir and copy docker-compose
mkdir -p ${HOME}/sora2/chain
sudo chown 10000:10000 ${HOME}/sora2/chain
cp ${HOME}/sora-tips/docker-compose.yml ${HOME}/sora2
- Edit your node name in docker-compose with your preffered text editor
vim ${HOME}/sora2/docker-compose.yml
or
nano ${HOME}/sora2/docker-compose.yml
- Create aliases
echo "" >> ~/.bashrc
echo "# sora aliases" >> ~/.bashrc
echo "alias sorastart='cd ${HOME}/sora2; docker-compose up -d'" >> ~/.bashrc
echo "alias sorastop='cd ${HOME}/sora2; docker-compose down'" >> ~/.bashrc
echo "alias soralogs='docker logs -f --tail=1000 sora-mainnet'" >> ~/.bashrc
source ~/.bashrc
- Start node
sorastart
Check logs
soralogs
Stop node
sorastop
You can check your node sync status on:
https://telemetry.polkadot.io/#/SORA
And interact with the network via our RPC on:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsora.lux8.net#/staking
To rotate node keys, run
docker exec $(docker ps -aqf "name=sora-mainnet") curl -s http://localhost:9933 -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}'
If you find this helpful, stake with us: https://lux8.net/sora
If you want your own RPC running on the node, check this guide: