Razor Go installation
Linux quick start​
Install razor-go
pre build binary directly from github and configure into host.
For linux-amd64
curl -sSL https://raw.githubusercontent.com/razor-network/razor-go/main/install.sh | bash
For linux-arm64
export PLATFORM=arm64
curl -sSL https://raw.githubusercontent.com/razor-network/razor-go/main/install.sh | bash
Check installation
razor -v
NOTE: To install the version you want, you can set VERSION: environment variable before running above command.
Docker quick start​
One of the quickest ways to get razor-go
up and running on your machine is by using Docker:
docker run -d \
-it \
--name razor-go \
-v "$(echo $HOME)"/.razor:/root/.razor \
razornetwork/razor-go
Note that we are leveraging docker bind-mounts to mount .razor
directory so that we have a shared mount of .razor
directory between the host and the container. The .razor
directory holds keys to the addresses that we use in razor-go
, along with logs and config. We do this to persist data in the host machine, otherwise you would lose your keys once you delete the container.
You need to set a provider before you can operate razor-go cli on docker:
docker exec -it razor-go razor setConfig -p <provider_url>
You can now execute razor-go cli commands by running:
docker exec -it razor-go razor <command>
Setting up razor-go with docker-compose​
You can build razor-go docker image by running:
docker-compose build
NOTE: Add platform: linux/x86_64 for Silicon based MAC in docker-compose.yml.
Run razor-go locally with:
docker-compose up -d
You can interact with razor:
docker exec -it razor-go razor ...