Skip to content

Run a POA node on Windows (Simple)

Joseph Kearney edited this page May 5, 2020 · 26 revisions

In Depth Guide to running a POA node on Catalyst

This is a simplified and visually explained guide for running a node. If you feel confident with installing software and running commands through command prompt please find the the general guide here:

Run a POA node on Windows

NOTE:

If at any point you have issues please check our FAQ which we will be constantly updating: FAQ

If the answers can not be found there then feel free to add a new issue to the repository here: Issues and one of our team members or members of the community will be able to assist you.

Step 1: Software installation.

To begin this process there are three pieces of software that must be installed. These are:

  • .Net Framework
  • Rust
  • MongoDB

We will go through these in turn.

Firstly however we must explain some of the tools we will be using to install the pieces of software.

Some elements of this guide will require the use of the Command Prompt, this comes pre-installed on all Windows distributions. You can find command prompt by using the search bar which is generally found at the bottom of your screen.

alt text

Once opened, the window should look like this:

alt text

Step 1A: Installing .Net SDK

.Net is installed via the link:

.Net Core 3.1 SDK.

Clicking this link should automatically download the SDK needed. If it does not, please click the link as shown in the below photo.

alt text

The .Net SDK can then be installed by double clicking its download icon on the bottom bar:

alt text

CLicking this should bring up an installation screen:

alt text

Proceed through the steps indicated in the the software installation. The installation may at points ask for permission to allow the app to make changes to your computer, if this happens select the yes option. Once the installation is complete select the close option.

Step 1B: Installing Rust

Firstly we must install the C++ build tools for Visual Studio. To do this click on the link:

Build tools for visual studio

Then you must select the option displayed below.

alt text

This should automatically begin the download of Visual Studio. If this does not work, use the link shown here:

alt text

Run the installer once it has downloaded. Several options should be available for the installation. We must select the highlighted option in the below image.

alt text

After this option is checked press install. This installation may take a while. Once it is complete you will be required to restart your PC.

The download for Rust can be found at the link:

Rust Download for Windows

Install Rust

Then select the Download Rustup-init.exe (64-bit) as seen in the below image.

alt text

Once the download has completed run the downloaded installation package. This will open your command prompt. This will ask you whether you wish to proceed, continue by typing y and then enter.

alt text

The installation will then ask what kind of install you wish to perform, select option 1 by typing 1 and then enter.

alt text

Once the download is complete the command prompt will look as below, press enter to complete the install.

alt text

Step 1C: Installing MongoDB

Use the following link to download the MongoDB installer:

MongoDB Community Installer

If that does not work use the link:

MongoDB Download Center

Select Windows under the operating system tab and MSI under the package.

alt text

Then open the installer which should open a window that looks like this:

alt text

Follow the links pressing next and accept the End-User License agreement. You will then be asked what kind of download you would like, select complete.

alt text

The installer will ask about Service configuration, leave this as default as seen in the below image.

alt text

At the next step the installer will ask if you wish to install MongoDB compass, check the box that says Install MongoDB Compass as seen in the below image and click next.

alt text

On the final box select install, at this point the installer may request permissions you must allow these to complete the download. This download may take a while.

Step 1D: Installing Git

Start by downloading the git installer using the following link:

git Installer

The download should automatically start. If it does not click the link in the image below.

alt text

Run the installer once the download is complete to bring up a window like below.

alt text

Use the settings in the following images (most are default settings):

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

Git is now installed on your PC!

Step 2: Checking and updating installations.

We must now change some of the settings manually within the applications that we have installed. We'll also show how to check that the software has been installed correctly.

All of this next step will take place using the command prompt, accessing this is described at the top of the page.

Firstly we wish to update the settings for Rust. This requires two commands, the first is:

rustup toolchain install nightly

Press enter, then use:

rustup default nightly

Press enter again and this will update the Rust settings. We can now check that we have installed everything correctly. We run each of the following commands in turn.

git --version rust --version dotnet --version

This will give us an input that looks like:

alt text

If your output looks like this then the software is installed correctly.

Step 3: Cloning the Catalyst Repository

We can now clone the repository that contains the Catalyst project, this is done using the command git clone https://github.com/catalyst-network/Catalyst.git in the command prompt.

The output should look like:

alt text

This means that the repository has been downloaded successfully.

Step 4: Update the Repository Sub-Modules

We can now enter the Catalyst repository, this is done with the command cd Catalyst

Catalyst relies on some external submodules that are built into the project, these must be updated and downloaded also, this is done using the command git submodule update --init --recursive --force. The output of this should look like the image below:

alt text

Step 5: Build the Catalyst solution

We can now move into src file in the Catalyst repository, this is where the source code for the project is held. We do this in the Command Prompt by entering:

cd src

Now we can build the solution by running the command:

dotnet build Catalyst.sln

The final lines of the output should look like:

alt text

Step 6: Set Node Passwords

Now we can run the node for the first time! During this process we must set three passwords for the node:

  • Node Password
  • IPFS Password
  • SSL Certificate Password

First we must change directory again, this time entering the command:

cd Catalyst.Node.POA.CE

To start the node now enter:

dotnet run

You will first be asked to create the node password as shown below.

alt text

Enter your desired password and press enter. You will then be asked to set your IPFS password.

alt text

Once again enter your desired password and press enter. Finally you will be asked to set a password for your SSL certificate.

alt text

Type in the password you want to set it to and press enter.

The node will now begin to run, however we want to stop it so that we can configure it. This is done by pressing ctrl + c

Step 7: Setup Peer ID

Now that the node is no longer running we must set up the node with an identity so it can be communicated with by other nodes.

For this we will require three elements these are:

  • Public Key
  • Internal IP Address
  • External IP Address

Step 7A: Finding the Public Key

To find the Public Key we must access the folder that was created when we ran the node for the first time. On Windows generally the file path that it is stored in is C:\Users\YourUserNameHere\.catalyst .

Once within this folder, we must retrieve the log file from the first time we ran the node. This file is indicated below.

alt text

On your computer the numbers at the end of the filename may be different. Open this file in notepad, then we want to search the file (crtl +f for the phrase using PublicKey and it should come back with something similar to.

alt text

Copy the public key somewhere safe.

Note: You do not need the *, only the letters and numbers with no space before or after.

Step 7B: Finding the internal IP Address

The internal IP address can be found using the ipconfig command. This will return your IP Address settings. Make note of the entry under IPv4 Address.

Step 7C: Finding the external IP Address

Your external IP address can be found through the website found here External IP Address Finder, make note of the IPv4 Address given.

Step 7D: Editing the Devnet.json file

Within the .catalyst folder from step 7A is a file called devnet.json. (or just devnet). Open this file in Notepad or a similar text application. It will look like this:

alt text

You will need to replace several elements with your details from steps 7 A, B and C.

Where you see the text "PublicKey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", you should replace the aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa with your Public Key from 7A.

For the text "BindAddress": "127.0.0.1", you should replace the 127.0.0.1 with your internal IP address. This field is in two places, both must be changed.

For the text "PublicIpAddress": "127.0.0.1", you should replace the 127.0.0.1 with your external IP address.

Always keep the input values within the quotation marks (" ").

alt text

Save the file and exit.

Step 8: Port-Forwarding

Unfortunately port forwarding varies from router to router so it is not possible to give a definitive guide on how to do this. Generally most routers will have online guides on how to do this. There are four ports that we wish to forward, these are:

  • 42076(udp)
  • 42066(tcp)
  • 4001(tcp)
  • 5005(tcp)

The link below contains a large list of routers and guides on how to port forward on then.

Port Forwarding Guides

Many routers will require you to log into the router using the admin password sometimes found on the back of the router.

Step 9: Run the Node

To run the node we must use the Command Prompt to go into the Catalyst.Node.POA.CE folder and run the node again. If your Command prompt is still open from earlier and this is the folder that you are in simply use the following command:

dotnet run --reset

Otherwise open a new Command Prompt window and use the command:

cd Catalyst/src/Catalyst.Node.POA.CE and then use dotnet run --reset

The Node will begin running.

There are three ways to check that the node is running correctly.

Firstly and probably the easiest is by going to the Catalyst Node Dashboard found here:

Catalyst Node Dashboard

You can identify your node using the public key that you made a note of in step 7A. You should see on this dashboard that your node is online!

alt text

Secondly you can go to C:\Users\YourUserNameHere\.catalyst\DFS\blocks . In this folder you should see new files being. this is ledger being downloaded.

Finally you can go to:

Catalyst Block Explorer

Click Network:

alt text

You should be able to see your node syncing.

If you have any issues with any of these steps please contact us by making an issue here: Issues and one of our team members or members of the community will be very happy to assist you.

Clone this wiki locally