Ceramic: How to Host a Ceramic Node Using Decentralized Storage
Learn how to host a Ceramic Node Using Decentralized Storage.
What is Ceramic?
The Ceramic network is a decentralized network for building applications with composable data on Web3. Ceramic makes building apps as easy as browsing a marketplace of data models, selecting one to use in your app, then updating your app with your selected data model and its data. Since data on Ceramic is compostable, it can be reused across all applications, thanks to the Ceramic’s decentralized application databases.
Since Ceramic is a decentralized network, anyone can contribute to the network by providing storage space or network bandwidth through running their own Ceramic node. Ceramic nodes can be configured to use Filebase as the storage backend of a node.
Ceramic nodes can be used through NPM or through Docker containers. In this tutorial, we will showcase the use of Ceramic through NPM packages.
Learn how to host your own Ceramic node using Filebase by reading below.
This guide was tested and configured using Ubuntu 20.04. Commands and workflow may vary based on operating system.
1. Install the Ceramic IPFS-Daemon and set the Ceramic Network environment variable with the following commands:
npm install -g @ceramicnetwork/ipfs-daemon
npm install -g @ceramicnetwork/cli
export CERAMIC_NETWORK=testnet-clay
In this tutorial, we are using the testnet-clay network, since it is required that users configure and deploy their node on this network before requesting for it to be moved to the Ethereum mainnet network.
2. Then in a new shell window, configure Ceramic to use IPFS:
npm install -g @ceramicnetwork/cli
Ceramic nodes do not use IPFS for storage or pinning of files, they use IPFS for their peer-to-peer network connection to other nodes on the network.
3. Next, login to the Infura.io console. Create a new project.
4. Select the Ethereum network, and give your project a name.
5. In the Project settings, select "Ropsten” from the endpoint dropdown menu.
6. Then, take down the HTTPS Endpoint. You will need this in the next step.
7. Next, export your S3 configuration environment variables using the following commands:
export IPFS_S3_REPO_ENABLED="true"
export IPFS_PATH="/home/filebase/ceramic"
export AWS_ENDPOINT="https://s3.filebase.com"
export AWS_BUCKET_NAME="filebase-sample-bucket"
export AWS_ACCESS_KEY_ID="XXXXXXXXXXXXXXXXXXXX"
export AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export AWS_REGION=”us-east-1”
export IPFS_BACKEND_ROOT="s3"
export IPFS_BACKEND_BLOCKS="s3"
export IPFS_BACKEND_KEYS="s3"
export IPFS_BACKEND_PINS="s3"
export IPFS_BACKEND_DATASTORE="s3"
Replace the following values:
AWS_ACCESS_KEY_ID: Filebase Access Key
AWS_SECRET_ACCESS_KEY: Filebase Secret Key
8. Then, it the daemon.config.js
file in your $HOME.ceramic
directory that has the following content:
daemon.config.js
file in your $HOME.ceramic
directory that has the following content:Replace the following value:
"https://infura_endpoint": Replace with your Infura project HTTPS endpoint
9. Launch the Ceramic daemon:
ceramic daemon
You will receive output that resembles the following:
The message at the end of this output indicates that the node is not discoverable by other nodes on the network since it is not listed on the Ceramic peer list.
To have your node added to the peer list for the Ceramic network testnet-clay, you need to submit a Pull Request for the Ceramic network’s Peerlist Github repo found here.
Once your node is added to the peer list, your Ceramic node will be live on the network!
Last updated