Setup a Bootnode on CORD
Using Docker for Boot Node
Docker Info
π‘ Install Docker
Follow the official Docker installation guide here to set up Docker on your machine.π Post-installation steps for Docker
post-installation procedures here shows you how to configure your host machine to work better with Docker.
- Update and Upgrade packages
sudo apt update -y && sudo apt upgrade -y
- The following command creates a directory called βcordβ in the root directory, gives ownership of the directory to the user who executed the command, and grants rwx access on that directory.
sudo mkdir /cord && sudo chown $USER /cord && sudo chmod 777 /cord
- Generate node key and store it in
cord
directory
cd /cord && docker run -i -v $(pwd):/cord dhiway/cord:develop key generate-node-key --file /cord/node.key
- Download the chain specification into cord directory
#for linux:cd /cord && wget -c https://raw.githubusercontent.com/dhiway/confidex/main/confidex-alpha.json
#for mac:cd /cord && curl -O https://raw.githubusercontent.com/dhiway/confidex/main/confidex-alpha.json
- Run CORD using the following command. name-you-see-in-telemetry should be changed to name of your choice before running the command
sudo docker run --detach --restart unless-stopped -v /cord:/cord --name cord --network host dhiway/cord:develop --name name-you-see-in-telemetry --base-path /cord/ --chain /cord/confidex-alpha.json --node-key-file /cord/node.key --port 30333 --rpc-port 9933 --prometheus-port 9615 --rpc-methods=Safe --rpc-cors all --state-pruning 100 --blocks-pruning 100 --prometheus-external
- If the CORD is up and running, run the following command by replacing
secret seed
with the secret you generated during the account creation
sudo docker run -v /cord:/cord --rm dhiway/cord:develop \ key generate-session-keys \ --chain=/cord/confidex-alpha.json \ --suri "secret seed" \ -d /cord/
- Check logs
sudo docker logs container-id
To verify that your node is live and synchronized, head to https://telemetry.cord.network and find your node. Note that this will show all nodes on the CORD network, which is why it is important to select a unique name!