BTFS

The BTFS Developer Hub

Welcome to the BTFS developer hub. You'll find comprehensive guides and documentation to help you start working with BTFS as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

BTFS Demonstration

BTFS daemon setup and walk-through guide

Install BTFS

Minimum Hardware Requirements

  • CPU: 2+ Core
  • RAM: 2+ GB

Supported Operating Systems and Architecture

OS ARCH
darwin amd64
darwin 386
linux amd64
linux 386
windows amd64
windows 386

Golang

Download the latest version: https://golang.org/dl/

Open the Terminal and run the following steps:

  1. Download the BTFS install.sh script.
wget https://raw.githubusercontent.com/TRON-US/btfs-binary-releases/master/install.sh
  1. Run the install script.
bash install.sh -o darwin -a amd64


  1. Add BTFS path to the environment.
export PATH=${PATH}:${HOME}/btfs/bin
  1. Initialize BTFS by running btfs init.
btfs init


// Output

initializing BTFS node at /Users/tom_tron/.btfs
generating 2048-bit  keypair...done
peer identity: 16Uiu2HAmQAdGxS4fcwzZaXDe5tCLn7o51ixSNzURFafb3v4p4nsz
to get started, enter:

	btfs cat /btfs/QmZjrLVdUpqVU6Pnc8pBnyQxVdpn9J8tfcsycP84W6N93C/readme
  1. Start the BTFS daemon by running btfs daemon.
btfs daemon


// Output

Initializing daemon...
go-btfs version: 0.2.1-286e1f761
Repo version: 7
System version: amd64/darwin
Golang version: go1.13
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.13/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/67.164.115.223/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
WebUI: http://127.0.0.1:5001/webui
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready
BTFS daemon get file test succeeded!
BTFS daemon add file test succeeded!
BTFS is up-to-date.
  1. Once your BTFS daemon has started, open a second terminal window to run the BTFS commands.

Common Usage

Add a File

Add a file to your BTFS daemon by running btfs add <file name>:

btfs add heart.png


// Output

added QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i heart.png
 29.89 KiB / 29.89 KiB [==================================================================================] 100.00%

Get a File

Get a file by running btfs get <file hash value>:

btfs get QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i


// Output

Saving file(s) to QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i
 29.89 KiB / 29.89 KiB [===============================================================================] 100.00% 0s

Remove a File

Remove a file from your BTFS daemon by running btfs rm <file hash value>:

btfs rm QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i


// Output

"Removed QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i"

WebUI

Explore the BTFS WebUI by pasting the URL http://127.0.0.1:5001/webui in your browser:

BTFS Demonstration


BTFS daemon setup and walk-through guide

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.