๐Ÿฆ†Install Docker

0. Make sure Docker is installed

Official installation document

curl -fsSL get.docker.com | sudo bash

โ€ข If you are running docker commands using a non-root user, make sure it is in the docker group. To add the current user to docker group, run the following commands:

# Create the `docker` group
sudo groupadd docker

# Add your current user to the docker group.
sudo usermod -aG docker $USER

# Run the following command to activate the changes to groups
newgrp docker

# Verify that you can run docker commands without sudo
docker run hello-world

1. Download the Kusama snapshot

This step currently is not easily executable. You can also skip it and progress to step 2.

  1. Install lz4 to be able to uncompress the snapshot

sudo apt update
sudo apt install snapd -y
sudo snap install lz4
  1. Create ~/mangatax directory and download and unpack snapshot in one step into it:

# Create `~/mangatax/kusama/chains/ksmcc3` directory
mkdir -p ~/mangatax/kusama/chains/ksmcc3
# Download and unpack snapshot
curl -o - -L https://ksm-rocksdb.polkashots.io/snapshot | lz4 -c -d - | tar -x -C ~/mangatax/kusama/chains/ksmcc3
  1. The chain data should now be in ~/mangatax/chains/ksmcc3/db

2. Download chainspec

curl https://raw.githubusercontent.com/mangata-finance/chainspec/master/mangata-kusama-mainnet.json > ~/mangatax/mangata-kusama-mainnet.json

3. Run the Collator

  1. Add docker-compose.yml file to your home directory with the content below:

Replace <your_node_name> in the following code and then execute

version: "3.9"
services:
  node:
    image: mangatasolutions/mangata-node:kusama-0.28.0
    restart: always
    command:
      - --name=foo
      - --collator
      - --port=30333
      - --rpc-port=9933
      - --ws-port=9944
      - --rpc-cors=all
      - --chain=/etc/storage/mangata-kusama-mainnet.json
      - --database=rocksdb
      - --base-path=/etc/storage/mangata_x
      - --unsafe-ws-external
      - --unsafe-rpc-external
      - --rpc-methods=unsafe
      - --telemetry-url=wss://telemetry.polkadot.io/submit/ 0
      - --bootnodes=/dns4/bootnode-p2p-kusama.mangata.online/tcp/30333/ws/p2p/12D3KooWQjexdWcpU9MnGcKW79aUbKDCg9iXfCYzMTJr5RNhZtow
      - --
      - --execution=wasm
      - --chain=kusama
      - --pruning=1000 
      - --database=rocksdb
      - --base-path=/etc/storage/kusama
    volumes:
      - ${HOME}/mangatax:/etc/storage
    ports:
      - 9944:9944
  1. Run your node:

# To start the node run
docker compose up -d

# To check logs run, to exit logs use <Ctrl+C> keyboard combination
docker compose logs -f

# To stop the node run
docker compose down

Last updated