Web3 Storage – How Web3 Data Storage Works

Web3 Storage - How Web3 Data Storage Works
Table of Contents

Decentralized storage solutions are one of the essential aspects of the new internet era – Web3. Although blockchain is the tech leading the way in Web3, we don’t necessarily need blockchains for Web3 data storage, which might sound odd as Web3 would only exist with blockchain technology. However, you’ll learn more about this further down in this article. That said, Web3 storage solutions should aim for as high decentralization levels as possible. After all, decentralization is one of the core concepts when it comes to Web3 file storage. Ultimately, the goal is to have reliable options without a central authority and a single point of failure. 

When building dapps or creating crypto assets, you always need to store some data. Therefore, as a dapp developer, you must know how to work with Web3 data storage, which is exactly what this article will help you master. Moving forward, we will first cover the basics by explaining what Web3 storage is. We will also tell you where Web3 data is stored. Then, we’ll do a proper introduction to decentralized data storage solutions. In addition, we will take a closer look at two reputable Web3 file storage alternatives that, in a way, complement each other. This is where you’ll learn more about IPFS and Filecoin. Last but not least, we’ll also explain how easy it is to use the most popular Web3 storage solution with Moralis

Nonetheless, in case you want to skip the theory and jump to the final part of today’s article, make sure to create your free Moralis account first. That way, you’ll be able to follow our lead at the end of this article and upload your own files without breaking a sweat.    

digital art image showing six nodes connected via a grid

What is Web3 Storage?

To understand Web3 storage, you need to know what Web3 is. Thus, let’s quickly look at the evolution of the internet. The initial “world wide web”, or Web1, was primarily a read-only experience for end users. A second generation (Web2) introduced many great applications and ushered in a read-write experience. It’s worth pointing out that Web2 is what most of the world uses today. However, Web3 is evolving fast, and those involved in the crypto space already interact with various Web3 features daily. Furthermore, as mentioned in the introduction, blockchain technology and crypto principles are at the core of the latest internet generation. Moreover, Web3 is all about the “read-write-own” experience. 

chart illustrating the various web eras, including web1, web2, and web3

The “own” part clearly indicates that centralized (Web2) storage solutions, such as Google Cloud, OneDrive, Dropbox, and many others, won’t cut it. After all, it is almost impossible to know with certainty if third parties are protecting your privacy or perhaps abusing it. Accordingly, centralized storage solutions require a great deal of trust from users. However, Web3 is all about trustless functioning. Consequently, if we want to truly own data, we need to use decentralized storage solutions.

Furthermore, there’s also the question of a single point of failure. All centralized cloud storage solutions are exposed to that issue. As such, users may be unable to access their data when network outages occur. Also, users can lose their precious data when these companies’ servers fail. Even personal storage devices, such as PC hard drives, external disks, and phone memories, all have a single point of failure.

So, what is Web3 storage? It’s a decentralized storage solution that enables users to truly own their data and doesn’t have a single point of failure.       

user clicking on a cloud to upload a file to a web3 data storage solution

Where is Web3 Data Stored?

If you are after the most simple and straightforward answer, we can tell you that with Web3 storage solutions, files are stored on a network of computers rather than on a single server. However, the exact nature and mechanics of these networks vary greatly. In fact, there are many projects trying to come up with the ultimate solution. That said, we’ll just have to wait a bit longer to get one of these. Fortunately, we already have some reliable and trustworthy Web3 file storage solutions that we’ll discuss as we proceed.

Furthermore, the most common misconception about data storing in Web3 is that we can store everything on the blockchain. However, if you’ve minted an NFT before, you know that you don’t store the files representing NFTs (e.g., JPEGs) on a chain. In fact, you don’t even store NFT metadata on the blockchain. Instead, you only store a link to the metadata file on-chain. Hence, while blockchains are distributed digital ledgers and, by definition, a particular type of Web3 storage solution, they are best suited for particular types of data. External links are one example of these data types. Of course, not all blockchains are the same, and some focus primarily on Web3 file storage. Yet, in general, storing larger files on a programmable blockchain, such as Ethereum, is technically and economically impossible. 

three clouds connected to a web3 storage solution and a computer

Introducing Decentralized Data Storage Solutions

First, it’s worth pointing out that “decentralized data storage” is just another term for Web3 storage solutions, and, at this point, you already know what Web3 storage solutions are. You also know that a decentralized approach eliminates single points of failure and the issue of a centralized entity manipulating or abusing private data. With that said, all who believe in a brighter future agree that decentralized data storage solutions play a vital role. Fortunately, there are already several projects focusing on covering that aspect. Furthermore, keep in mind that they all take a unique approach regarding how to ensure redundancy, efficiency, and a proper level of decentralization. At this point, it’s safe to say that development is still underway, and the ultimate Web3 data storage solution hasn’t emerged yet. 

Aside from IPFS, which is not using blockchain technology, we have the following projects pushing the “Web3 storage” frontier further:

  • Holo (HOT)
  • Crust Network
  • Sia
  • Arweave (AR)
  • Storj
  • Filecoin (FIL)

Due to its tight connection to IPFS, we will take a closer look at Filecoin herein. After all, IPFS and Filecoin are decentralized storage solutions that we prefer to work with. However, we strongly recommend you explore the other above-listed alternatives as well. If nothing else, by doing so, you’ll learn more about different mechanisms making decentralized storage possible.

a globe with the title ipfs on it

What is IPFS?

InterPlanetary File System (IPFS) is a distributed system, or a protocol, if you will. It serves for uploading, storing, and accessing websites, applications, data, and files. Furthermore, as stated on the official IPFS website, IPFS aims to preserve and grow humanity’s knowledge. The latter will be achieved by making the web resilient, upgradeable, and open. It’s worth mentioning that Protocol Labs is the organization behind this peer-to-peer (P2P) hypermedia protocol. 

As a P2P file-sharing protocol, IPFS enables users to host and access content in a decentralized manner. This means that within the protocol, user operators host a portion of the overall data. This is IPFS’ unique and innovative solution for storing and sharing files and other content. In addition, this Web3 file storage solution is a lot different than the traditional HTTP system, which is location-based; IPFS employs a content-addressing solution. Accordingly, users of this Web3 storage protocol find any file, website, data, etc., based on its actual content rather than its location. 

To make this content-addressing solution possible, all pieces of content inside the IPFS ecosystem have a unique content identifier (CID). The latter is essentially a hash. So, when you want to find specific data, IPFS utilizes these cryptographic hashes. Of course, this only works because each piece of content has a unique CID. Nonetheless, in addition to content addressing, IPFS also links pieces of content together.

Note: If you want to learn more details about how IPFS works, make sure to check out our article which also explains how to use IPFS for NFT metadata

filecoin

What is Filecoin?

Filecoin is an open-source storage solution. At its core, it is a cloud storage marketplace, protocol, and incentive layer. Furthermore, the Filecoin network is built on IPFS. Hence, it offers decentralized and secure data storage and retrieval. As stated on “filecoin.io“, this Web3 file storage network aims to ensure a more secure and efficient web free from corporate control.

It’s quite remarkable what staggering economies of scale the Filecoin network achieves. It does so by allowing anyone to join and participate as a storage provider. This freedom of supply ensures hyper-competitive prices for storage. In addition, this also means that the Filecoin network includes a large number of diverse storage providers and developers. Thanks to this diversity, network users benefit from a robust and reliable service. With these concepts in mind, it’s safe to say that Filecoin Web3 storage can be built and owned by everyone.  

Through content addressing and cryptographic storage proofs, this open-source protocol offers provable security and authenticity. After all, the network verifies that the data is being stored correctly and securely over time. Further, users can customize this storage solution to match their needs. This is possible by tuning redundancy, retrieval speed, and cost strategies. Additionally, it’s worth mentioning that Filecoin is a fast-growing ecosystem of providers, tools, libraries, and integrations. 

Note: To practice using this blockchain-based Web3 file storage solution, make sure to follow our lead as we tackle the “Filecoin in Unity” challenge. 

a wizard pointing at a title that says moralis

The Best Web3 Storage Provider – Use Web3 Data Storage with Moralis

As pointed out throughout the article, in our opinion, IPFS is currently the best Web3 storage provider. You also know that Moralis is the ultimate Web3 API provider, which makes building dapps as straightforward as it gets. What’s more, Moralis enables you to effortlessly upload files to IPFS, and thanks to Moralis’ IPFS API, the following snippet of code does the trick:  

const response = await Moralis.EvmApi.ipfs.uploadFolder({ abi });

If you worked with Moralis before, you know exactly how to make the most of the above line of code. However, if this is your first rodeo with this Web2-Web3 bridging solution, you should explore the best IPFS API further.

the ipfs api documentation page from moralis

By visiting the Moralis IPFS API documentation page, you can learn all you need to know about this useful shortcut. This is also where you can find detailed instructions on how to use the “uploadFolder” endpoint by completing the following three steps:

  1. Set Up Moralis – You need to create your free Moralis account to obtain your Moralis Web3 API key and install the Moralis SDK.
  2. Create a Script to Upload a Folder to IPFS – This is where you’ll implement the above-presented snippet of code. Essentially, you need a JavaScript, TypeScript, or Python script (you can find example scripts in Moralis’ docs) that initializes Moralis and uploads a file or array of files to IPFS. To achieve that, you also need to provide the “path” and “content” parameters.
  3. Execute the Program – Once you have your script ready, you just need to run it using a proper command. For example, “node index.js” would do the trick if you created an “index.js” in step two. Finally, you can see the response in your terminal. The latter should provide you with an HTTPS-adjusted IPFS path to the uploaded file:  
showing a url as path after succesfully uploading files to the web3 storage solution ipfs

Web3 Storage – How Web3 Data Storage Works – Summary

If you covered the above sections, you now know what Web3 storage is and where Web3 data is stored. Furthermore, you learned what the leading decentralized data storage solutions are. Among the listed solutions, we took a closer look at IPFS and Filecoin, which, in a way, complement each other. Finally, you also learned about Moralis’ “uploadFolder” IPFS API endpoint, enabling you to upload files to IPFS easily. 

We hope today’s article provided you with proper inspiration so that you’ll make sure to use either IPFS, Filecoin, or any other reliable Web3 data storage solution for your Web3 development endeavors. After all, as a dapp developer, you automatically become an ambassador of the new era of the internet. Hence, do not forget about the importance of decentralization and true ownership. Also, make sure to explore other Moralis Web3 APIs (Token API, NFT API, Web3 Auth API, Streams API, etc.). With these tools on your side, dapp development will feel like a breeze!

On the other hand, you may need to learn more about blockchain development before you feel confident enough to start creating killer dapps. In that case, you have two options. You can exploit the Moralis YouTube channel and the Moralis blog – the two outlets designed to support your free crypto education. Or, you may take a more professional approach and enroll in Moralis Academy. In case you go with the former, make sure to explore some of our latest articles, including “Python and Web3“, a tutorial about Web3 notification emails, the best ERC20 token balance API, and much more. However, if you decide to take a more professional approach to your blockchain development education, we recommend starting with blockchain and Bitcoin fundamentals.

a certification example from moralis academy
December 5, 2022
Join the Moralis Community
Get the latest Moralis Web3 news and updates via email.
Search
Generic filters
MOralis launched
Streams API
Real-Time blockchain data delivered to your backend via webhooks. Used by the biggest dapps.
Real-Time blockchain data delivered to your backend via webhooks. Used by the biggest dapps.
Follow us on Twitter
Real-Time blockchain data delivered to your backend via webhooks. Used by the biggest dapps.
Related Articles