Skip to main content

Chasm Network

We run a node on Chasm Network and collect points (In this guide we will run 3 scouts!)

Ramcpudisk
1 GB1 Core5-20 GB SSD

Step 1: Mint NFT to Get Scout ID and API Key

Visit & mint 3 NFTs https://scout.chasm.net/private-mint

You need 0.3 $MNT on Mantle network in your wallet, you can obtain from squid

Screenshot_100

You will obtained WEBHOOK_API_KEY and SCOUT_UID from here.

Step 2: Get Groq API Key

Sign up for an account at Groq to get GROQ_API_KEY

Screenshot_99

Step 3: Optional: Get OpenRouter & OpenAI API keys

This step is optional

  • OpenRouter for OPENROUTER_API_KEY

  • OpenAI for OPENAI_API_KEY

  • You can buy phone-numbers for OpenAI here by crypto

Step 4: Install Dependecies

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

# Install Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Step 5: Setup

5-1: Enter root

cd ~

5-2: Create and config .env file

nano .env

Copy the following config in your .env file and then update following variables in front of =

  • SCOUT_NAME: Your favorite scout name
  • SCOUT_UID: From Step 1: Mint NFT
  • WEBHOOK_API_KEY: From Step 1: Mint NFT
  • WEBHOOK_URL: Replace your http://| Update with your vps's IP and port | e.g. http://x.x.x.x:3001/
  • GROQ_API_KEY: From Step 2: Get Groq API Key
  • OPENROUTER_API_KEY: Step 3 (optional)
  • OPENAI_API_KEY: Step 3 (optional)
PORT=3001
LOGGER_LEVEL=debug

# Chasm
ORCHESTRATOR_URL=https://orchestrator.chasm.net
SCOUT_NAME=myscout
SCOUT_UID=
WEBHOOK_API_KEY=
WEBHOOK_URL=

# Chosen Provider (groq, openai)
PROVIDERS=groq
MODEL=gemma2-9b-it
GROQ_API_KEY=

# Optional
OPENROUTER_API_KEY=
OPENAI_API_KEY=

NODE_ENV=production

To save .env file and exit: Ctrl + X + Y , Enter

Create more .env files

cp .env 2.env
cp .env 3.env
nano 2.env

Update the following config in your .env file with your 2nd scouts data :

PORT=3002
LOGGER_LEVEL=debug

# Chasm
ORCHESTRATOR_URL=https://orchestrator.chasm.net
SCOUT_NAME=myscout2
SCOUT_UID=
WEBHOOK_API_KEY=
WEBHOOK_URL=//x.x.x.x:3002/

# Chosen Provider (groq, openai)
PROVIDERS=groq
MODEL=gemma2-9b-it
GROQ_API_KEY=

# Optional
OPENROUTER_API_KEY=
OPENAI_API_KEY=

NODE_ENV=production

Do the same thing for your 3rd scout :

nano 3.env

Update the following config in your .env file with your 2nd scouts data :

PORT=3003
LOGGER_LEVEL=debug

# Chasm
ORCHESTRATOR_URL=https://orchestrator.chasm.net
SCOUT_NAME=myscout3
SCOUT_UID=
WEBHOOK_API_KEY=
WEBHOOK_URL=//x.x.x.x:3003/

# Chosen Provider (groq, openai)
PROVIDERS=groq
MODEL=gemma2-9b-it
GROQ_API_KEY=

# Optional
OPENROUTER_API_KEY=
OPENAI_API_KEY=

NODE_ENV=production

5-3: Run the scouts

# Open Port
sudo ufw allow 3001
sudo ufw allow 3002
sudo ufw allow 3003

# Pull the code from DockerHub
docker pull johnsonchasm/chasm-scout
docker pull docker pull chasmtech/chasm-scout

# Start the docker file
docker run -d --restart=always --env-file ./.env -p 3001:3001 --name scout johnsonchasm/chasm-scout
docker run -d --restart=always --env-file ./2.env -p 3002:3002 --name scout2 johnsonchasm/chasm-scout
docker run -d --restart=always --env-file ./3.env -p 3003:3003 --name scout3 chasmtech/chasm-scout

6: Verify

6-1: Test Server Response:

# Should get "OK" response
curl localhost:3001
curl localhost:3002
curl localhost:3003

6-2: Test LLM

source ./.env
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WEBHOOK_API_KEY" \
-d '{"body":"{\"model\":\"gemma-7b-it\",\"messages\":[{\"role\":\"system\",\"content\":\"You are a helpful assistant.\"}]}"}' \
$WEBHOOK_URL

6-3: Logs

docker logs scout
docker logs scout2
docker logs scout3

Check leaderboard

https://scout.chasm.net/leaderboard

Optional: Kill and stop docker

docker stop scout && docker rm scout
docker stop scout2 && docker rm scout2
docker stop scout2 && docker rm scout2

Optional: Restart Docker

docker restart scout
docker restart scout2
docker restart scout3