How to host immutable static website with IPFS

2 58
Avatar for ghostoftomorrow
Written by
  5
1 month ago

IPFS can host anything, including hosting an entire website.

But, there is a catch, once hosted a web page or a website, can't be changed or edited anymore which says this technique is good for a static article, a landing page or anything you wish to host as long it doesn't require additional modification later.

There is also another catch, about IPFS and anonymity.

IPFS "was not designed with anonymity or privacy in mind..."

You can read more about it here: https://github.com/privacytoolsIO/privacytools.io/pull/361#issuecomment-344414022

So, if you want to host anonymously use Freenet.

I recently created an IPFS web page just to see if it can be done, I hosted a static article and I can say it is pretty easy, it works and requires nothing much but a web page file in .html format and an IPFS desktop peer-to-peer hypermedia protocol.

I upload it over the desktop app, it can be done with any IPFS gateway.

For the simplicity I used the bootstrap, I placed an additional .css styles and a twitter comment script directly inside a single file, so I can upload all in one piece. Otherwise, if you wish to host separate css, html and scripts, you can upload a whole folder containing your files and then use a folder's root link to open your page.

Things I used:

My final result is here:

https://ipfs.io/ipfs/QmQpwbSqUqyMvPp64vJkv5nonbjfwyBXk3LW9422kGA4dQ

And a page looks like this. I placed my Memocash and Twitter links on it, and shared it on a both websites.

But, if you wish to make this and to share this static page on social media do not forget to make meta tags for a header. Otherwise, you will not get a wide image social snippet.

You can create meta tags quickly with https://metatags.io and host images on https://imgur.com.

With all this said I created this article page to show it can be done, but I doubt I will be using it, just because each post has to be created separately from scratch, and it doesn't allow edits.

$ 1.88
$ 1.00 from @p0oker
$ 0.50 from @nyusternie
$ 0.22 from Anonymous user(s)
A
+ 3
Avatar for ghostoftomorrow
Written by
  5
1 month ago
Enjoyed this article?  Earn Bitcoin Cash by sharing it! Explain
...and you will also help the author collect more tips.

Comments

Definitely IPFS FTW!

Pro Tip: https://pinata.cloud/ offers a FREE account with up to 1GB to help with “pinning” your CIDs .. they’re also a Cloudflare partner; so it makes using cloudflare-ipfs.com’s services super fast

$ 0.00
4 weeks ago

Well this is perfectly awesome. I'm a fan of IPFS and immutable platforms. I don't think it's unusable, actually I think it's a perfectly fine solution for static site generators like Gatsby. It's using React underneath and after loading will transform into a full-fledged SPA. I don't think there's any issue in keeping a record of your previous builds as long as you use a DNS solution to show you the latest deployed hash. So many potentials here...

$ 0.00
1 month ago
About us Rules What is Bitcoin Cash? Roadmap Affiliate program Get sponsored Self-host
hello@read.cash (PGP key) Reddit