On the InterPlanetary File System (IPFS)

2021 June 1 Twitter See all posts


I host this blog on IPFS, this is what I learned about the censorship-proof protocol.

What is IPFS?

The InterPlanetary File System is a decentralized file storage protocol. It is also a network that allows storage and sharing of files. Traditionally file storage is done by location. To access a file, first, you have to know it is on Bob’s computer, then, what Bob’s internet address is, and, finally, the folder where he has it stored. IPFS finds files by name only. It does this by creating a unique string of numbers and digits (known as a hash value) for each file. Network participants, known as nodes, store a directory of these names for anyone to search. This directory is called a Distributed Hash Table (DHT). BitTorrent works similarly, but BitTorrent is not a singular network.

The protocol includes a network because of aspirations to replace the ubiquitous HTTP, domain name service (DNS), and IP address-based web. One of the biggest surprises in setting up an IPFS site is how pain-free the DNS and SSL experience is when using an Ethereum Naming Service (ENS) name. No DNS settings, No SSL certificates, simply type your IPFS hash into the smart contract of your ENS name. Each document/site has a unique hash-based name, making it impossible to impersonate my site and send you malicious code instead, meaning SSL is less relevant.

This system makes censoring content much more difficult. Multiple independent nodes can host a site, making it unblockable by an ISP or DNS provider. In practice, decentralization is a spectrum. To upload my site into the system, I had to start a node. Since this is my blog, other nodes probably will not choose to store it. So I need a node that is always running. A dedicated web server in my office would work, but it is easier and more reliable to use a cheap cloud service. This site is efficient because Cloudflare, a centralized tech company, strongly supports IPFS. If Cloudflare dropped support, you’d be navigating to my site with the address https://ipfs.io/ipns/k2k4r8ouvugmballygb4inv7wrlos18iu5h6wev4gh0444y9pbnncm20 with slower load times.

What skills are required to set up an IPFS hosted blog?

Setting up a static website to be hosted on IPFS is not a beginner project. The most technically challenging path requires knowledge of setting up a web server on a cloud service, installing software via the command line, the ability to read scattered software documentation, and basic HTML/CSS. Updating content requires logging into the server to push updates to IPFS.

I was curious how IPFS works, so I set up a node on a Digital Ocean server, but there are easier ways. Fleek is a service that allows you to avoid setting up a node. It allows you to auto-deploy directly from a git repository. You can host a blog for only the cost of a domain name using their free tier. You still need to know HTML/CSS and the git workflow. I created a "Hello World" test site in less than 5 minutes using Fleek.

There will be an option for further decentralization that doesn’t involve having a server in your closet. Cartesi’s Noether is a side chain that specializes in file storage and is compatible with several popular blockchains. If I switch to this service, I will update this post and add a tutorial.

update: I switched to Fleek to improve site reliability and to make it easier to run.

Is this the future of web hosting?

Partially. Most of the demand for websites comes from non-technical people. While a service like Fleek makes the process easier, it still requires technical knowledge to use. No-code or low-code solutions like WordPress, Shopify, and Weebly dominate the personal website and small business website marketplaces. It would be much simpler for these companies to integrate ENS names and IPFS hosting in their apps than for a startup to create an entire no-code tooling stack. But, the chance of mainstream adoption seems low because the legacy systems already work. The existing providers would risk attracting customers that bring them trouble since the only additional user-facing benefit is avoiding censorship.

There is a potential customer base in marginalized industries like sex work and dissidents in authoritarian countries. It would be possible to build an uncensorable service that allows customers to use no-code tools to create uncensorable websites. A censor could harm the usability of the service but not remove it. The fallback setup would include using the IPFS hash address (if Cloudflare goes down or censors), storing no identifiable customer data, and running nodes on distributed computing services. Accepting payment in privacy coins could protect anonymity. Accepting payments in cryptocurrencies and using IPFS have knock-on effects of making the service global. Anyone in the world could publish on an anonymous and uncensorable platform. The requirements would be limited to using cryptocurrency and a no-code tool.

Want to host a website or blog on IPFS?

Here is a code tutorial.