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: 1 May, 2024
pWALLET (https://wallet.persistence.one/)
CIDv0: QmbGeud9uMjUQH1makvoJngoSwofHZzRJUrz5xush1xxsF
CIDv1: bafybeigaehknfid4v6rtugaf7qh7kdibhglvpxl4kttb5hq7jeutjbetgy
Last Updated: 28 May, 2024
pSTAKE (https://app.pstake.finance/)
CIDv0: QmUbzAhEppB5vJknKJiSTidtqair8TMxhQLva6sQzwF5Cq
CIDv1: bafybeic5cpk5yoyor64oar5nyd5uhkg5nvt7bfo6vzkovjncdo7o7mypfy
Last Updated: 4 June, 2024
Dexter (https://app.dexter.zone/)
CIDv0: QmXPVirjD73FGbnC1CwLCGM4Upxq35DafhDonA6HN4Huyp
CIDv1: bafybeiegopbvs3sfovnyknev55j7wjxfbjsrnuqt7ffnzw7idixca3dtp4
Last updated