Run a BTFS Host

Run a BTFS file storage host on the BTFS network

Introduction

Hosts play a vital part in the BTFS network. As a host, your participation enables the decentralization of vast file storage network, while at the same time capitalizes your spare resources by rewarding you with WBTT.

How It Works

When a renter uploads a file, the file is splitting into many file shards, with each shard being stored in a host under contract. By default, each contract produces a payout to the host immediately. File shards are "pinned" in a hosts' storage for the contract duration, ensuring that as long as the host remains available, the file shards are guaranteed to be stored.

Command Line Setup

By default, btfs init will start a host, as follows:

$ btfs init



$ btfs config show

// Under "Experimental", the StorageHostEnabled setting is set to true

"StorageHostEnabled": true,

The second way, You can modify StorageHostEnabled in config file to change it. (Pay attention to that default BTFS_PATH=~/.btfs)

$ vim ~/.btfs/config


// Under "Experimental", the StorageHostEnabled setting is set to true

"StorageHostEnabled": true,

The third way, if you start without -p, You can use btfs config storage-host-enable true to change it. (Pay attention to that default BTFS_PATH=~/.btfs)

$ btfs config storage-host-enable true



$ btfs config show

// Under "Experimental", the StorageHostEnabled setting is set to true

"StorageHostEnabled": true,

For more information on how to start the BTFS node, please refer to <<Install & Run BTFS 2.0 Node>>
The link is https://docs.btfs.io/docs/install-run-btfs20-node

Host Dashboard

The BTFS Host Dashboard lets hosts conveniently adjust the storage size allocation, monitor BTT earned, airdrop earned, and much more. Once your BTFS daemon has been launched and is running, simply paste the URL http://127.0.0.1:3000 into your browser to access the Host Dashboard, after that, enter into SETTINGS page to set API ENDPOINT to connect your BTFS daemon, paste the URL http://127.0.0.1:5001.


After connecting BTFS daemon, you will see the Host score information:

26862686

And your account information:

34323432

Configure Host Settings

The btfs storage announce command allows hosts to configure and update their preferred storage host settings. The following host configuration options are available:

Option

Description

Flag

Minimum Host Storage Time

Min number of days for storage.

-d, --host-storage-time-min

Maximum Host Storage Capacity

Max number of GB this host provides for storage.

-m, --host-storage-max

Minimum Host Storage Time

btfs storage announce --host-storage-time-min=5

Maximum Host Storage Capacity

btfs storage announce --host-storage-max=5

// Under "Datastore" in your BTFS config, the Storage Max is set to 5 GB

"StorageMax": "5.0 GB"

Since v2.2.0,BTFS introduced online signature and Online Proof Contract; (Note: Nodes report heartbeats to Online Proof Contract every day, incurring a gas fee of 70 BTT(The gas fee is not fixed and will fluctuate up or down depending on the BTTC network status.), which will be deducted from the BTTC account. It is advised that you keep enough balance in your BTTC address to avoid failure to prove your uptime.