This tutorial is how to post website/application on IPFS and link with ENS domains(.eth).
- Try it: http://portalnetwork.eth
If you have any question please contact us for help:
IPFS is a peer-to-peer hypermedia protocol to make the web faster, safer, and more open.
- Manual Install: https://ipfs.io/docs/install/
- IPFS api library(JavaScript): https://github.com/ipfs/js-ipfs-api
ENS is the Ethereum Name Service, a distributed, open, and extensible naming system based on the Ethereum blockchain.
ENS can be used to resolve a wide variety of resources. The initial standard for ENS defines resolution for Ethereum addresses, but the system is extensible by design, allowing more resource types to be resolved in future without the core components of ENS requiring upgrades.
- ENS Document: https://docs.ens.domains/
Using https://manager.ens.domains to set ENS Public Resolver and content with Public Resolver.
Step 1. Link to https://manager.ens.domains, and search ENS which you want to bind with IPFS hash
This is a simple convert tool for convert IPFS hash to hex, link here.
@PhyrexTsai is there a reason why you unwrap hash digest from multihash (CIDv0) in Step 3? (Convert IPFS hash to Hex)
It introduces a problem when default hash algorithm used by IPFS changes.
Just to be safe, update this instruction and ask people to use a specific hash algorithm when adding content to IPFS (eg. sha2-256).
That being said, unless you are limited by the hash size, consider future-proofing entire setup by switching from raw sha2-256 digest to full CID, a self-describing content-addressed identifier used in IPFS: https://github.com/ipld/cid#cid-content-identifier
FYSA IPFS ecosystem slowly moves from multihashes (CIDv0) to CIDv1, which adds fields with content type and text encoding in arbitrary bases (enabling text identifiers to be used in case-insensitive contexts).
tl;dr People will start using CIDv1 in near future, make sure to plan for that.
ps. Updated Step 3 to convert entire CIDv0 (not only digest) and also support CIDv1 : https://codepen.io/anon/pen/XBvPKg
Note that this produces different hex than current version and probably requires changes on the backend.