Boris Mann

Open Source. Community. Decentralized Web. Building dev tools at Fission. Cooks & eats.

Home

Cloudflare IPFS Gateway

  • Last Edit: September 28, 2020

Cloudflare has a Distributed Web Gateway page that covers both IPFSIPFS
InterPlanetary File System
website: https://ipfs.io
Originally created by [[Juan Benet]] who founded [[Protocol Labs]].
and Ethereum.

Here is the extreme TLDR of using their IPFS gateway (if you already have your DNS hosted with Cloudflare):

  1. Create a CNAME for your website that points to cloudflare-ipfs.com – in my case for my root domain, bmannconsulting.com
  2. Create a TXT record at _dnslink.bmannconsulting.com
  3. Enter in dnslink=/ipns/APPNAME.fission.app – from the FissionFission
    Fission is the company I founded in June [[2019]] with [[Brooklyn Zelenka]].

    https://fission.codes
    twitter @fissioncodes
    Discord chat https://fission.codes/discord
    DiscourseDiscourse
    Discourse is super flexible open source forum software. It’s a top [[Community Tool]].
    forum https://talk.fission.codes

    Guide on controlling your own DNS

Unfortunately, Cloudflare automatically has 6 hours of caching set, and no way to automatically purge / refresh cache when using IPNS in your DNSLink. Request on the Cloudflare community forum here for cache clear.

For now, setting the DNSLink to use a hash and updating it with ipfs deployipfs deploy
Github github.com/ipfs-shipyard/ipfs-deploy
Originally by [[agentofuser]], now part of [[Protocol Labs]] [[IPFS Shipyard]].
DNS for Cloudflare Example
Put this in an .env file.
IPFS_DEPLOY_CLOUDFLARE__API_TOKEN=YOUR_TOKEN_HERE
IPFS_DEPLOY_CLOUDFLARE__ZONE=bmannconsulting.com
IPFS_DEPLOY_CLOUDFLARE__RECORD=_dnslink.bmannconsulting.com
would be one way to make this work.