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 split into 30 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

You may also choose to configure Host settings via the terminal. First set up your BTFS daemon. Then enable the BTFS host config settings:

btfs config profile apply storage-host

This command updates your BTFS config settings to enable storage hosting. You can verify this by viewing your config file:

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>>.

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:

2686

And your account information:

3432

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:

OptionDescriptionFlag
Minimum Host Storage TimeMin number of days for storage.-d, --host-storage-time-min
Maximum Host Storage CapacityMax 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"