InterPlanetary File Storage - Decentralized, Distributed, Censorship-Resistant

Do repost and rate:

IPFS is a "peer-to-peer hypermedia protocol designed to make the web faster, safer, and more open." Although IPFS isn't strictly blockchain-based, it does embody many of the core principles of blockchain including decentralization, distributed nodes, and data permanence. Although IPFS itself isn't a blockchain, it has many blockchain applications and is used by many blockchain/crypto projects. In this post, I'll explain the absolute basics of how IPFS (InterPlanetary File System) works, the applications that it has, and most importantly, I'll walk you through creating your very first website and "hosting" it with IPFS. 

Flaws With Existing Internet

The vast majority of today's internet relies on centralized servers, and a few key companies have a virtual monopoly on the flow of all human communication and transmission of information. This centralization makes it all too easy for companies or countries to silence voices that they don't want to hear. This is bad for my censorship point of view, but it is problematic from a more technical point of view as well.

Because HTTP downloads files from one computer at a time, we can run into bandwidth issues as everyone that wants to download a certain file is funneled to the same server. Because the current system of the internet relies on location-based addressing, people that want to see a certain file or document must go to the specific location where that document is hosted....even if their friend sitting a few feet away has that same file on their machine. If any step in this pathway is broken, then they will be unable to view that document.

IPFS Advantages

IPFS introduces several features that are designed to make it more efficient for interplanetary file sharing. This goal is quite a while in the future, but in the meantime, IPFS is using some of those techniques to solve more down-to-earth problems. With IPFS, for example, we can pull different pieces of a file from different decentralized locations. This means that we can download multiple pieces of a file simultaneously, avoid server bottlenecks, and, in the case of a video, we can save on up to 60% of the required bandwidth. We can also pull a file from backup locations in the event that the main server is offline. 

Another problem with centralized file storage is that we become overly dependent on a single server farm for keeping the internet up and running. I remember several months ago when Amazon’s AWS servers went down. The effects of this were for reaching, and many different services throughout the country were completely or partially offline for several hours. With IPFS, there is data and content redundancy, and the same file can be found in multiple locations which is better at preserving the data, as well as ensuring access if a single node goes offline.

If you have interacted with crypto in any way, you may have already used IPFS without knowing it, as many different cryptocurrency and blockchain projects are already using IPFS in one way or another. I remember my first time hearing of IPFS was when I was watching one of my videos upload on D.tube. Some of the many services using IPFS include MetaMask, Google Chrome, the BRAVE browser, Uniswap, and Microsoft Azure. 

Build Your Basic Website

I think one of the best ways to understand a new product is to try it out for yourself, so I want to show you how to create and publish your very own website to the internet simply by using IPFS. When you publish this website, you won't have to pay any hosting fees or get a domain name, and you will hopefully feel a sense of accomplishment knowing that you have successfully created your very own website and published it to the Inter Planetary File System.

The first thing I want to point out is that this is not an advanced website at all. It's not going to win you any awards, and it's mainly designed to show how easy it is to upload content with IPFS. To get started with IPFS, you will need to download the IPFS program from the following link.

Once you have downloaded the file, simply install it, and open the dashboard. When you first open IPFS, you may see a connection error. I just had to wait a few seconds and IPFS automatically connected itself. Once you’re connected, click on the “Files” tab. If you have just opened IPFS for the first time, it should be blank. This is where we will upload our website, but first, we need to have a website to upload. 

To create our website, we have a few options. If you know HTML, then feel free to code your own website and skip this part. If you don’t know HTML, I have created a SUPER basic website that simply links to all of my existing social media profiles. You can download this template here

 

You can simply copy and paste that file into a text editor like notepad. Once you have downloaded the file, we will make a few changes. You can change the “Title” to whatever you want simply by replacing the content in yellow.

To change the page intro, replace the content between the > < brackets. Do not adjust the brackets, or anything else (unless you know what you’re doing) or it will mess up the code and your site might not work. 

Lastly, we can change the social media links. This consists of two parts. The first part in double quotes is the actual link to your social media profile. To get this, simply go to your Twitter, FB, Instagram, LBRY, Publish0x, etc account and copy the URL from your profile page. Then paste it in between the double quotes.mThe content in the double quotes is the location that you want the link to go to. The words underlined in blue are the actual text that will be displayed on your page. For example, if I want to send a user to my LBRY profile, the text in quotes would read “https://lbry.tv/$/invite/@ThePartTimeEconomist:6” whereas the content between the brackets would read >LBRY<.

Once you have all the changes made to your document, save it as an html file simply by adding .html to the filename. This tells IPFS that we are uploading a website and not a simple text document. 

From here, you simply have to drag the document from wherever you stored it into the files section of IPFS and IPFs will do everything else for you. When you are ready to view your website, click on the file, get the share link, and then copy that link into your web browser. Congrats, you have now created a decentralized, censorship-resistant website that lives on IPFS and can be viewed from anywhere in the world. 

If you don’t believe me, copy this link and then email it to yourself and check on a different device. I want to be clear that this is not just a local html file that you are accessing from your personal computer. It really is a website that is now living on a decentralized network. One thing that I do have to warn you is that it can take from 10-15 minutes to load your web page for the first time. After the first load, it will load in just a few seconds, so just be aware of that.

Summary

In summary, I think that IPFS is a unique tool that will lead to a faster, more robust, more decentralized, more permanent web. I know that we didn’t cover all of the features in this article, but I hope that the overview of IPFS, as well as the website creation exercise, at least showed you some of the potential that this protocol offers. As always thanks for reading. 

Note: This article refers readers to certain samples of HTML code. This code should be considered as-is for educational purposes only, and there is no guarantee of any sort made about the code.  

References

https://ipfs.io/#install

https://www.theverge.com/2020/11/25/21719396/amazon-web-services-aws-outage-down-internet

 

Link to sample template (All code offered as is with no warranty or guarantee). 

https://github.com/The-Part-Time-Economist/IPFS-Demo/blob/main/Sample%20HTML%20Basic%20Web%20Page.txt

Regulation and Society adoption

Ждем новостей

Нет новых страниц

Следующая новость