charlettab.id.blockstack

May 094 min read

Running Stacks-Node Neon on Windows 10

by Charletta Bullard

Important Note:

* You will need bash.exe to run this node. I was not successful in running it in cmd.exe or PowerShell

* Not sure if having Docker installed makes a difference

* As of now this process works but as changes are made and updates are occurring, I will update the PATH accordingly and update this blog.

Background:

This was a two day process of trials and errors and major setbacks. I have even upgraded my system from Windows Home to Windows Pro because I could not install Docker and I was trying to run the Dockerfile in the Stacks-Blockchain repo. I am not certain that if having Docker installed on your Windows machine matters but I was able to run this node without using Docker and just used the bash terminal instead.

I am including screenshots showing the the terminal and the PATH being used because it plays a major role in getting the stacks-node neon to run in the bash terminal.

Process:

You want to follow the Prerequisites and Download and install the stacks-blockchain repository specified in Run a Stacks Testnet Node. Those steps are the same process.

The section where it says in the docs, "Install the Stacks node by running: cargo install --path ./testnet" is where you will be taking a different approach. In your bash terminal after you have did the installing process of the repo, you need to "cd into the /stacks" directory and run the following command:

"cargo install --path ."

Pay close attention to the period(.) at path because this is very important because it will not work without it. Please see screenshot 1 below as a reference.

Once you have finished running this installation, you will go to the next step in the process which is running the node using the following: "stacks-node neon". Please see the image below as reference.

Once you have got to this process you have a running node on the neon testnet.

The next step is compiling a binary for neon testnet and this process took some time to figure out because again PATHs are major in Windows. It will not make assumptions, you have to be very specific of your location. I think this is why it didn't work for me in PowerShell or cmd.exe because you have to call the PATH every time but in bash you can simply just cd into the PATH.

In creating your optimized binary according to the directions you have to "cd testnet" then run the following:

"cargo build --release --bin stacks-node"

Now this will not work and you may get an error or it will run but you will not be able to complete the second step in the directions. Either way the PATH of /testnet directory is not where you need to be. You will have to step into /stacks-node directory to run this command. Please see image below.

Also note that PATH you have to cd into the /stacks-node directory and run this binary command.

Lastly running this binary was the trickiest of all. This PATH in the docs was confusing to say the least and I had to break down the PATH specified and run it in the /stacks-node directory. And it WORKED!!!! See the image below.

Conclusion:

The key takeaway is to make sure you are in the right PATH when running the commands in Run a Stacks Testnet Node. For now, in order for testnet neon to work you have to call it from the /stacks-node directory not /testnet. I am not usually a Windows user but I recently brought a Windows laptop and one of the hiccups I ran into was my terminal commands did not work in PowerShell and cmd.exe. To make things easier for myself I just installed bash.exe and still was able to maneuver around in Windows rather quickly and I tried every way possible running the commands as specified in the /testnet directory. It was only when I changed directories and went to /stacks-node, it worked! Once I changed directories, everything came together quickly and I was able to get stacks-node neon to run and optimize a binary successfully. This was a very challenging process and I hope that it helps someone get setup on Windows.

Share this story