IPFS and Fuse
the worlds data in your filesystem
- tags
- ipfs
- fuse
- howto
Contents
IPFS is cool. It’s a peer to peer distributed file system, or graph database, where you reference the data by its hash. This has the great property that the data is no longer tied to a particular computer or server. It can be spread around and you can get it from anybody without worrying if they’ve changed or alterted it in any way. If you know what you are looking for, you don’t need to worry about who you get it from.
Lets see how we can use the Fuse interface, so that we can use our regular shell scripting toolbox to access and process data on the network.
Installing fuse on Linux
|
|
Make sure you are in the fuse
group:
|
|
Edit /etc/fuse.conf
and enable user_allow_other
.
Installing Fuse on OSX
I’ve not tried it, but here’s a link to the OSXFuse project.
Setting up the mount points
|
|
Install IPFS
Download ipfs for your platform and install. e.g.:
|
|
The initialise ipfs and start ipfs
|
|
Find some content
We can look up the CID of some files
|
|
Which at the time of this writing outputs /ipfs/bafybeicksctt6uom4iltnel6hqmgwaphlazrpzq5wv37bpjnmzintdq7su
.
And then we can go into that directory and start up a webserver.
|
|
Lets start up a webserver and check it out:
|
|
And when you visit localhost:8000 you have a copy of that specific version of their documentation site served from your local filesystem.
Thoughts
The FUSE gateway isn’t super stable, so there are some potential issues with this. But its an interesting distrubtion mechanism where you could have ngnix serving files right from /ipfs or /ipns, and be able to push changed locally on your computer and then have the webservers automatically pick them up.
This is also an easy way to interact with large files using a basic script that doesn’t need to interact with the ipfs api’s directly.
Previously
Next