Blog home

Is IPFS Forever?

Justin Hunter

Published on

3 min read

Is IPFS Forever?

Immutable does not equal forever.

The Interplanetary File System (IPFS) is a protocol designed to improve the way the world stores and access files. It enables more efficient storage by leveraging a network of storage nodes around the world. Anyone can participate in the network, and files can be retrieved from any participant that has them, not just one centralized provider. 

While revolutionary, the protocol often generates plenty of questions. One of the most common questions is whether or not files on the IPFS network are stored forever. To answer that, let’s explore how IPFS works.

How does IPFS data storage work?

The IPFS network is essentially made of many computers that all speak to each other. These computers are called nodes. IPFS nodes store and transmit files. These nodes are run by individuals and by companies. You could run one right now on a computer as small as a Raspberry Pi if you wanted to. As an operator of a storage node, you decide what files will be stored on your node. It’s important to note that not every node in the IPFS network stores files. Replication of files is not automatic. However, broadcasting the file’s location to the rest of the network is automatic. 

This methodology of storing files on one or many storage nodes and broadcasting their location is how the entire content-addressable model of IPFS works. Because the IPFS network knows that a file (represented by a content identifier, or CID) is on the network at one of many locations, it can route a request for that file to the nearest storage node with that file. 

Let’s illustrate this in a simple form. Let’s say Alice, who lives in California is trying to download a funny cat gif. She has the CID and makes a request to the IPFS network. Bob and Charlie both have copies of the funny cat gif on their IPFS storage nodes. Bob’s storage node is located in New York while Charlie’s storage node is located in London. Alice’s request will be routed to the nearest storage node to fetch the content. 

This is the peer-to-peer storage retrieval model that IPFS has pioneered. However, the files represented in this model and on the IPFS network are not permanent by default.


Is IPFS storage permanent?

Storage on the IPFS network is as permanent as you want it to be. Unlike a blockchain, in which every piece of data is permanent by default (whether you want it to be or not), files on the IPFS network are stored as long as they are pinned. Pinning a file with a storage node is how you tell that node that the file should not be removed. Files that are stored temporarily on a storage node or files that are unpinned will be removed from the node and will become inaccessible unless some other storage node has the same file. 

The benefits of this sort of opt-in permanency is that individuals and companies can better protect and manage their data. Companies can comply with regulations, and individuals are not forced to keep something online that they may not want to keep online. On the flip side, ensuring permanence through continued pinning is simple. 

How do I manage my IPFS content?

You have many options when it comes to managing your files on IPFS. If you choose to, you can run your own IPFS storage node. You can store files directly with your node and you can control how long those files exist on that node. On the other hand, you may prefer to offload the day-to-day maintenance of a storage node to an IPFS pinning service like Pinata. When you do so, you trade some control for convenience. Through a simple API or user interface, an IPFS pinning service gives you control to add and remove files from the storage nodes run by the service. 

Conclusion

The IPFS network provides a powerful solution to storing and retrieving files while remaining flexible. While it is possible to keep files on the network permanently, this is not the default. File permanency is controlled by the file owner. This was an intentional choice in the design of the protocol and one that makes it a strong solution for individuals and companies looking to store data in a performant way.

Stay up to date

Join our newsletter for the latest stories & product updates from the Pinata community.

No spam, notifications only about new products, updates and freebies. You can always unsubscribe.