Import data from IPFS

This guide will show you how to use Lotus to directly add IPFS-hosted data to the Filecoin network.

Lotus supports making deals with data stored in IPFS, without having to re-import it into lotus.

  1. Start the IPFS daemon on the same machine as your Lotus node:

    ipfs daemon
  2. Open ~/.lotus/config.toml.

  3. Set the UseIpfs variable to true:

    UseIpfs = true
  4. Restart your IPFS and Lotus daemon.

  5. You should now be able to make deals with the data associated with your IPFS node:

    ipfs add -r example.txt

    This should output something like:

    added QmV8FbWfaHeEVPMAzWM5paifwf94VFrpvehQqFZez5T6RW example.txt
    198.39 KiB / 198.39 KiB [==========================================] 100.00
  6. You can now use that IPFS hash with lotus to create a storage deal.

    lotus client deal QmV8FbWfaHeEVPMAzWM5paifwf94VFrpvehQqFZez5T6RW t01000 <price> <duration>

Edit this page on GitHub