Textile Buckets

Here are the steps to quickly get setup with buckets:

  1. Download and install the hub CLI:

    The installation process is documented here. You will need to grab the latest release from the releases page.

  2. Initialize the account and login:

    hub init # Follow instructions
    ...
    hub login # if you already have a username
    

    Detailed instructions can be found in the official docs.

  3. Initialize a new Bucket:

    Buckets are mapped to local directories. In order to create a bucket from the working directory run:

    cd /path/to/your/data
    hub bucket init
    

    It is also possible to retrieve existing buckets (or pull changes performed by others in the case of shared buckets) with the hub bucket init --existing flag.

  4. Make changes and push them:

    After adding or modifying files in your bucket folder, you can publish the changes by pushing them:

    hub bucket status # show changes to the bucket
    hub bucket push   # publish changes to IPFS
    
  5. Explore your content on IPFS:

    Your content has been pushed and is made available on IPFS. You can display thread, IPNS and website links associated to your bucket with:

    hub bucket links
    

    The first link should take you to the Hub gateway and allow you to inspect your files as currently published. You can use the IPNS link for example, if you are hosting a website, to open it on the browser.

  6. Archive your bucket and back it up on Filecoin:

    You can archive your bucket at any point and store it on Filecoin:

    # Archive
    hub bucket archive
    # Check status
    hub bucket archive status
    # Or watch status
    hub bucket archive status -w
    
  7. Learn more about Textile buckets:

    • All hub commands and subcommands take a --help flag that displays available flags and usage instructions. These are also published here.
    • The instructions here are based on the Buckets guide, which contains more details, for example about permissions, shared buckets and organizations.
    • Filecoin storage in Textile buckets is a very new feature! Make sure you read the Bucket Archiving for the latest information on how it works, limits and price.
    • This blog post contains explanatory videos and information about archiving and recovery. Once you have a deal CID, you can also use Lotus to retrieve the data.
  8. Use the Buckets API directly:

  • js-textile provides programmatic access to the Buckets API from Javascript. Some examples are here.
  • Go support is also available.