IPFS Powers the Decentralized Web

The InterPlanetary File System Brings Censorship-Resistant Storage to the Digital Universe

Hiro Kennelly
BanklessDAO
10 min readJun 15, 2023

--

A more open, connected universe awaits. Image credit: Feems

Today is a big day! You just got news that one of your favorite artists is about to drop an NFT collection. There’s nothing quite like the anticipation: all that well-engineered Solidity underpinning the collection’s blockchain deployment, and if you’re lucky, a tidy and responsive front end from which to mint. We talk at length about these aspects, and about community, utility, and value, but many of us are initially attracted to an NFT project simply for the art. But did you know it’s likely that most of that beautiful artwork could simply disappear forever?

Your average NFT collector doesn’t think about the way the artwork (that critical JPEG file) and all its enabling metadata are stored. Most people probably assume that the bits and bytes making their NFT pretty are just part of what’s on the blockchain. However, with very few exceptions, the artwork file is not stored on chain, but on centralized servers, like Amazon Web Services — which hosts more Ethereum validators and NFT-related data than you could imagine. Or perhaps it’s stored on Microsoft Azure, Google Cloud, or any number of private servers. Guess what? Many of the files that lend your NFTs their artistic richness and rarity are stored on trusted, but centralized, networks, with only a URL to maintain the link between the onchain token and the art.

So, what if your web3 ethos rejects these centralized storage options? What’s a thoughtful NFT founder to do? Some projects have been putting all of the art on chain (Ordinals and Inscriptions and OG Ethereum-based on-chain art like CryptoPunks and Art Blocks), but file size restrictions limit the complexity of the image.

CryptoPunks. Source: Larva Labs

For all but the simplest artwork, a web3-aligned NFT artist should store the associated files on a distributed and decentralized file storage platform, of course. And the mother of all decentralized storage options is the InterPlanetary File System.

Interplanetary What?

The InterPlanetary File System (IPFS) was deployed in 2015 by Protocol Labs, and it quickly gained popularity. And why wouldn’t it? IPFS is an open-source, peer-to-peer, file-sharing protocol that enables its users to host data and make it accessible to others at no cost. In other words, IPFS has created the world’s largest free, open, and censorship-resistant decentralized storage system, enabling anyone with internet access to host and share nearly any information imaginable; if it can be digitized, it can be stored and shared at scale, at no additional cost than the hardware and connection which most users will already have purchased.

Just as with blockchains, the more distributed and decentralized the file storage system, the more robust and resilient the network. IPFS is a diverse global network of computers — there are currently nearly 500,000 nodes that host the data, and it supports nearly 13 million weekly users. IPFS isn’t literally interplanetary yet, but it’s getting there fast!

Source: Protocol Labs

How IPFS Works

IPFS works by storing and retrieving information based upon its unique content, as opposed to categorization and storage by location. When you upload a file to IPFS, the data is split into smaller chunks, secured using the SHA-256 algorithm, and given what’s called a content identifier (CID). This CID is how nodes know where each piece of content is stored.

An example CID: QmWURaPZnkjtAEoZ1yfovqcVk26eDtyn1J16GMXMTTvJdw

Using complex-sounding data structures called directed acyclic graphs and distributed hash tables, IPFS is able to use CIDs to know instantly where the information you’re seeking is and how to retrieve it.

Benefits of Decentralization

There are many benefits to IPFS, but the biggest three are its data resilience, censorship resistance, and speed. Because IPFS is distributed and decentralized, if some nodes go down, the data will still be available for those who seek it. If the server for your favorite website is offline, there’s a good chance that information is still available on a mirrored IPFS site.

Similarly, IPFS is censorship resistant because you can’t take down the source of the data, unlike centralized servers which may be vulnerable to a DDoS attack. IPFS doesn’t point to a location on the internet or any public or private network that can be hacked or crashed; rather, IPFS points to the content itself. Because you can’t take down the content, you can’t censor the information.

Most people probably assume that the bits and bytes making their NFT pretty are just part of what’s on the blockchain. However, with very few exceptions, the artwork file is not stored on chain, but on centralized servers, like Amazon Web Services — which hosts more Ethereum validators and NFT-related data than you could imagine.

As a decentralized and a distributed network, accessing data can be faster or easier than retrieving it from centralized alternatives, which might gatekeep or paywall the info. And because of its peer-to-peer architecture, it’s possible to create local networks that can serve this function in remote or poorly connected locations.

Hosting, Pinning, and Viewing Files

There are a number of ways to participate in the IPFS network, but the simplest way is to download an IPFS client and set up a node. A node is just a name for a networked processor running the IPFS software. Unlike traditional computer networks, which are gated and tightly controlled, anyone can possess any file and participate in making that data available to the network.

Setting Up and Using a Node

For most people, the easiest way to set up a node is to install the IPFS Desktop app from the GitHub page, but as the extensive documentation makes clear, there are any number of ways to get started with decentralized file sharing.

Screenshot of IPFS client in MacOS

Once the desktop client is installed, you’ll want to use your node! To get started:

  1. Select a file you wish to store and share.
  2. Navigate to the left side of the app and select the ‘Files’ tab.
  3. Either drag and drop or select the ‘Import’ tab and upload your file.

After uploading your file, you should see it displayed like this:

Screenshot of IPFS Desktop client

Note the CID example from earlier, QmWURaPZnkjtAEoZ1yfovqcVk26eDtyn1J16GMXMTTvJdw, is the same one listed under the ‘IPFS Rules!.png’ file name in the screenshot above.

Next, you’ll want to pin the file to your local node. ‘Pinning’ the data to your node is how users can permanently make data available to others. Pinning saves it on the node’s hard drive, enabling others to access it (so long as the node is running and connected). You can do this via the three radio buttons on the far-right side, or by clicking the blank space under Pin Status.

Select the box next to ‘Local node’ and then Apply. A push pin icon should appear next to the file name, like you see below. Congrats, you’re now sharing your file with the world!

Screenshot of IPFS Desktop client

If you don’t trust yourself to be a good IPFS node host, you can take advantage of various pinning services to ensure that the data is available to others even if your computer is offline. Although there are a number of these services available, Pinata may be the most popular. In their documentation, IPFS offers a pinning tutorial through web3.storage, a cloud-native implementation of IPFS.

A note on sharing: to share your file with another IPFS node operator, just copy the CID using the three radio buttons next to the file. Other users just need to select ‘Import from IPFS’ and paste the CID into the appropriate field to generate the hosted file (and don’t forget to remind them to pin it!).

Viewing Files Stored on IPFS

Storing and sharing files on IPFS is one thing, but ‘resolving’ (viewing) these files in a human-readable format is another. The key to viewing IPFS files is to use the Brave web browser, as it has IPFS viewing functionality built in. There are also extensions available for other browsers, and public gateways.

The trick to resolving a file is to pay attention to prefixes before the CID. Go back to the three radio buttons next to the file name in the IPFS Desktop client, click on those, and select “Copy CID”, which generates something like this:

QmWURaPZnkjtAEoZ1yfovqcVk26eDtyn1J16GMXMTTvJdw

To resolve in Brave, start with the ipfs:// prefix and just add the CID. Paste ipfs://QmWURaPZnkjtAEoZ1yfovqcVk26eDtyn1J16GMXMTTvJdw into Brave and you should see the following file hosted on my IPFS node (and Pinata for redundancy 🙂):

Note: you may need to choose a public IPFS gateway (instead of a local Brave node) when resolving your first IPFS file in Brave. If you are having issues, you can find Brave’s IPFS configuration in the web3 tab under Settings. Just make sure the IPFS setting looks like the below and is set to ‘Gateway’.

Let’s Tokenize It!

As with all useful open-source protocols, other developers will inevitably fork it, restrict it, and monetize it. Filecoin and Arweave are probably the two most well-known companies to monetize IPFS. Interestingly, Filecoin was started in 2017 by Protocol Labs, the same organization behind IPFS, whereas Arweave is a separate company founded in the UK that same year.

Filecoin and Arweave serve very different purposes, but both relate to secure file storage. Filecoin acts as a decentralized storage broker. With Filecoin, you rent server space for a set period of time. Filecoin is designed to incentivize low-cost, short-term storage.

Arweave, on the other hand, is focused on permanent storage. Arweave users pay up front to store the data forever. Permanence is good, but with that comes immutability, so once that data is on the Arweave blockchain, it can’t be changed. Mirror.xyz, the wallet-connected publishing platform, uses Arweave to store the data for Mirror posts. Have you ever tried to change a Mirror title after hitting ‘Publish’? You can change the title on Mirror, but the interwebs will always index your article by the original title.

While you don’t need to participate in tokenized IPFS projects to take advantage of decentralized file storage, the idea is that tokenization incentivizes behaviors to make the networks more robust and file storage more secure while meeting the needs of end users. From a network standpoint, pinning your file with Pinata is better than pinning it on your node, but using incentivized networks to store your files provides maximum resilience for minimum cost.

Get On That Rocket Ship

IPFS built decentralized storage for the peer-to-peer age, and it’s one of the most powerful, yet underrated, tools on the internet. There’s way more to IPFS, but your next step is to scan the docs, download the desktop app, invite some friends to do the same, and create a small cluster of networked computers.

Connecting planets isn’t easy, but IPFS is just a rocket ship and a few interspace relays away from making it happen. But for now, let’s enjoy this otherworldly tech here on this planet. Decentralization isn’t easy, but it’s always worth the journey.

Author Bio

Hiro Kennelly is a writer, editor, and coordinator at BanklessDAO, an Associate at Bankless Consulting, and is still a DAOpunk.

Editors Bio

Tomahawk is a writer, editor, and tokenomics contributor at BanklessDAO. He is a longtime trader who enjoys charting, investing, and analysis of tokens using technical and on-chain data.

Trewkat is a writer and editor at BanklessDAO. She’s interested in learning about applications for blockchain and NFTs, with a particular focus on how best to communicate this knowledge to others.

Designer Bio

Feems is a DAO governance operator, creative producer, and community instigator.

BanklessDAO is an education and media engine dedicated to helping individuals achieve financial independence.

This post does not contain financial advice, only educational information. By reading this article, you agree and affirm the above, as well as that you are not being solicited to make a financial decision, and that you in no way are receiving any fiduciary projection, promise, or tacit inference of your ability to achieve financial gains.

Bankless Publishing is always accepting submissions for publication. We’d love to read your work, so please submit your article here!

More Like This

Web3 Privacy Begins With Your RPC by Hiro Kennelly

ZK-Rollups Transform the Trilemma to Dilemma by tommasogualtieri.eth

Remittances Are Ripe For Change by Craig Schuster

--

--

Hiro Kennelly
BanklessDAO

Writer, editor, and coordinator at BanklessDAO and the Editor-in-Chief at Good Morning News. He is also helping to build a grants-focused org at DAOpunks.