A documentation of my works related to robotics.

Creating your own private blockchain with NEM Catapult

This tutorial is referenced from NEM’s tutorial website.Image result for nem catapult

Step 1: Set up your own virtual machine Image result for oracle vm

For most users who are stuck on Windows 10 Home version, docker and docker-compose are not available for you, hence you have to create your own Linux Machine using a VM (it is not hard, trust me on this). Link to download here. Select Windows Installer and run the installer.

1We are going to run a Linux Machine, so here’s an iso file for you to load ur Linux.

2

After finish installing, open your Oracle VM and click new.

1

Next, give a name to ur VM and select the OS to be Linux

2

Put at least 1GB of RAM, I put 2 GB cause I want my browser to run smoother, but it is up to you.

3

Go through the following steps:

4

5I put 20 GB hard disk space because your private-chain will eat up ur hard disk quite fast, but it won’t crash the system so it is alright.7After you create the virtual machine, select your disk image.9Go to settings, and click the Network tabs.10Click port forwarding, so we can set our localhost to retrieve block information easier.

11Create a rule by clicking on the green icon, and make sure both host port and guest port are 3000. And click ok then hit the Start button on your VM. 12

Step 2: Running the catapult-service-bootstrap aka private chain on localhost.

1.png

As long as your focus is on the screen, you will be able to access the Linux machine just like you owned a Linux Laptop (hooray!). Open the terminal and run these command lines:

Install libraries

sudo apt install git docker docker-compose

Run your private-chain!

git clone https://github.com/tech-bureau/catapult-service-bootstrap.git
cd catapult-service-bootstrap
sudo ./cmds/start-all -d

Congratulations! You have run your first private-chain!

1.png

To access the block information, just open a browser in your Linux Machine or your local machine, and type in the address http://localhost:3000/block/1, you should see something like this:

1.png

As time goes by, your block heights will slowly increase, my highest height is 304, but I am out of disk space so it doesn’t increase anymore 🙁

My next topic will cover on how to interact with the private-chain by issuing transactions, and also migrate to transactions in the public chain. Leave a comment on issues you meet or share this blog to help people who are interested in blockchain technology!

« »