Getting Started
This section covers how to install and configure blobber. In order to use blobber functionality, you will need to join the 0Chain network with the following prerequisites-

System requirements

To properly deploy blobber , you must have a virtual machine , physical computer or cloud computing instance setup with the following requirements:‌
  • Linux with ubuntu 18.04 preferred
  • 4 vCPU, 8 Gb Memory at minimum
  • 30 GB of minimum space to store the initial container components. Expandable storage can be added later to provide services as a storage provider.

Required Software dependencies

Installing and running blobber requires deployment-specific dependencies to be preinstalled


Installing Docker will provide the ability to create containers for blobbers.
  1. 1.
    To install Docker on Ubuntu, log in as root user in the terminal window and enter the command:
sudo apt update
sudo apt install docker.io
2.Start and enable docker by entering the following commands:
sudo systemctl start docker
sudo systemctl enable docker
3.To verify the installed Docker version number, enter:
docker --version
Successful Installation Output :
4. If you are not logged as a root user, add your Linux username{USER} to the docker group for running the docker commands as root.
4.1 Add the user to the docker group using
sudo usermod -aG docker ${USER}
4.2 Apply permissions by typing the following:
su - ${USER}
4.3Enter your Linux user’s password to continue and confirm that the user added to the docker group by typing:
id -nG
4.4 In the output you will see your Linux username(ubuntu) added to the docker group like this

Docker Compose

  1. 1.
    Download the current docker-compose release using :
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  2. 2.
    Provide execution permissions using
    sudo chmod +x /usr/local/bin/docker-compose
  3. 3.
    Verify the installation with
docker-compose --version

Clone the Blobber Repository

After installing Docker and Docker Compose
  1. 1.
    Clone the Blobber repository using the command
git clone https://github.com/0chain/blobber.git
2. Change directory to blobber
cd blobber
3. Use the following command for running shell script located in the sub directory to initialize blobber components

Create and Configure Containers for Blobbers

To create containers for blobbers and allow interaction between them. You need to create a network using docker which connects them with each other.
  1. 1.
    To set up a network, specify the network name(testnet0),subnet and gateway by using the below command.
$ docker network create --driver=bridge --subnet= --gateway= testnet0
2. Set up the block_worker URL
A block worker URL is a field in the blobber/config/0chain_validator.yaml and0chain_blobber.yaml configuration files that require the URL of network you want to connect to.
Since we are connecting to the 0chain network, we will replace the default URL in blobber/config/0chain_validator.yaml and0chain_blobber.yaml with the below-mentioned URL.
block_worker: http://beta.0chain.net/dns
3. Navigate to the config directory using
cd blobber/config
You will see blobber and validation files listed
4. Use the nano editor to edit the block_worker field for both files using the command
sudo nano 0chain_blobber.yaml
sudo nano 0chain_validator.yaml
5. Navigate back to the blobber directory and modify the b0bnode1_keys.txt located in thedocker.local/keys_config by replacing localhost with public IP of your cloud VM/ instance.
nano /docker.local/keys_config/b0bnode1_keys.txt
Sample Screenshot:
6. In the b0docker-compose.yml file located in thedocker.local directory, edit the command field in the blobber section, the command field will look like this :
Here replace the localhost with < public ip here > of instance /VM IP
Note: Step 5 and 6 is an optional step and is only required when you are setting up blobber on cloud computing instances. In case of a local blobber setup leave them as it is.

Build Blobbers

  1. 1.
    Now go back to the blobber directory and build containers using the below command
This would take few minutes to set up install dependencies.

Register a Wallet using zboxcli

  1. 1.
    Now clone the zbox CLI repository using the command
git clone https://github.com/0chain/zboxcli.git
2.Install the zboxcli dependencies
GoLang Binaries
Use the Linux built-in Wget tool is used to fetch the golang archive from the google server using the command
wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
The tar command is used to extract the group of files into a usr/local directory.
tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
Path Variable is set to usr/local directory using
export PATH=$PATH:/usr/local/go/bin
The build**-**essential package is required to build and make Zbox application. It includes the necessary GCC/g++ compilers and other essential critical libraries and utilities.
Run apt update command to update the packages.
sudo apt update
Get Build-essential package.
sudo apt-get install build-essential
Once dependencies are installed navigate into zboxcli directory using
cd zboxcli
3. Use the make install command to compile the source code.
make install
This might take couple of minutes. Sample output after successful compiling:
3. Now Connect the Zbox to the 0Chain network Configuration for the 0Chain network by default is stored in network/one.yaml file which we will copy to a new config.yaml file.
The config.yaml file and all the other Zbox component information will be stored in a new zcn folder located in home directory of file system.
4. Make a new zcn folder in home linux directory using
mkdir $HOME/.zcn
.zcn is used to denote a hidden folder.
5. Copy the content from one.yaml to a new config.yaml file using
cp network/one.yaml $HOME/.zcn/config.yaml
To verify whether the config.yaml exist and network configuration is stored properly. From the home directory navigate to zcn folder . You will see config.yaml listed.
6. Check the config file configuration using
nano config.yaml
block_worker: https://beta.0chain.net/dns
signature_scheme: bls0chain
min_submit: 50
min_confirmation: 50
confirmation_chain_length: 3
max_txn_query: 5
query_sleep_time: 5
# # OPTIONAL - Uncomment to use/ Add more if you want
# preferred_blobbers:
# - http://one.devnet-0chain.net:31051
# - http://one.devnet-0chain.net:31052
# - http://one.devnet-0chain.net:31053
According to the config mentioned in block worker field of your file, zbox will connect to desired 0Chain network by default this would be https://one.devnet-0chain.net/` lets change it to http://beta.0chain.net/0dns .
7. Check whether Zbox is running by navigating back to zboxcli directory
cd zboxcli
and type
On a successful run you will see a help section like this:
zbox is a decentralized storage application written on the 0Chain platform.
Complete documentation is available at https://docs.0chain.net/0chain/
zbox [command]
Available Commands:
add-collab add collaborator for a file
alloc-cancel Cancel an allocation
alloc-fini Finalize an expired allocation
bl-info Get blobber info
bl-update Update blobber settings by its delegate_wallet owner
commit commit a file changes to chain
copy copy an object(file/folder) to another folder on blobbers
cp-info Challenge pool information.
delete delete file from blobbers
delete-collab delete collaborator for a file
download download file from blobbers
get Gets the allocation info
get-diff Get difference of local and allocation root
get-download-cost Get downloading cost
get-upload-cost Get uploading cost
getwallet Get wallet information
help Help about any command
list list files from blobbers
list-all list all files from blobbers
listallocations List allocations for the client
ls-blobbers Show active blobbers in storage SC.
meta get meta data of files from blobbers
move move an object(file/folder) to another folder on blobbers
newallocation Creates a new allocation
register Registers the wallet with the blockchain
rename rename an object(file/folder) on blobbers
rp-create Create read pool if missing
rp-info Read pool information.
rp-lock Lock some tokens in read pool.
rp-unlock Unlock some expired tokens in a read pool.
sc-config Show storage SC configuration.
share share files from blobbers
sign-data Sign given data
sp-info Stake pool information.
sp-lock Lock tokens lacking in stake pool.
sp-pay-interests Pay interests not payed yet.
sp-unlock Unlock tokens in stake pool.
sp-user-info Stake pool information for a user.
start-repair start repair file to blobbers
stats stats for file from blobbers
sync Sync files to/from blobbers
update update file to blobbers
update-attributes update object attributes on blobbers
updateallocation Updates allocation's expiry and size
upload upload file to blobbers
version Prints version information
wp-info Write pool information.
wp-lock Lock some tokens in write pool.
wp-unlock Unlock some expired tokens in a write pool.
--config string config file (default is config.yaml)
--configDir string configuration directory (default is $HOME/.zcn)
-h, --help help for zbox
--network string network file to overwrite the network details (if required, default is network.yaml)
--silent Do not show interactive sdk logs (shown by default)
--wallet string wallet file (default is wallet.json)
--wallet_client_id string wallet client_id
--wallet_client_key string wallet client_key
Use "zbox [command] --help" for more information about a command.
8. To register a wallet on Zbox to be used both by the blockchain and blobbers. Use the following Zbox command
./zbox register
Successful Response:
Wallet Registered
By default, the wallet information will be stored in wallet.json located in the .zcn folder of the Linux home directory. 9. Navigate back to the .zcn folder
cd $HOME/.zcn/
10. Open the wallet.json file. It should be similar to the similar to the output below:
"mnemonics":"butter whisper wheat hope duck mention bird half wedding aim good regret maximum illegal much inch immune unlock resource congress drift>
11. Copy the client_id value and paste it into blobbers and validators settings. These are found in blobber/config directory. Navigate to the config directory :
cd blobber/config
You will see blobber and validation files listed
12. Open both the configuration files and edit the delegate_wallet value with client_id copied from wallet. Here is a sample configuration file below:
# [configurations above]
# for testing
# 500 MB - 536870912
# 1 GB - 1073741824
# 2 GB - 2147483648
# 3 GB - 3221225472
capacity: 1073741824 # 1 GB bytes total blobber capacity
read_price: 0.01 # token / GB for reading
write_price: 1.00 # token / GB for writing
# min_lock_demand is value in [0; 1] range; it represents number of tokens the
# blobber earned even if a user will not read or write something
# to an allocation; the number of tokens will be calculated by the following
# formula
# allocation_size * write_price * min_lock_demand
min_lock_demand: 0.1
# max_offer_duration restrict long contacts where,
# in the future, prices can be changed
max_offer_duration: 744h # 31 day
challenge_completion_time: 1m # 15m # duration to complete a challenge
# delegate wallet for all rewards, if it's empty, then blobber ID used
delegate_wallet: 'b145bf241eab00c9865a3551b18028a6d12b3ef84df8b4a5c317c8d184a82412'

Run Blobbers

1. In blobber/docker.localdirectory there would be six blobbers created with different folder numbers. See the screenshot below:
2. Navigate to any of the blobber(for example blobber 2) directory using
cd blobber/docker.local/blobber2
3. Run the blobber container using the below command
Here is a sample output of blobber2 successfully running:
4. Now to check whether blobber is properly running by visit them at the following link localhost:blobber port number
For blobber 1 the port number is 5051 .In our case we started blobber2 so it would be 5052
Here is the sample output:
blobber running.png
5. You can repeat step 2 for start the other five blobbers .
6.Now to check whether blobbers has joined the 0chain network navigate to zboxcli directory and run the following command
./zbox ls-blobbers
Sample Response:
- id: 0bf5ae461d6474ca1bebba028ea57d646043bbfb6a4188348fd649f0deec5df2
url: http://beta.0chain.net:31304
used / total capacity: 14.0 GiB / 100.0 GiB
last_health_check: 1635347306
read_price: 26.874 mZCN / GB
write_price: 26.874 mZCN / GB / time_unit
min_lock_demand: 0.1
cct: 2m0s
max_offer_duration: 744h0m0s
- id: 71ac0a40d18ee48f53e73189007ce2c1e8769993c7713aeef07640b53a60149f
url: http://beta.0chain.net:31302
used / total capacity: 12.7 GiB / 100.0 GiB
last_health_check: 1635347348
read_price: 26.865 mZCN / GB
write_price: 26.865 mZCN / GB / time_unit
min_lock_demand: 0.1
cct: 2m0s
max_offer_duration: 744h0m0s
- id: 7a90e6790bcd3d78422d7a230390edc102870fe58c15472073922024985b1c7d
used / total capacity: 0 B / 1.0 GiB
last_health_check: 1635347427
read_price: 10.000 mZCN / GB
write_price: 100.000 mZCN / GB / time_unit
min_lock_demand: 0.1
cct: 2m0s
max_offer_duration: 744h0m0s
- id: f65af5d64000c7cd2883f4910eb69086f9d6e6635c744e62afcfab58b938ee25
used / total capacity: 0 B / 1.0 GiB
last_health_check: 1635347950
read_price: 10.000 mZCN / GB
write_price: 100.000 mZCN / GB / time_unit
min_lock_demand: 0.1
cct: 2m0s
max_offer_duration: 744h0m0s
- id: f8dc4aaf3bb32ae0f4ed575dd6931a42b75e546e07cb37a6e1c6aaf1225891c5
url: http://beta.0chain.net:31305
used / total capacity: 13.3 GiB / 100.0 GiB
last_health_check: 1635347346
read_price: 26.874 mZCN / GB
write_price: 26.865 mZCN / GB / time_unit
min_lock_demand: 0.1
cct: 2m0s
max_offer_duration: 744h0m0s
In the response you should see the locally running blobbers mentioned with their urls for example and

💻 Troubleshooting

For support related to blobber installation check our community forum at [https://community.0chain.net/]
If you want to automate 0Chain deployment using Kubernetes please have a look at 0miner documentation here
You might also want to check our 0Chain blog here for additional information


Join our community chat directly on
Copy link
On this page
System requirements
Required Software dependencies
Clone the Blobber Repository
Create and Configure Containers for Blobbers
Build Blobbers
Register a Wallet using zboxcli
Run Blobbers
💻 Troubleshooting