Setting Up A Blobber on 0Chain (test) Network

Here is a sequence of videos and corresponding instructions for the process of setting up a blobber on 0chain (betanet) network. This process is subject to change and specific settings will be need to be changed for mainnet in addition to requiring real tokens to be used.


  • Ubuntu 18+ (or similar debian based distro), Ubuntu 20.04lts server recommended
  • Dedicated (static) IP address
  • Spare hdd space

NOTE#1: for that majority of these videos I am using a GUI on server because its more convenient. Usually GUIs are not installed on servers. In this instance, for file editing, nano or another command-line based editor is normally used.

NOTE#2: If you are logged in as root then the commands shown should be fine. If however, you are logged in as another user you will need to put sudo before some of these commands.

NOTE#3: This process is for standard ‘vanilla’ installation. It does not cover RHEL Centos flavours of Linux nor is not meant to allow for unusual setups. Please refer to Telegram SP group or forum for discussion on non-standard issues.

#1 Setting up CLI tools, make, golang and building CLI tools

Install Build Tools (inc make)

sudo apt install build-essential

Install Additional Tools if required (if not using server edition)

sudo apt install git nano jq htop

Setup Golang – As per instructions on to get latest but here is process

sudo tar -C /usr/local -xzf go1.17.linux-amd64.tar.gz
rm go1.17.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version

Create .zcn folder

mkdir ~/.zcn

Fetch Zboxcli

git clone

Build Zboxcli

cd zboxcli ; make install ; cp zbox ~/.zcn ; cd ..

Fetch Zwalletcli

git clone

Build Zwalletcli

cd zwalletcli ; make install ; cp zwallet ~/.zcn ; cd ..

Get network config (if required)

cp zboxcli/network/one.yaml ~/.zcn/config.yaml

Go to .zcn folder

cd ~/.zcn

Get Balance/Create Wallet

./zwallet getbalance


./zwallet getbalance --wallet walletname.json

Faucet Tokens

./zwallet faucet --input test --methodName pour


#2 Install Docker Tools, Fetch Blobber Repo


Setup Docker – As per instructions on to get latest but here is process

sudo apt install -y
sudo systemctl enable --now docker
docker --version

Setup Docker-Compose – As per instructions on to get latest but here is process

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

Fetch Blobber Repo – As per instructions on

git clone


#3 Configure Blobber and Delegate


Although the video is in a slightly different order, I recommend the following process:-

Create a wallet for (each) blobber. The keys generated in the wallet json file. You will need the public and private keys to put in the blobber node keys file(s)

Recommended to specify –wallet blobber1.json with zbox and zwallet commands to keep this distinct

Create a wallet to delegate from. We need to specify this in vaidator and blobber config files.

Recommended to specify –wallet delegate.json with zbox and zwallet commands to keep this distinct

Example commands used:-

Go to .zcn folder

cd ~/.zcn

Create blobber wallet

./zwallet getbalance --wallet blobber1.json

Create delegate wallet

./zwallet getbalance --wallet delegate.json

Faucet Tokens

./wallet faucet --input test --methodName pour --wallet delegate.json

Example Wallet JSON

"mnemonics":"join notable arrow ride observe skate below slush exact joy vocal rocket pass behind boss half sweet magic oil eight discover helmet reduce diamond",
"date_created":"2020-10-06 13:54:06.225134277 +0100 BST m=+0.366130385"

The client_id, in this example
is the wallet id. This is used to indentify the delegate wallet

The public key, in this example:-
is the first line of the node keys config file

the private key, in this example:-
is the second line of the node keys config file

Alternatively, you can extract and display the values using jq JSON command line utility:-

DELID=$(jq -r .client_id delegate.json)
B1ID=$(jq -r .client_id blobber1.json)
B1PRIVKEY=$(jq -r .keys[].private_key blobber1.json)
B1PUBKEY=$(jq -r .keys[].public_key blobber1.json)
echo "B1ID" $B1ID

As per instructions on

Change in docker.local/b0docker-compose.yml (Note my instructions in video showed p0docker-compose.yml but b0docker-compose.yml was one actually edited)

  • Change localhost to (or url)
  • custom file paths can also be specified if required

Changes in both config files, config/0chain_blobber.yaml & config/0chain_validator.yaml (on video I may have only showed editing blobber config)

  • Change block_worker from to (will change at mainnet)
  • Change service_charge accordingly (maximum is 0.5)
  • Set delegate_wallet to primary wallet id that you will be using to fund this blobber
  • Increase handlers: (per second) rate_limit from 10 to a higher figure depending on setup, (recommended 100 for a high capacity blobber)
  • Also, read_price, write_price, capacity etc. are all configurable in here

Changes in docker.local/keys_config/b0bnode1_keys.txt (for blobber1 – blobber2 would be b0bnode2_ etc.)


Make sure port 5051 (505x for multiple blobbers) is not blocked by your firewall!

Setup, Config testnet0 and build blobber(s)
* You should read this article before this step, if you want to mount physical hard drives to the created blobber paths *

sudo docker network create --driver=bridge --subnet= --gateway= testnet0
sudo ./docker.local/bin/

Go to blobber folder

cd docker.local/blobber1

Start The Blobber!
(Alternatively, there is a option for remote image)

sudo ../bin/


#4 Service Provider Lock (Delegate) Tokens


When 0wallet app is released, this tutorial will be updated with a workflow that uses 0wallet app for token delegation. It is not recommended for users to use command line for these tasks with real tokens due to security risks of unprotected wallets.

Tokens are fauceted and locked to the blobber using zbox sp-lock. Then the blobber should be active and able to accept uploads. Specify in preferred blobbers in config.yaml file

Some of these commands relating to allocation and upload are performed on a local machine using the default wallet (wallet.json) so no –wallet parameter is specified

Go to .zcn folder

cd ~/.zcn

Faucet a bunch of tokens to Delegate Wallet

for f in {1..50} ; do ./zwallet faucet --wallet delegate.json --methodName pour --input test ; done

Lock Tokens to Service Provider

./zbox sp-lock --wallet delegate.json --blobber_id $B1ID --tokens 50

Check Locked Tokens of Blobber

./zbox sp-info --wallet blobber1.json

Faucet Tokens –

./zwallet faucet --input test --methodName pour

Create Allocation

./zbox newallocation --lock xx

List Allocations

./zbox listallocations

Read Allocation

./zbox get --allocation <allocationid>

Upload File

./zbox upload --allocation <allocationid> --remotepath /file --localpath file

#5 Configure SSL (No Video yet)

As Per instructions at
This assumes you have no other http(s) services already running on this server (via Apache, NGINX, Web Panel etc. running on ports 80 & 443). If you do, you will need to manually adjust and apply these for your particular environment.

Go to https folder

cd ~/blobber/https

Edit docker-compose.yml

nano docker-compose.yml

Replace <your_email>, <your_domain> with your email and domain. Ensure you have an A type record for your domain and ip address set up with your domain name service provider.

Deploy nginx and certbot using the following command

docker-compose up -d

Check certbot logs and see if certificate is generated. You will find “Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live//fullchain.pem” in the logs if the certificate is generated properly.

docker logs -f https_certbot_1

Edit /conf.d/nginx.conf to uncomment required locations in config for port 80. Uncomment all lines in server config for port 443 and comment locations which are not required. Don’t forget to replace <your_domain> with your domain.

nano ./conf.d/nginx.conf

e.g. Lines with bold are changes including uncommenting (removing #)

server {
    listen [::]:80;
    listen 80;

    location ~ /.well-known/acme-challenge {
         allow all; 
         root /var/www/certbot;
     location /blobber51/ {
         proxy_pass http://blobber1_blobber_1:5051/;

 server {
     listen [::]:443 ssl http2;
     listen 443 ssl http2;

     server_name <your_domain>;

#     # SSL code
     ssl_certificate /etc/nginx/ssl/live/<your_domain>/fullchain.pem;
     ssl_certificate_key /etc/nginx/ssl/live/<your_domain>/privkey.pem;

#     root /var/www/html;

    location /blobber51/ {
        proxy_pass http://blobber1_blobber_1:5051/;

Restart docker compose and you will be able to access blobbers over https.

docker-compose restart