Setting up the dependencies

By using Docker

The easiest way to get started running a node is to provision a server and deploy the node with docker. We will assume you already have access to a server running a recent Ubuntu system.

Install docker

The official docker documentation has an extensive documentation on the subject, but in the event you want to fast forward this, here are the commands to use.
1
$ sudo apt update
2
$ sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
3
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4
$ sudo apt-key fingerprint 0EBFCD88
5
$ sudo add-apt-repository \
6
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
7
$(lsb_release -cs) \
8
stable"
9
$ sudo apt update
10
$ sudo apt install docker-ce docker-ce-cli containerd.io
11
$ sudo usermod -aG `whoami` docker
Copied!
Logout and log back in the server, you can now test your installation.
1
$ docker run hello-world
Copied!
If you don't have any errors you are all ready!

Setting up the files

Before running the node you need to create a specific folder to be accessed by the docker container. Indeed, for security reasons we lower the rights and accesses whatever is running inside it.
1
$ mkdir nodle && sudo chown -R 1000:1000 nodle
Copied!

Fetching the container

Head over to our repository and choose a version you want to use, then fetch it. Here is an example for the version master.
1
$ docker pull ghcr.io/nodlecode/chain:master
Copied!

Configuring an alias

Let's create a command alias to make your life easier when following the wiki, just use the following.
1
$ alias nodle-chain="docker run -v $(pwd)/nodle:/data ghcr.io/nodlecode/chain:master"
Copied!
You can also use this command to expose some ports, run the container in the background etc but this wiki is not a tutorial on how to use docker. If you are curious about this, feel free to check their excellent documentation.

By compiling from source

If you are feeling like it you can also go ahead and compile the code from source, but be warned, it does require some coffee while waiting for it to finish! ☕️

Install rust and tools

We hope your Linux skills and servers are not rusty, because we are going to start by installing rust and a few tools. We will assume you have a recent Ubuntu server running or equivalent. Your best shot is to follow along these commands. In addition to that, please make sure your environment is Substrate ready.
1
$ sudo apt update
2
$ sudo apt install curl build-essential git
3
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Copied!

Fetch our code

1
$ git clone https://github.com/NodleCode/chain
2
$ cd chain
Copied!

Setup your rust toolchain

We need to tweak a bit our toolchain in order to be able to compiled the code. Fortunately we have a script for this.
1
$ ./scripts/init.sh
Copied!

Time to BUIDL

Grab a stack of coffee, in our experience this will take around 30 minutes. It will fetch a bunch of dependencies and build everything.
1
$ cargo install --path node
Copied!
And that's all! It should setup your machine in order to create a nodle-chain command.
Last modified 4mo ago