ArcBlock: Running an ArcBlock Blocket Server on IPFS

Learn how to run an ArcBlock Blocket Server on IPFS.

What is ArcBlock?

ArcBlock is a decentralized developer platform that strives to simplify the development process of decentralized applications, DeFi apps, and other blockchain technologies.

Read below to learn how to run an ArcBlock Blocket Server on IPFS.

Prerequisites:

1. First, we need a Filebase IPFS bucket.

To do this, navigate to console.filebase.com. If you don’t have an account already, sign up, then log in.

2. Select ‘Buckets’ from the left sidebar menu, or navigate to console.filebase.com/buckets.

Select ‘Create Bucket’ in the top right corner to create a new bucket.

3. Enter a bucket name and choose the IPFS storage network to create the 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.

4. Next, download and install S3FS-FUSE on a Linux or macOS system.

5. Set up an Access Key file for use with S3FS-FUSE.

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.

6. Mount your bucket.

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

7. Now, navigate into the mounted Filebase bucket.

cd /path/to/mountpoint/

8. Next, install NVM with the following command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

export NVM_DIR="$HOME/.nvm"

[ -s "$NVM_DIR/nvm.sh" ] && \\. "$NVM_DIR/nvm.sh"

9. You will also need to have Node.js and NPM installed. You can do so with the following commands:

nvm install --lts

nvm install-latest-npm

10. Next, install Nginx. This command will vary based on your operating system. This example uses MacOSx:

brew install nginx

11. Then, install the Blocklet CLI:

npm install -g @blocklet/cli

12. Now we’re ready to create and run the Blocklet server.

We’ll use an empty directory to store the Blocklet Server’s configuration information. To do this, run the following commands:

mkdir -p /path/to/mountpoint/blocklet-server-data && cd /path/to/mountpoint/blocklet-server-data

13. Then, initialize the Blocklet Server with the command:

blocklet server init

When prompted, confirm that your initialization directory is your mounted Filebase bucket.

14. Then, start the server:

blocklet server start

15. The Blocklet Server will be running at the following URL:

https://192-168-0-88.ip.abtnet.io/admin/

16. Accept the Blocklet Server terms of service, then select ‘Connect with DID-Connect’.

17. DID-Connect is a cryptowallet.

To get one set up, check out this guide here. Then, select ‘Web Wallet’ and authenticate the request to connect with Blocklet.

18. You’ll be brought to the Blocklet Server dashboard.

19. From here, you can install Blocklet apps from the Blocklet Store, which can be used for dApp development and integration.

Last updated