Skip to main content

How to run a node

Clone and Build

The darwinia-network/darwinia repo's master branch contains the latest Darwinia code.

$ git clone https://github.com/darwinia-network/darwinia.git
$ cd darwinia && cargo build --release

Alternatively, if you wish to use a specific release, you can download the binary from release page.(v0.11.4 in the example below):

$ wget https://github.com/darwinia-network/darwinia/releases/download/v0.11.4/darwinia-x86_64-linux-gnu.tar.bz2

Run

Linux / MacOS

$ ./darwinia --name my-crab-node --chain crab

Add the --ws-external and --rpc-cors all options if you want to remotely connect to this node:

$ ./darwinia --name my-crab-node --chain crab --ws-external --rpc-cors all

Docker

$ docker run -it -v node-data:/darwinia/data quay.io/darwinia-network/darwinia:v0.11.4 --base-path /darwinia/data --name my-crab-node --chain crab

Add the --ws-external and --rpc-cors all options and map out the rpc ports if you want to remotely connect to this node:

$ docker run -it -v node-data:/darwinia/data quay.io/darwinia-network/darwinia:v0.11.4 --base-path /darwinia/data -p 9933:9933 -p 9944:9944 --name my-crab-node --chain crab --ws-external --rpc-cors all

View all parameter descriptions:

$ ./darwinia --help

It is recommended to use systemctl, pm2, tmux, screen and other tools to maintain the process.