Hosting IPFS Versions with Pinata
Hosting a website/DApp frontend on IPFS grants several benefits, such as serverless hosting, potential resilience to DNS hijacks (together with IPNS/ENS), and high uptime.
This guide provides step-by-step instructions for community members or Validators to pin and host IPFS versions of the frontends for Persistence products on their respective domains. The example uses Pinata as the pinning service and Cloudflare for DNS management.
1. Configuring Pinata
1.1 Obtain CID from Release Notes
From the release notes in the respective frontend GitHub repositories, find CIDv0 and CIDv1. If the repository is private, contact us for the latest CIDs. Example: For pWallet, retrieve CIDs from the latest release notes.
1.2 Pinning on Pinata
Go to Pinata and click on "Pin by CID."
Enter CIDv0 in the IPFS CID field and use the release name and version in the name field.
After successful pinning, navigate to the Gateways Tab.
Add a custom domain to the gateway (e.g., ipfs.<your_validator_domain>.<top_level_domain>).
Note: A paid plan (Picnic plan) on Pinata will be required.
1.3 Configure DNS on Pinata
Click on Domain Info and note the Pinata domain that will be hosted under your domain provider.
2. Configuring DNS Provider (e.g., Cloudflare)
2.1 Set Up Domain URLs
Host the latest hashes for Persistence products under your domain, such as:
https://ipfs.<your_validator_domain>.<top_level_domain>/pwallet
https://ipfs.<your_validator_domain>.<top_level_domain>/pstake
https://ipfs.<your_validator_domain>.<top_level_domain>/dexter
Example: https://ipfs.kitkat.zone/pwallet, https://ipfs.kitkat.zone/pstake, https://ipfs.kitkat.zone/dexter
2.2 Create CNAME Record
Create a CNAME record pointing to the custom domain created in Pinata (as per step 1.3).
Example: ipfs.<your_validator_domain>.<top_level_domain>
2.3 Configure Transform Rules on Cloudflare
Use a transform rule to configure a constant URL per product under your hosted domain.
Example: For Cloudflare, add a rule in the Rules section:
This rule redirects users to the latest pinned deployment for pWallet.
2.4 Note
Whenever a new app version is released, pin the latest CIDs and update transform rules.
Release notes on GitHub will be updated with respective CIDs, ensuring users access the latest app release.
Automate the process by triggering a CI process for pinning CIDs and linking them to your domains when a new release is available.
3. Latest Hashes
Last Updated: 28 March, 2024
pWALLET (https://wallet.persistence.one/)
CIDv0: QmU2JRJGTpvpkBpQUZffGtSypzBrxntCRvYNSGpvxVWhcy
CIDv1: bafybeicuok42t7svyd5dscdwfayc5h5coz5cazz2m7izsovkzuigd62nfy
pSTAKE (https://app.pstake.finance/)
CIDv0: QmcXxmYxAK9uz1ZStqvRGBxhndKjDFXrxGJit4tdC1YEDq
CIDv1: bafybeigs5fwpuuwuhoums3rd645x52x377co7rlfwscitemk72phr3kl6q
Dexter (https://app.dexter.zone/)
CIDv0: QmdJr1832VxJSeSuibn5br9VtrFfTe64BrqvwkioZnKzn3
CIDv1: bafybeig6nduwoo5bpfwh6xruxrvdeic2cnilvgdhyqrhq2pqzt5btxng3a
Last updated