ipfs-docs icon indicating copy to clipboard operation
ipfs-docs copied to clipboard

[CONTENT REQUEST] (make it explicit that IPNS names work with DNS link)

Open stackdump opened this issue 2 years ago • 1 comments

When first using DNS link I was not aware I could use a published IPNS name as the target instead of a CID.

It would be good to note that in this section https://docs.ipfs.io/concepts/ipns/#example-ipns-setup-with-cli and then explicitly call out in https://docs.ipfs.io/concepts/dnslink/#dnslink

It's quite a bit easier to set a single DNS entry and just use MFS to alter the pointer

this URL explains it better https://flyingzumwalt.gitbooks.io/decentralized-web-primer/content/publishing-changes/lessons/view-and-publish.html

Another reference for 'k51*' keys https://github.com/ipfs/ipfs-docs/issues/801 and and example of how the TXT record is setup

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
_dnslink.example.com        text = "dnslink=/ipns/k51qzi5uqu5dhe82f7mh0jc7exsq938ughiappzzdrlfh5y3mh28n593qwg72p"

here's a script I use to do this

#!/usr/bin/env bash

# publish latest MFS to IPNS
ROOT='example.com'
NSKEY=k51qzi5uqu5dhe82f7mh0jc7exsq938ughiappzzdrlfh5y3mh28n593qwg72p

OLDPATH=$(ipfs resolve /ipns/${NSKEY})

# Change entry in Mutable file system
MFSROOT=$(ipfs files stat "/${ROOT}" --hash)

# update our IPNS key to point to latest Filesytem
ipfs name publish ${MFSROOT} 

# log the new version
NEWPTH=$(ipfs resolve /ipns/${NSKEY})
MSG="[IPFS] published ${ROOT} ${OLDPATH} => ${NEWPTH}"
echo "${MSG}"

stackdump avatar May 25 '22 00:05 stackdump

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additiona round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

welcome[bot] avatar May 25 '22 00:05 welcome[bot]