December 6, 2022

An Introduction to Web3.Storage – What is it and How Does it Work?

Table of Contents

Thanks to Protocol Labs (the team behind IPFS and Filecoin) and its web3.storage platform, Web3 developers can now store data in a decentralized manner. Whether you are creating crypto assets (e.g., NFTs) or decentralized applications (dapps), you always need to store specific data or files. Moreover, if you want to ensure a proper level of decentralization, you should opt for Web3 storage solutions. You also want these solutions to be frictionless instead of wasting valuable time using them. That’s exactly what makes web3.storage stand out.

Getting acquainted with this user-friendly decentralized storage solution can be hugely beneficial. Moving forward, you’ll have a chance to learn what web3.storage is, how it works, and why you should use it. We will also take a closer look at some of the main advantages of this neat solution. That said, we will also look at other decentralized storage alternatives. After all, it’s important to determine what solution would suit you and your project’s needs the most. Once you learn about web3.storage, you’ll be ready to use this practical tool whenever you need to store data while developing dapps. 

While on the subject of decentralized applications, dapp development is extremely straightforward, thanks to Moralis. After all, this ultimate cross-platform, cross-chain interoperable Web3 API provider equips you with countless API endpoints. Ultimately, with Moralis and web3.storage, you can join the Web3 revolution with confidence.

web3.storage with a statement saying that this platform is the easiest way to store data on the decentralized web

What is Web3.Storage?

In short, web3.storage is a simple interface for developers to store and retrieve data from Filecoin’s decentralized storage network. According to Protocol Labs, the organization behind this tool, web3.storage remains free indefinitely. So, with this interface in your corner, you save money and time. After all, it handles much of the complexity of interfacing with decentralized storage on your behalf. 

Two main components comprise web3.storage. One component is a service that stores data redundantly across multiple Filecoin miners and the public IPFS network. This component also provides information about where the data is stored and retrieves data by content identifiers (CIDs). The second component of web3.storage is an HTTP endpoint, a JavaScript client library, and a web user interface (UI) for interacting with the first component. Moreover, this is what the interface looks like for a fresh account:

web3.storage user interface

Since Filecoin is the Web3 storage solution behind this interface, and as IPFS is an indispensable part of Filecoin, you need to know what Filecoin and IPFS are to fully appreciate web3.storage. Thus, let’s cover these two before we focus on explaining how web3.storage works. 

graph showing a connection between ipfs and web3.storage

IPFS 101

InterPlanetary File System, or IPFS, is a distributed protocol developed by Protocol Labs. The IPFS system allows for uploading, storing, and accessing all sorts of information. The latter includes websites, applications, data, and files. Essentially, IPFS is a peer-to-peer (P2P) hypermedia protocol. It is also worth noting that IPFS aims to preserve and grow humanity’s knowledge by making the web resilient, upgradeable, and open. 

Furthermore, this P2P file-sharing protocol enables users to host and access content in a decentralized manner. IPFS’ unique and innovative solution for storing and sharing files and other content is possible thanks to operators that host a portion of the overall data. 

It’s also important to keep in mind that this Web3 storage solution is a lot different than the traditional HTTP system. After all, the latter is location-based, while IPFS employs a content-addressing solution. Accordingly, IPFS users find any data or file based on its actual content and not on its location. Furthermore, this content-addressing solution is possible because all pieces of content inside the IPFS ecosystem have a CID (hash). In addition to content addressing, IPFS also links pieces of content together.

Note: We encourage you also to explore how to use IPFS for NFT metadata. By covering that topic and completing the related tutorial, you’ll learn more details about how IPFS works and how to use the best IPFS API

filecoin

Filecoin 101

Unlike IPFS, which does not involve blockchain technology, Filecoin does. It is an open-source storage solution initiated by Protocol Labs. Furthermore, it’s safe to say that, at its core, Filecoin is a cloud storage marketplace. However, it is also a protocol and an incentive layer with fine-tuned economics. As mentioned above, Filecoin also utilizes IPFS to secure data storage and retrieval.

Filecoin enables anyone to join and participate as a storage provider, ensuring hyper-competitive storage prices. With such freedom of supply, the network includes a large number of diverse storage providers and developers. The latter is one of the keys to ensuring a robust and reliable service. However, Filecoin’s content addressing and cryptographic storage proofs offer provable security and authenticity. In addition, users can customize Filecoin’s storage solutions to match their needs. Options, such as tuning redundancy, retrieval speed, and cost strategies, offer a lot of flexibility.

map and chart how decentralized storage solutions work

How Does the Web3.Storage Solution Work?

With the IPFS and Filecoin basics under our belts, it’s time we focus on how web3.storage works. As indicated in the image above, content that users send to web3.storage gets persistently stored across a network of storage providers on Filecoin. It is also pinned redundantly on IPFS. As such, the joint powers of Filecoin and IPFS provide content addressability and persistence. The former is ensured through CIDs and the latter via Filecoin’s economic model. Essentially, web3.storage users get to rely on verifiable proofs regarding the integrity of the stored data.

Storing Data

If you look at the above diagram, you can see that the system immediately pins the data that web3.storage sends to an IPFS cluster. The latter consists of three Protocol Labs’ nodes that are geographically distributed. From there, the system ques the data to store it on the Filecoin network. Before the protocol stores this data, the system packages it with other data in a Filecoin deal. Finally, the automated mechanism stores a package of data using a minimum of five geographically distributed miners. Nonetheless, for additional redundancy and availability, the data also gets pinned to other IPFS pinning services, such as Pinata.  

the upload file module on web3.storage website

The best thing is that the above process executes automatically. All you need to master is an intuitive web3.storage interface. You can also store data via the JavaScript (JS) client library. The latter uses a familiar syntax that lets you store data on Filecoin with just a few lines of code. Essentially, you just need to construct the client and use the “put()” method. However, in any case, you’ll need to use web3.storage’s UI to create an account and API tokens. You’ll also be able to use this UI to view the list of all the stored files, including where the data is stored. 

code to install web3.storage

Retrieving Data

At this point, you understand the above-presented way of storing data using web3.storage employs Filecoin and IPFS’s redundancy. As a result, you can retrieve the data in several different ways. Hence, you can do so through web3.storage itself, IPFS gateways, your own IPFS node, or via Filecoin retrieval. These options provide a lot of flexibility to best suit your needs. Moreover, make sure to keep in mind that anyone can request a piece of data through its CID. Hence, if you decide to use this Web3 storage method for private or sensitive information, make sure to encrypt it properly. 

Note: To explore the details of working with web3.storage, visit this solution’s documentation. Also, we encourage you to take on our example project, which will teach you how to use Filecoin in Unity. The latter will also enable you to practice working with web3.storage.  

about us page

Why Use the Web3.Storage Solution?

Most people don’t understand that the majority of data on the internet today is hosted by large centralized corporations. This means that Amazon, Google, and Microsoft handle most of the digital data. As you know, these companies are centralized and have single points of failure. Consequently, the data stored with their services is not secure nor resistant to exploitation. As such, to see Web3 in its full glory, it cannot rely on these kinds of storage solutions. Instead, it needs decentralized storage. 

So, the number one reason to use web3.storage or any other Web3 storage solution would be to create a better future – a future where we don’t compromise data ownership and security. However, to provide you with additional arguments for using web3.storage, let’s look at the main advantage of this storage solution.

a whiteboard with black marker text stating advantages

Benefits and Advantages of Web3.Storage

If you covered the above sections, you already know what makes web3.storage valuable. However, you can gain a different perspective by seeing the main pros listed in a single place. So, here they are:

  • User-Friendliness – You can use a neat web UI or JS client library to utilize the Filecoin storage solution. This makes things rather simple. It means you do not need to deal with cryptocurrencies that are involved with blockchain-based decentralized storage solutions.
  • Cost-Efficiency – Web3.storage is free up to 5 GB and will remain that way indefinitely. Hence, you can reduce the development cost by saving the amount you’d otherwise spend on storage. Their “Lite” and “Expert” plans are also quite affordable.  
  • Flexibility – This decentralized storage solution contains multiple methods for storing and retrieving data. As such, you can select the one that best suits your dapps’ needs.
  • Accessing the Power of Filecoin and IPFS – Since Filecoin and IPFS are the underlying protocols of web3.storage, you inherit both protocols’ benefits when using this solution. In fact, you inherit all the benefits of the data layer:
    • Verifiability
    • Openness
    • Composability
    • Efficiency
    • Speed
    • Portability
    • Limited vendor lock-in
    • Self-sovereign identity
    • Serverless development  
decentralized storage is a pillar of web3

Alternative Storage Solution for Web3 Developers

We encourage you to take web3.storage for a spin and explore the benefits of this useful tool firsthand. However, it’s worth pointing out that in many instances, IPFS is all you need to create dapps or NFTs. So, make sure also to learn how to upload files to IPFS with Moralis’ IPFS API effortlessly.  

In fact, instead of using web3.storage, use Moralis and take advantage of all its tools, including the best IPFS API. Furthermore, with the “upload folder” endpoint, you can upload files to IPFS quickly and easily. What’s more, you can accomplish this in three easy steps:

  1. Creating a File and Initializing Moralis
  2. Defining an Array of Files
  3. Upload Files to IPFS

If you want to dive into this process further, explore our step-by-step tutorial, “How to Upload Files to IPFS – Full Guide“. In short, simply create a Moralis account, and complete the above steps. In the end, the following endpoint does the trick:

const response = await Moralis.EvmApi.ipfs.uploadFolder({
unlock the power of blockchain storage with moralis

Other Storage Solutions

Fortunately, there are multiple projects focusing on covering the aspect of decentralized storage. Although Filecoin, IPFS, and web3.storage forms a robust trio, other providers may better suit your needs. After all, every Web3 storage provider takes a slightly unique approach regarding how to ensure redundancy, efficiency, and a proper level of decentralization. Furthermore, Since Web3 is still in its early stage, decentralized storage solutions are also still under development. Therefore, the ultimate Web3 data storage solution is yet to emerge. However, these are the projects that deserve your attention: 

  • Arweave
  • Holo
  • Crust Network
  • Storj
  • Sia
  • Swarm
  • Pinata
cloud storage illustration showing a man sitting on top of a cloud using his computer

An Introduction to Web3.Storage – What is it and How Does it Work? – Summary

In today’s article, you had an opportunity to learn all you need to know about web3.storage. Accordingly, you now know what it is, how it works, and what this Web3 data storage solution’s main advantages are. Along the way, you also learned the basics of Filecoin and IPFS, which are the underlying protocols that web3.storage depends on. Nonetheless, you also had a chance to take web3.storage for a spin by following the “Filecoin in Unity” link. By doing so, you could also see firsthand the power of Moralis, which is the tool to use to create dapps, no matter which Web3 storage solution you use. You also found out that Moralis incorporates IPFS. Thus, you may not even need an additional storage solution for your particular projects.

With the knowledge and skills obtained in this article, you may be ready to take on your own Web3 development ideas. However, you might also need some practice first. If so, make sure to tackle the tutorials that await you in the Moralis documentation. If you want to explore other blockchain development topics, visit the Moralis YouTube channel and the Moralis blog. Some of the latest topics explore questions such as: what is Ethers.js, how to combine Python and Web3, how to set up automated Web3 notification emails, what the Palm blockchain is, and much more.

It’s also worth mentioning that the blockchain industry offers a lot of opportunities. If you want to go full-time crypto sooner rather than later, it helps to have an edge; being blockchain certified has served as that edge for many other folks. Thus, make sure to consider enrolling in Moralis Academy, where you can first master blockchain and Bitcoin fundamentals.        

certificate for a user after becoming blockchain certified
Moralis Money
Stay ahead of the markets with real-time, on-chain data insights. Inform your trades with true market alpha!
Moralis Money
Related Articles
October 24, 2022

Building Ethereum Dapps – Create, Test, and Deploy

November 1, 2022

Cross-Chain Bridging Deep-Dive

March 16, 2023

Token Allowance Checker – View Wallet Token Approvals

November 30, 2022

How to Set Up Automated Web3 Notification Emails with Python

January 4, 2023

Smart Contract Programming – The Ultimate 2023 Guide to Blockchain Programming

November 18, 2022

AWS Lambda NodeJS Tutorial – How to Integrate a NodeJS SDK Example

January 2, 2023

Get Contract Logs – Exploring Web3 Get Event Logs for Ethereum

October 24, 2023

Free Goerli – Get Goerli Faucet Funds Without Having to Pay

October 6, 2023

Crypto Market Data API – Get Crypto Trading Data