Polkadot: Deploy a Polkadot dApp on Decentralized Storage
Learn how to deploy a Polkadot dApp on decentralized storage.
Last updated
Learn how to deploy a Polkadot dApp on decentralized storage.
Last updated
Polkadot is a blockchain protocol that unites different networks of purpose-built blockchains together, enabling them to integrate seamlessly. Polkadot allows different blockchain networks to exchange data, unlocking a wide variety of possibilities for decentralized applications in fields such as web decentralization, finance, asset management, and identity management. Polkadot’s unique design provides solid advantages such as cross-chain composability, upgradeability, and scalability, over other blockchain networks.
Substrate is a multi-chain blockchain framework that is designed specifically to connect and integrate with Polkadot, allowing Polkadot to access a system of parallel transactions and other cross-chain transactions and data transfers.
In this tutorial, we’ll build a Polkadot decentralized application using a template built with Substrate, that is stored and deployed on a mounted Filebase bucket.
Read below to learn how to deploy a Polkadot dApp on decentralized storage.
To do this, navigate to console.filebase.com. If you don’t have an account already, sign up, then log in.
Select ‘Create Bucket’ in the top right corner to create a new bucket.
Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.
Set up a credentials file for S3FS at ${HOME}/.passwd-s3fs. You will need to save your Filebase Access and Secret keys to this file and give it owner permissions. You can do so with the following commands:
echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > ${HOME}/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs
ACCESS_KEY_ID
is your Filebase Access key, and SECRET_ACCESS_KEY
is your Filebase Secret key. For more information on Filebase access keys, see here.
You can mount a Filebase IPFS bucket with the command:
s3fs mybucket /path/to/mountpoint -o passwd_file=${HOME}/.passwd-s3fs -o url=https://s3.filebase.com
mybucket: name of your Filebase bucket
/path/to/mountpoint
cd /path/to/mounted/bucket
git clone https://github.com/substrate-developer-hub/substrate-node-template
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cd substrate-node-template
git checkout latest
This repository contains Rust files that you can modify as per the customizations or features that you need for your app.
cargo build --release
Open a new terminal window, then download the front-end template for the dApp:
git clone https://github.com/substrate-developer-hub/substrate-front-end-template
yarn install
yarn start