Easily Access IPFS from Brave!

Sunday, June 2, 2024

Update: August 2024

I wrote this article three months ago and mentioned that the Brave browser may be deprecating this feature. I tried using it today, and found that it is gone from the latest versions of the Brave Browser. It was a cool feature while it lasted.

We believe it was a poor decision to remove this feature from Brave. Apparently, supporting decentralized networks is not a priority for the development team. I would think that a browser designed for privacy would take an interest in the adjacent topic of censorship.

Please stay in touch with us, as we know that a similar approach is really needed to access IPFS and the ARNIIE network that CensorGuard nodes will establish.

Introduction and Motivation

The InterPlanetary File System (IPFS) is a useful technology for fighting censorship. While it operates outside of the normal Web that most people interface with, it does not require exotic technology, special equipment, or any fantastic IT skills to access it. Any user with the Brave browser installed on their computer can easily retrieve files from this network and, if they choose to run a node, post files to the network.

Follow along and we'll show you how!

Why IPFS?

Here at the Anti-Censorship Technical Committee (ACTC), we are working to share a number of solutions that can make content creators more resilient while ensuring that viewers can access content that might otherwise be censored.

IPFS is a decentralized network of nodes that share files. It's been said that IPFS is essentially "torrent on steroids," but I think that understates how decentralized and robust IPFS really is. Once content has been shared across computers on that network, it becomes very difficult (essentially impractical) to stop the spread of the file by ordinary means.

  • Fully decentralized: There's no headquarters or central node for the "authorities" to threaten or raid.
  • It's redundant: As long as one node has the content, anybody can access it.
  • Scalable: Because of the architecture, increased viewing leads to faster distribution of the data.
  • It's immune to many "mainstream" web attacks, including DNS denial .

We didn't create IPFS, but we see great potential in this network. It has some limitations, and we are working on projects that use IPFS and add additional features for content creators and consumers. For the moment, we want to show you how you can easily access it using the Brave browser.

Accessing IPFS in Brave

First, if you don't have Brave, you can get it here: https://brave.com/

Once Brave is installed, you should copy the following IPFS link containing an IPFS Content Identifier (CID) into the address bar:

ipfs://QmQ39mMx1V3kYmtW446UBSwvs9Js1nZyZC5RZn6oc4xrJ7

Brave will recognize that this is an IPFS CID and bring up the IPFS Preference page, asking you a question about how you want to access IPFS.

Brave's IPFS Preference Screen

There are two options presented to the user.

The first option, Use a Brave local IPFS node, will actually set up a full node on your computer that Brave can use. If you do this, you will be connected directly to IPFS and you can use the node to share files on IPFS. They warn that your IP address may be exposed, which is true. However, it does get you connected directly to this decentralized network in just one click!

The second option, Use a public gateway, relies on the gateway (which is listed and can be changed in settings) to fetch the file from IPFS and serve it to you using https, like a normal website. Using a gateway means that you have to trust the gateway's operator to actually share the content you've requested and not substitute it with something else. Gateways are also targets for attacks, including denial of service. A gateway operator is a centralized node, by definition, and exactly the sort of thing that IPFS is designed to avoid. However, you may choose this option if you don't want to start up your own node.

I should point out that using an local IPFS node will get the file to you very quickly, compared to using the public gateway.

Either way, you'll find yourself watching a great video from Truthstream Media discussing whether Nicola Tesla was building a death ray (we have no relationship with them, but their content is great, and much of it is available on IPFS).

A video from Truthstream Media

You may be surprised at how quickly the file comes up. It seems to be well-shared across the IPFS network. Because you are viewing the file, you are now sharing and helping to spread the content, at least until garbage collection takes place on your node, cleaning out your cache of files.

IPFS Settings

By browsing to:

brave://settings/ipfs

You can see your IPFS settings, and I believe they are reasonably self-explanatory.

Brave's IPFS Setting Screen

At the top, you can see that I've chosen to use a local IPFS node. About 3/4 down the page, you can also see that I've instructed Brave to start an IPFS node every time I start Brave. By doing this, my computer is participating in the network, so that content I've viewed and content that I've "pinned" or shared is also being shared.

Your Brave IPFS Node

If you've chosen to let Brave set up a node for you, and want to take a look at its status, you can go to this page:

brave://ipfs-internals/

IPFSstatus_small

This shows that your node is running, with options to stop or restart the node.

If you click on My Node on the upper-right, you will see your IPFS node's dashboard page.

MyNode_small

This shows how much data you've been uploading and downloading versus time, how many peers you are connected to, the version of Kubo (the IPFS dashboard) you are running, etc.

By clicking on FILES on the upper-left, there is a page where you can import files to share them on IPFS. This is great for uploading your own files, but what if you are viewing content on IPFS that you would like to keep and share? If you want to "pin" a file so that it isn't garbage-collected, we will discuss a Brave plug-in that will make this easy to do.

Further Functions with IPFS Companion

More functions can be added to your Brave IPFS node by adding the IPFS Companion plug-in to Brave. This is achieved by going to the dropdown menu and selecting Extensions, then clicking on the link to the Web Store. This will show you the Chrome Web Store, as Brave is based on Chrome.

By typing IPFS into the search bar at the top and hitting enter, you'll see a series of related extensions, but the one you want is IPFS Companion. Click that and then "Add to Brave."

IPFS Companion in the Chrome Store

After a confirmation, it installs very quickly and brings up a nice interface with buttons on the left that will take you to the node status and file pages that we showed above. I've set my toolbar to show this extension for easy access.

IPFS Companion Home Page

This might not seem like a huge improvement until I return to viewing IPFS content, like the TruthStream video at:

ipfs://QmQ39mMx1V3kYmtW446UBSwvs9Js1nZyZC5RZn6oc4xrJ7

When the video comes up, and I click on the extension I've pinned to my toolbar, I now have options to share a CID or a gateway-based link. Better, though is that it also shows an option to Import to Files on My Node.

Import to Files Option

By clicking on this, the content is downloaded to my node, and shows up on my list under FILES in the IPFS dashboard.

Conclusion

We've shown you an easy way to access IPFS with only a few clicks in the Brave browser. As it stands, IPFS is already a very effective, censorship-resistant way to share and access content. We'd like to see more capabilities for setting up communities on this network. If content creators use this platform, they'll also want their content to be discoverable, without the need to paste CIDs to an index somewhere.

Some content can be found from the IPFS node's dashboard and clicking on "Explore," but this is limited and IPFS doesn't really have a search engine that catalogs all of the files that are available on the network. Some users might post files that they don't want people to find, but we are working on a decentralized system that will allow content creators to "opt in" to search capabilities.

Please sign up for email updates, so that we can keep you informed on what ACTC is doing!

--Mark-A-Billy