Introducing IPNS-Link
Tags: Ipfs, Web Hosting, Website, Censorship Resistance, Decentralization

IPNS-Link : Bob and Grace access Alice’s localhost and a blocked or geo-restricted website

On August 20, 2021, the domain ipfs.io was suddenly taken down by its then registrar, causing a massive denial of service. Many years ago, in 2014, No-IP experienced a similar domain takedown. These incidents clearly demonstrate the peril of centralization - when there’s only one gateway to your website, you are always at the mercy of the gatekeeper. Won’t it be way better, if your website had multiple, independent gateways, not controlled by the same entity? For static websites, there’s already a solution using IPFS. If you haven’t heard of IPFS, it’s a global peer-to-peer network that collectively creates a content-addressed file-system. Once you add your static website files to this filesystem, any node in the network will be able to access them. A node that is reachable from the internet can also run a web-portal using which anyone from the internet can access any file added to the IPFS network. These web-portals are called IPFS-gateways. Currently, there are lots of IPFS-gateways, run by different people, all of which are good enough to view your static website.

But what about a dynamic website, a web-app for which you need to run server-side code? Enter IPNS-Link. FYI, IPNS is a subsystem of IPFS, which basically provides filenames for the content-addressed files in IPFS.

To illustrate how IPNS-Link works, let’s consider the following.

Alice runs her http-server on her old PC or Raspberry Pi, which may not even have a public IP address. To expose her site to the internet, all she needs to do is run an app on her Linux device and point it to her local server (e.g. localhost:8080 ). The app gives her a UUID as the public address of her site, that she distributes to her desired audience. When Bob wants to access her site, he simply has to choose any one of the independent HTTPS-enabled gateways and put Alice’s UUID there. If he doesn’t want to use a 3rd party gateway, he can always run his own IPNS-Link-gateway locally and use that to access Alice’s site with utmost privacy.

Note that this not only achieves the goal of having multiple independent (hence, decentralized) access points for Alice’s site, but also makes web-hosting hassle-free for Alice! She didn’t need to buy a domain name, manage TLS/SSL certificates, acquire a public IP address or set up DDNS in case the IP was dynamic. Also, everything she can’t control, viz. everything other than her server and content, is decentralized.

If you have used ngrok, IPNS-Link is a decentralized alternative, and more

Even if Alice chose to go the conventional way of domain names and all, exposing her site using IPNS-Link would give her censorship-resistance. If blocked or geo-restricted by regional authorities, Alice’s audience can still find their way to her site using any public or private IPNS-Link-gateway.

No matter where Alice’s server is on the internet, given her site’s UUID, a gateway can always locate her server, connect to it and access the site. Even if she has to port her entire site to another machine for some reason, she can keep the UUID intact! This is useful if she uses a hosting service without having her custom domain. The hosting provider would assign a subdomain to her site, which would become invalid whenever she changes her provider. With IPNS-Link, migrating to another provider is seamless.

UUIDs are pretty-long though, they’re boring, look like gibberish and are typo-prone. DNSLink is a way to manage those but it involves centralization, viz. an authoritative DNS provider. Custom URL shorteners are even more centralized. Hmm 🤔 We think we came up with something. You might soon be able to map your UUIDs to human-friendly *.ipns names, in a semi-decentralized way, if we ever get the funds to run an unstoppable service. Wish us luck.

IPNS-Link is designed with convenience and efficiency in mind. If used properly, it can reduce your hosting costs, and improve latency for your users. All this is possible by harnessing the potential of IPFS. But this is a topic for another article.

So, what’s the status of the IPNS-Link project currently? Well, we are still cooking, but you can already have your first taste — the prototypes are there, or, if you will, the MVP. Follow this quick-start tutorial to expose your website with IPNS-Link, and test your site’s accessibility with our public gateway at ipns.live. Need help? Just shoot an email. You can also read more about the project here.

How do you like it? Join the community to share your feedback and be a part of this. If you think IPNS-Link will do humanity any good, spread the word and share this post. And hey, do you code? Yeah? We need you, pal.

Care to spare? Please donate.

Happy Hosting!