Intermediate

 

How to run a NEAR node using nearup on Windows

Are you looking to run a NEAR node on your Windows system? Look no further! This tutorial will walk you through the steps to install and set up a NEAR node using nearup on your Windows system. We will start by installing the necessary software and dependencies, including Node.js, Rust, and OpenSSL. We will then clone the NEAR repository and build the node using the make command. Finally, we will install nearup and run the testnet using the nearup run command. With these steps, you will be well on your way to running your own NEAR node on your Windows system.

nearup Installation

You can install nearup by following the instructions at .

  • If Windows Subsystem for Linux is not enabled, open PowerShell as administrator and run:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

     

    Then restart your computer.

  • Go to your Microsoft Store and look for Ubuntu; this is the Ubuntu Terminal instance. Install and launch it.

  • Now you might be asked for username and password, do not use admin as username.

  • Your Ubuntu Instance need initial before next steps

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install build-essential pkg-config libssl-dev

     

  • You need to install OpenSSL, which you will need to run the node. To download OpenSSL, please run the following commands in the Ubuntu Terminal:

    cd /tmp
    wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
    tar xvf openssl-1.1.1.tar.gz

     

  • After it finished downloading OpenSSL, run the following commands to install:

    cd openssl-1.1.1
    sudo ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
    sudo make
    sudo make install

     

    The files will be under the following directory: /usr/local/ssl.

  • Once this is finished, you have to ensure that Ubuntu is going to use the right version of OpenSSL. Now update the path for man pages and binaries. Run the following command:

    cd ../..
    sudo nano /etc/manpath.config

     

  • A text file will open, add the following line:

    MANPATH_MAP     /usr/local/ssl/bin      /usr/local/ssl/man

     

    Once this is done press ctrl + o . It will ask you to save the file, just press enter. Now press ctrl + x to exit.

  • To make sure that OpenSSL is installed run:

    openssl version -v

     

    This should show you the installed version. More info on this can be found here. ( )

  • Now you have to run the following commands to install all nessesary software and dependencies:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install -y git jq binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake gcc g++ protobuf-compiler python3 python3-pip llvm clang

     

  • Install Rustup

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    source $HOME/.cargo/env
    rustup default nightly

     

    Great! All set to get the node up and running!

  • Clone the github nearcore

    First we need to check a version which is currently working in testnet:

    curl -s https://rpc.testnet.near.org/status | jq .version

     

  • You’ll get something like this: “1.13.0-rc.2”. “1.13.0” is a branch which we need to clone to build our node for testnet.

    git clone --branch 1.13.0 https://github.com/near/nearcore.git

     

  • This created a nearcore directory, change into that one and build a noce:

    cd nearcore
    make neard

     

  • Install nearup

    pip3 install --user nearup
    export PATH="$HOME/.local/bin:$PATH"

     

  • Final: And now run the testnet:

    nearup run testnet --binary-path ~/nearcore/target/release/neard

     

  • To be sure node is running you can check logs

    nearup logs --follow

     

You might be asked for a validator ID; if you do not want to validate, simply press enter. For validation, please follow the Validator Bootcamp.